graphatoms
The Chemical Core Class for Graph Theory Analysis.
Overview
The graphatoms is a Python library designed for chemical graph theory analysis. It provides core classes for representing chemical systems and reactions with graph-based data structures.
Features
- Graph-based Chemical System Representation: Represent chemical systems, clusters, and gas molecules using graph theory
- Reaction Modeling: Support for reaction classes, KMC (Kinetic Monte Carlo) events, and MC (Monte Carlo) moves
- Geometry Operations: Bond lists, distance calculations, neighbor lists, rotations, MIC (Minimum Image Convention), and sampling
- Data Storage: Support for HDF5 and SQLite databases for efficient data persistence
- Dataclasses: Pydantic-based data models for type-safe data handling
- Array API Compatibility: Full support for array API standard for cross-framework compatibility (NumPy, PyTorch, JAX, CuPy, etc.)
- Subgraph Operations: Backend-agnostic subgraph extraction with relabeling support using array-api-compat and array-api-extra
Module Structure
src/graphatoms/
├── arrayapi/ # Array API compatibility layer
├── dataclasses/ # Pydantic-based data models
├── geometry/ # Geometric operations
├── reaction/ # Reaction classes and KMC events
│ ├── base/ # Abstract base classes
│ ├── event/ # KMC events (adsorption, desorption, reaction)
│ ├── mcmove/ # Monte Carlo moves
│ ├── mdwarpper/ # MD wrapper
│ └── network/ # Reaction network
├── system/ # Core system classes
│ ├── atoms/ # Atomic structure handling
│ ├── database/ # Database storage backends
│ └── graph/ # Graph-based system representation
└── utils/ # Utility functions
└── subgraph.py # Array API compatible subgraph operations
Requirements
- Python >= 3.12
- ase
- pymatgen > 2023.6
- rdkit >= 2025
- scikit-learn >= 1.5
- array-api-compat >= 1.15.0
- array-api-extra >= 0.11.0
- pyarrow
- igraph >= 0.11
- h5py >= 3.16
- hydra-core
- numpy >= 2.0.0
- numpydantic
- ovld
- pydantic >= 2.10
- python-snappy >= 0.7.3
- loguru
Installation
pip install graphatoms
Or with conda:
conda install -c conda-forge graphatoms
Development
For development setup with pixi:
pixi install
pixi run test
Running Tests
Run all tests
pytest src/tests/ -v
Run benchmark tests
pytest src/tests-benchmark/ -v
Array API Compatibility
The library leverages array-api-compat and array-api-extra for backend-agnostic array operations. Key utilities include:
subgraph(): Extracts induced subgraphs from edge indicesmap_index(): Maps indices across arraysindex_to_mask(): Converts index arrays to boolean masksmaybe_num_nodes(): Determines the number of nodes from edge indices
These functions work seamlessly with NumPy, PyTorch, JAX, and other array API compliant libraries.
License
GPL-3.0-or-later
Authors
- LiuGaoyong (liugaoyong_88@163.com)
Links
- Homepage: https://github.com/LiuGaoyong/GraphAtoms
- Repository: https://github.com/LiuGaoyong/GraphAtoms
- Issues: https://github.com/LiuGaoyong/GraphAtoms/issues/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphatoms-1.2.0.tar.gz.
File metadata
- Download URL: graphatoms-1.2.0.tar.gz
- Upload date:
- Size: 169.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fe29ff252aba8cfd9d1fc786b2c26d7665f5c38d0ce9b052966c830bdaf5d6c
|
|
| MD5 |
71e4a8cd20f3abfc2e22335a6f14cb32
|
|
| BLAKE2b-256 |
c41a2565a2badb29d1f8b6b9d5f889585110f138f4e8238ecb8f0e10ba6cd7b4
|
Provenance
The following attestation bundles were made for graphatoms-1.2.0.tar.gz:
Publisher:
publish.yml on LiuGaoyong/GraphAtoms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graphatoms-1.2.0.tar.gz -
Subject digest:
4fe29ff252aba8cfd9d1fc786b2c26d7665f5c38d0ce9b052966c830bdaf5d6c - Sigstore transparency entry: 2044666742
- Sigstore integration time:
-
Permalink:
LiuGaoyong/GraphAtoms@140ca8b09edd2def89005bd4eee6d1158fd12f4f -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/LiuGaoyong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@140ca8b09edd2def89005bd4eee6d1158fd12f4f -
Trigger Event:
push
-
Statement type:
File details
Details for the file graphatoms-1.2.0-py3-none-any.whl.
File metadata
- Download URL: graphatoms-1.2.0-py3-none-any.whl
- Upload date:
- Size: 194.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
380bd176d29226a7981e35cfe6b8e35c55208d04f214af8136e5edd2860cd92c
|
|
| MD5 |
d95ba64f56c829ab20a7e212871eb549
|
|
| BLAKE2b-256 |
6e4dc0fb6d9552362aec8b38c735ee7838f22899d59edc3d8db89864e2607330
|
Provenance
The following attestation bundles were made for graphatoms-1.2.0-py3-none-any.whl:
Publisher:
publish.yml on LiuGaoyong/GraphAtoms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graphatoms-1.2.0-py3-none-any.whl -
Subject digest:
380bd176d29226a7981e35cfe6b8e35c55208d04f214af8136e5edd2860cd92c - Sigstore transparency entry: 2044666783
- Sigstore integration time:
-
Permalink:
LiuGaoyong/GraphAtoms@140ca8b09edd2def89005bd4eee6d1158fd12f4f -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/LiuGaoyong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@140ca8b09edd2def89005bd4eee6d1158fd12f4f -
Trigger Event:
push
-
Statement type: