Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zotko/xyz2graph
Convert an xyz file into a molecular graph and create a 3D visualisation of the graph.
https://github.com/zotko/xyz2graph
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: 7 days ago
JSON representation
Convert an xyz file into a molecular graph and create a 3D visualisation of the graph.
- Host: GitHub
- URL: https://github.com/zotko/xyz2graph
- Owner: zotko
- License: isc
- Created: 2018-08-11T12:05:10.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-12-29T17:12:02.000Z (23 days ago)
- Last Synced: 2025-01-07T08:08:39.171Z (14 days ago)
- 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
- Language: Python
- Homepage:
- Size: 6.15 MB
- Stars: 82
- Watchers: 2
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# xyz2graph
[![PyPI version](https://img.shields.io/pypi/v/xyz2graph.svg)](https://pypi.org/project/xyz2graph/)
[![Python Version](https://img.shields.io/pypi/pyversions/xyz2graph.svg)](https://pypi.org/project/xyz2graph/)
[![License](https://img.shields.io/github/license/zotko/xyz2graph.svg)](https://github.com/zotko/xyz2graph/blob/master/LICENSE)
[![Documentation](https://img.shields.io/badge/docs-mkdocs-blue)](https://zotko.github.io/xyz2graph)
[![DOI](https://zenodo.org/badge/144382005.svg)](https://doi.org/10.5281/zenodo.14569337)[![PyPI Downloads](https://static.pepy.tech/badge/xyz2graph/month)](https://pepy.tech/projects/xyz2graph)
[![GitHub Stars](https://img.shields.io/github/stars/zotko/xyz2graph)](https://github.com/zotko/xyz2graph/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/zotko/xyz2graph)](https://github.com/zotko/xyz2graph/network/members)[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
A Python package to convert XYZ molecular files into NetworkX graphs with interactive 3D visualization using Plotly.
## Features
- Interactive 3D molecular visualization using Plotly
- NetworkX graph conversion for analysis
- Command-line interface## Installation
```bash
pip install xyz2graph
```## Requirements
- Python 3.8+
- Dependencies: NumPy, Plotly, NetworkX## Quick Start
```python
from xyz2graph import MolGraph# Create molecular graph and read XYZ file
mg = MolGraph()
mg.read_xyz('molecule.xyz')# Convert to NetworkX graph
G = mg.to_networkx()# Generate interactive 3D visualization
fig = mg.to_plotly()
fig.show()
```## 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](https://zotko.github.io/xyz2graph) for guides, API reference, and examples.
## Help & Discussion
🪲 [Report a bug](https://github.com/zotko/xyz2graph/issues)
✨ [Request a feature](https://github.com/zotko/xyz2graph/discussions)## Contributing
Contributions are welcome! Please see the [Contributing Guide](https://github.com/zotko/xyz2graph/tree/main/CONTRIBUTING.md) for guidelines.
## Citation
If you use xyz2graph in your research, please cite:
```bibtex
@misc{zotko2018xyz2graph,
author = {Zotko, Mykola},
title = {xyz2graph: Molecular Structure Visualization},
year = {2018},
publisher = {GitHub},
url = {https://github.com/zotko/xyz2graph}
}
```