Metadata-Version: 2.4
Name: reacnet-md-tools
Version: 0.1.0
Summary: Helpers around reactive MD post-processing workflows (ReacNetGenerator).
Project-URL: Homepage, https://github.com/hcustc/reacnet-md-tools
Project-URL: Repository, https://github.com/hcustc/reacnet-md-tools
Author-email: hcustc <huangchen@mail.ustc.edu.cn>
License: MIT License
        
        Copyright (c) 2026 <YOUR NAME>
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: lammps,md,reacnetgenerator,reaction-network,reaxff
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == 'dev'
Description-Content-Type: text/markdown

# reacnet-md-tools

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

Design goals:
- minimal dependencies
- safe subprocess execution (no `shell=True`)
- clear, agent-friendly CLIs

## Install / run

### Run without installing (recommended)

```bash
uvx --from reacnet-md-tools rng-pipeline --help
```

### Install into an environment

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

## Commands

### `rng-xs2x`

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

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

Limitations: **orthorhombic boxes only** (triclinic tilt factors are rejected with an error).

### `rng-infer-atomnames`

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

```bash
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:

```bash
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 ...`

## Development

Build (wheel + sdist):

```bash
python -m pip install -U build
python -m build
```

## License

MIT (see `LICENSE`).
