Package for reading of .xyz files and constructing of molecular graphs from atomic coordinates.
Project description
xyz2graph
A lightweight Python package for reading XYZ files and creating interactive molecular visualizations. Convert molecular structures into 3D visualizations using Plotly or analyze them as NetworkX graphs.
Features
- Read and parse XYZ molecular structure files
- Generate interactive 3D molecular visualizations using Plotly
- Convert molecular structures to NetworkX graphs for analysis
- Command-line interface for quick visualizations
Installation
pip install xyz2graph
Requirements
- Python 3.8+
- NumPy
- Plotly
- NetworkX
Usage
Basic Usage
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()
Command Line
# Save visualization as HTML
xyz2graph molecule.xyz
# Specify output file
xyz2graph molecule.xyz --output visualization.html
# Open directly in browser
xyz2graph molecule.xyz --browser
Examples
Example XYZ files can be found in the examples
directory.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use xyz2graph in your research, please cite:
@misc{xyz2graph,
author = {Zotko, Mykola},
title = {xyz2graph: Molecular Structure Visualization},
year = {2018},
publisher = {GitHub},
url = {https://github.com/zotko/xyz2graph}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xyz2graph-3.0.5.tar.gz
.
File metadata
- Download URL: xyz2graph-3.0.5.tar.gz
- Upload date:
- Size: 665.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a1e3dc2216a02d29cd1a4af81aef69ab05403a0d219032bcaa15ccf286a5cb0 |
|
MD5 | c27cbe6b68cabd340684be3ead6a893e |
|
BLAKE2b-256 | d61e803498d2e9bd5e172fe6e7ed12166107e48617056144fe49b16689112301 |
Provenance
The following attestation bundles were made for xyz2graph-3.0.5.tar.gz
:
Publisher:
publish.yml
on zotko/xyz2graph
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
xyz2graph-3.0.5.tar.gz
- Subject digest:
1a1e3dc2216a02d29cd1a4af81aef69ab05403a0d219032bcaa15ccf286a5cb0
- Sigstore transparency entry: 147935848
- Sigstore integration time:
- Predicate type:
File details
Details for the file xyz2graph-3.0.5-py3-none-any.whl
.
File metadata
- Download URL: xyz2graph-3.0.5-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33dba2a288b48a67ed99ad48777fae182590eb0830ef7763aa9e48008afc5f35 |
|
MD5 | 377f7596a8b77fa0adc0bbd3a93a897a |
|
BLAKE2b-256 | 8e4caf5d603fa9546c467423cc12860e17448556581296a248342ff44c8dee39 |
Provenance
The following attestation bundles were made for xyz2graph-3.0.5-py3-none-any.whl
:
Publisher:
publish.yml
on zotko/xyz2graph
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
xyz2graph-3.0.5-py3-none-any.whl
- Subject digest:
33dba2a288b48a67ed99ad48777fae182590eb0830ef7763aa9e48008afc5f35
- Sigstore transparency entry: 147935849
- Sigstore integration time:
- Predicate type: