Skip to main content

Helpers around reactive MD post-processing workflows (ReacNetGenerator).

Project description

reacnet-md-tools

Small, dependency-light helpers around reactive MD post-processing workflows, built to make ReacNetGenerator runs more repeatable.

Design goals:

  • minimal dependencies for the core pipeline
  • safe subprocess execution (no shell=True)
  • clear, agent-friendly CLIs
  • packaged analysis helpers that can be called directly from Agent Skills

Package layout

Reusable code now lives inside the installable package:

  • src/reacnet_md_tools/
    • core CLIs: pipeline.py, xs2x.py, infer_atomnames.py
    • analysis/query CLI: query_cli.py
    • reusable analysis modules: rng_tools/
    • lightweight browser backend: webapp/

For automation and skills, prefer the packaged entry points below.

Install / run

Run without installing (recommended)

uvx --from reacnet-md-tools rng-pipeline --help
uvx --from reacnet-md-tools rng-query --help

Install into an environment

python -m pip install -U reacnet-md-tools

Optional analysis extras for richer query/web workflows:

python -m pip install -U 'reacnet-md-tools[analysis]'

Commands

rng-xs2x

Convert a LAMMPS dump with scaled coordinates xs/ys/zs into absolute coordinates x/y/z.

rng-xs2x -i in.lammpstrj -o out.lammpstrj

Current packaged converter supports orthorhombic boxes in the standalone CLI.

rng-infer-atomnames

Infer reacnetgenerator -a atomname order from a LAMMPS data file by parsing the Masses section and matching masses to common elements.

rng-infer-atomnames path/to/system.data
# -> e.g. "C H O Cl"

rng-pipeline

End-to-end helper:

  1. If the input is a LAMMPS dump and uses xs/ys/zs, convert it to x/y/z into out/<basename>/dump_with_xyz.lammpstrj.
  2. If --atomnames is not provided, try to infer them from a nearby LAMMPS data file (or ask you to pick one with --pick-data).
  3. Run ReacNetGenerator, writing everything into out/<basename>/.

Example:

rng-pipeline \
  --input /path/to/traj.lammpstrj \
  --type dump \
  --outroot out \
  --pick-data \
  --stepinterval 10 \
  --maxspecies 50

ReacNetGenerator runner selection

  • default --runner auto:
    • use local reacnetgenerator if found on PATH
    • otherwise run via: uvx --from reacnetgenerator reacnetgenerator ...

rng-query

Unified CLI for post-analysis on .reactionabcd / .species outputs.

Typical uses:

rng-query species --reac path/to/run.reactionabcd --formula C6H6
rng-query next --reac path/to/run.reactionabcd --smiles '[H][H]'
rng-query rxn-formula --reac path/to/run.reactionabcd --reactants C6H6 --products C6H5+H

rng-webapp

Launch the lightweight local browser backend for interactive exploration of reaction datasets.

rng-webapp --reac path/to/run.reactionabcd --host 127.0.0.1 --port 8000

For Agent Skills / automation

Prefer these stable commands:

  • rng-pipeline for generating outputs from trajectories
  • rng-query for species / reaction / pathway / CSV summary queries
  • rng-webapp only when the user explicitly wants an interactive local browser UI

Preferred import surface for Python code:

from reacnet_md_tools.rng_tools.network import ReactionNetwork, parse_reactionabcd
from reacnet_md_tools.rng_tools.reaction import parse_species_file

Development

Build (wheel + sdist):

python -m pip install -U build
python -m build

Run tests:

python -m pip install -U '.[dev]'
pytest

Publishing

This package is intended to be published from GitHub Actions via PyPI Trusted Publishing.

Typical release flow:

  1. Push commits to GitHub
  2. Create a version tag such as v0.1.5
  3. Let the GitHub Actions publish workflow build and upload to PyPI
  4. Install/run with uvx --from reacnet-md-tools ...

License

MIT (see LICENSE).

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

reacnet_md_tools-0.1.5.tar.gz (81.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reacnet_md_tools-0.1.5-py3-none-any.whl (78.4 kB view details)

Uploaded Python 3

File details

Details for the file reacnet_md_tools-0.1.5.tar.gz.

File metadata

  • Download URL: reacnet_md_tools-0.1.5.tar.gz
  • Upload date:
  • Size: 81.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reacnet_md_tools-0.1.5.tar.gz
Algorithm Hash digest
SHA256 dff0132c296fab4dbadd9c5fc2cea5dc22ec467a81a05386d8d20ca2cb0161ce
MD5 44eb7f5079dfc3f82acf3a9a4680a816
BLAKE2b-256 4825d499cadca4d7530de432a563aa247d07dafcef8f193ea0f0c2f63e7b33e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for reacnet_md_tools-0.1.5.tar.gz:

Publisher: publish.yml on hcustc/reacnet-md-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reacnet_md_tools-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for reacnet_md_tools-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 431de8b13ab8336d23a199b6f0d6093abf626d628c50940c32a6c13ee72c74ad
MD5 29d2decce2fd59d6eea1e6b83921c09f
BLAKE2b-256 961d2532490d7e2f6df97ce68c3a7588943c8c984bfae179042f264ed1f49d3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for reacnet_md_tools-0.1.5-py3-none-any.whl:

Publisher: publish.yml on hcustc/reacnet-md-tools

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