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.1.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.1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xyz2graph-3.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8b563f5dbeb3f7aedbe11f4befadee68f8de6aeb681ea73d3bb9d74c5bdd2dbd
MD5 778f7c7a93de93f6b4291b558d063aff
BLAKE2b-256 d69971f8cf9a87f915ea7df77c94cc0995a6e319dfa2223f1678b3c6d506dee2

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyz2graph-3.4.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: xyz2graph-3.4.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20fc902541dee916b2ea248b7a6021456b2f489f3735c749858b9c9f81dd99f7
MD5 b9cd04bf1d9c400a80072a3eede75a5b
BLAKE2b-256 c3eef6665c5eb6e71d7a651640e0925e036358e9483e9f4bc5256870e1ed1a6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyz2graph-3.4.1-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