xyz2graph

Convert an xyz file into a molecular graph and create a 3D visualisation of the graph.

https://github.com/zotko/xyz2graph

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.2%) to scientific vocabulary

Keywords

3d-plot atomic-coordinates chemical-structures chemistry chemoinformatics computational-chemistry data-visualization molecular-graph molecular-modeling molecule molecule-visualization networkx plotly scientific-computing xyz-files xyz-reader
Last synced: 4 months ago · JSON representation ·

Repository

Convert an xyz file into a molecular graph and create a 3D visualisation of the graph.

Basic Info
  • Host: GitHub
  • Owner: zotko
  • License: isc
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 7.5 MB
Statistics
  • Stars: 86
  • Watchers: 1
  • Forks: 22
  • Open Issues: 0
  • Releases: 19
Topics
3d-plot atomic-coordinates chemical-structures chemistry chemoinformatics computational-chemistry data-visualization molecular-graph molecular-modeling molecule molecule-visualization networkx plotly scientific-computing xyz-files xyz-reader
Created over 7 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Citation

README.md

xyz2graph

PyPI version Python Version License Documentation DOI Binder

GitHub Actions Workflow Status codecov Dependabot

PyPI Downloads GitHub Stars GitHub Forks

A Python package to convert XYZ molecular files into NetworkX graphs with interactive 3D visualization using Plotly.

Try it live 🚀

Features

Installation

bash pip install xyz2graph

Requirements

  • Python 3.8+
  • Dependencies: NumPy, Plotly, NetworkX

Quick Start

```python import numpy as np from xyz2graph import MolGraph

Create molecular graph and read XYZ file

mg = MolGraph() mg.read_xyz('molecule.xyz')

Generate interactive 3D visualization

fig = mg.to_plotly() fig.show()

Convert to NetworkX graph

G = mg.to_networkx()

G.nodes[0]

Output: {'element': 'C', 'xyz': (0.1718396797, 1.4440789224, 0.2473852864)}

G.edges[(0, 1)]

Output: {'length': np.float64(1.49623)}

```

Command Line

```bash

Save visualization as HTML

xyz2graph molecule.xyz

Specify output file

xyz2graph molecule.xyz --output viz.html

Open directly in browser

xyz2graph molecule.xyz --browser ```

Documentation

Read the documentation for guides, API reference, and examples.

Help & Discussion

🪲 Report a bug
Request a feature

Contributing

Contributions are welcome! Please see the Contributing Guide for guidelines.

Owner

  • Name: Mykola
  • Login: zotko
  • Kind: user

Data Scientist

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: xyz2graph
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Mykola
    family-names: Zotko
identifiers:
  - type: doi
    value: 10.5281/zenodo.14938937
repository-code: 'https://github.com/zotko/xyz2graph'
url: 'https://github.com'
abstract: >-
  Convert XYZ molecular files to NetworkX graphs with
  interactive 3D visualization.
keywords:
  - computational chemistry
  - chemoinformatics
  - molecular modeling
  - scientific computing
  - molecular graph
  - atomic coordinates
license: ISC
version: 3.5.0
date-released: '2025-02-27'

GitHub Events

Total
  • Create event: 51
  • Issues event: 6
  • Release event: 19
  • Watch event: 14
  • Delete event: 34
  • Issue comment event: 9
  • Push event: 142
  • Pull request event: 61
  • Fork event: 4
Last Year
  • Create event: 51
  • Issues event: 6
  • Release event: 19
  • Watch event: 14
  • Delete event: 34
  • Issue comment event: 9
  • Push event: 142
  • Pull request event: 61
  • Fork event: 4

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 166
  • Total Committers: 2
  • Avg Commits per committer: 83.0
  • Development Distribution Score (DDS): 0.006
Past Year
  • Commits: 115
  • Committers: 2
  • Avg Commits per committer: 57.5
  • Development Distribution Score (DDS): 0.009
Top Committers
Name Email Commits
Mykola Zotko m****o@g****m 165
Mykola Zotko c****t@z****v 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 4
  • Total pull requests: 40
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 5 hours
  • Total issue authors: 4
  • Total pull request authors: 3
  • Average comments per issue: 1.25
  • Average comments per pull request: 0.18
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 40
  • Average time to close issues: 2 days
  • Average time to close pull requests: about 5 hours
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 1.5
  • Average comments per pull request: 0.18
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kol0760 (1)
  • pinkutech (1)
  • minhtriet (1)
  • ice1x (1)
  • zotko (1)
Pull Request Authors
  • zotko (47)
  • O2-AC (4)
  • farhanarrafi (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 154 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 17
  • Total maintainers: 1
pypi.org: xyz2graph

Package for reading of .xyz files and constructing of molecular graphs from atomic coordinates.

  • Homepage: https://github.com/zotko/xyz2graph
  • Documentation: https://zotko.github.io/xyz2graph
  • License: ISC License Copyright (c) 2018 Mykola Zotko Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  • Latest release: 3.5.0
    published 10 months ago
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 154 Last month
Rankings
Dependent packages count: 10.1%
Average: 33.4%
Dependent repos count: 56.7%
Maintainers (1)
Last synced: 4 months ago