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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xyz2graph-3.4.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b02e84fdc78fef9ef43f0ef8fa0adcdf9e1592fca6956ad47f346c4243e052aa
MD5 3b3b5cc1ce7ed6ef831ac6a9e1ba67a3
BLAKE2b-256 84a29fec1e0b6a53c46ff73ffb0fe96e3d9dc14dc76c41c75fa17328fbff1b44

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: xyz2graph-3.4.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b936665d0278c651aa9944ef173efe70dd93ab31f03fef1d841234318ce13ef3
MD5 8b22480edb5b93b3be5346da83bed2ef
BLAKE2b-256 79c748a8cc76b74b014ae407d268e8cc8063b6597f12c6133d82db9118115d07

See more details on using hashes here.

Provenance

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