Skip to main content

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

Project description

xyz2graph

PyPI version Python Version License Documentation DOI

PyPI Downloads GitHub Stars GitHub Forks

Stand With Ukraine

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

Try it live 🚀

Features

  • Interactive 3D molecular visualization using Plotly
  • NetworkX graph conversion for analysis
  • Command-line interface

Installation

pip install xyz2graph

Requirements

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

Quick Start

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

# 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.

Citation

If you use xyz2graph in your research, please cite:

@misc{zotko2018xyz2graph,
  author       = {Zotko, Mykola},
  title        = {xyz2graph: Molecular Structure Visualization},
  year         = {2018},
  publisher    = {GitHub},
  url          = {https://github.com/zotko/xyz2graph}
}

Buy Me A Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xyz2graph-3.4.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xyz2graph-3.4.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file xyz2graph-3.4.0.tar.gz.

File metadata

  • Download URL: xyz2graph-3.4.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for xyz2graph-3.4.0.tar.gz
Algorithm Hash digest
SHA256 6c69b632a653e5f9c9dbaf0667da8c5e37f747081b89b411fe3811a1b9d98b76
MD5 027d352a62a5eff293f3116f4dfa9178
BLAKE2b-256 413ce7654eefe962208c01a6c2f49c6f2e62e6293c17f4842cf4d55b2c4a931d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyz2graph-3.4.0.tar.gz:

Publisher: publish.yml on zotko/xyz2graph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xyz2graph-3.4.0-py3-none-any.whl.

File metadata

  • Download URL: xyz2graph-3.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for xyz2graph-3.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92ac768b30174319543bb8bf3254db03d9d9c12fc2ec562a7cf74cc348c0b852
MD5 3b7a111f5d233bbad2a51e336784feb5
BLAKE2b-256 9c6f78efba3fdf14bea4a337b89e88ba0313736d6ea6c8d2488ea0ea02fa6cd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyz2graph-3.4.0-py3-none-any.whl:

Publisher: publish.yml on zotko/xyz2graph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page