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

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.3.2.tar.gz (1.5 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.3.2-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xyz2graph-3.3.2.tar.gz
Algorithm Hash digest
SHA256 3b70cb8327e34d942d461c8b58eb0d8576e291584c33fc6eabb389406ae6751c
MD5 ad473c078b7ab29ad71a0201b5899db0
BLAKE2b-256 096f110b326e7283a0161b695a58f58f807636987f5591cfe6b7b199ba5aff34

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: xyz2graph-3.3.2-py3-none-any.whl
  • Upload date:
  • Size: 20.2 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 082faea43985002e2ebce76d75ddedad53cde6ae4a6f0ec72c3db10ef36985a0
MD5 570307f337c3b7a702fadd200225ad1b
BLAKE2b-256 f628d1e7cbc5632463450b401b9720ac6c3f7e41c294773581e8649651ab56be

See more details on using hashes here.

Provenance

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