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

PyPI Downloads GitHub Stars GitHub Forks

"Buy Me A Coffee" Stand With Ukraine

A Python package for converting XYZ molecular files into interactive 3D visualizations and NetworkX graphs.

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')

# 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

Documentation

Full documentation is available at https://zotko.github.io/xyz2graph

Contributing

Contributions are welcome! Please see the CONTRIBUTING.md file 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}
}

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.3.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

xyz2graph-3.3.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xyz2graph-3.3.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for xyz2graph-3.3.0.tar.gz
Algorithm Hash digest
SHA256 520b392be50d318eb4a540115395ca5b65f5a16b5975508b3d179b8eb22ecbd9
MD5 1ecb836169fb72468a65bc8283bac13a
BLAKE2b-256 a9ca82fb7b8bebf6a652836dbc50dcbc546153af59d994eadf3a19a83e96c16c

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on zotko/xyz2graph

Attestations:

File details

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

File metadata

  • Download URL: xyz2graph-3.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for xyz2graph-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f7c6c65a79ebef953d0f4fc542a712dc92f6fbcd250a64075bb4d7631a8e574
MD5 71b7285bca736ccbc4d9db16020c5e6f
BLAKE2b-256 7b77267070164a0f50f23a5bf1f358c699ff3377d8c6aa4de4c94f7a324902de

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on zotko/xyz2graph

Attestations:

Supported by

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