ReactionFlow finds reactions in molecular dynamics and computes their pathways. As a trajectory runs, ReactionFlow watches its bonds; when a bond forms or breaks and persists, the trajectory pauses at an exact checkpoint, refines the minimum-energy path with NEB and climbing-image NEB, and resumes from the same state. A barrier is recorded only when the band's highest image is a validated saddle with one negative-curvature mode connecting both ends. Dynamics and refinement use the same machine-learned interatomic potential (MLIP), from four built-in model families or any ASE calculator.
For reactions too rare to observe in MD, ReactionFlow also runs adaptive kinetic Monte Carlo with EON, searching for saddles out of each state and stepping between states by their harmonic transition-state rates.
git clone https://github.com/Austin243/ReactionFlow.git
cd ReactionFlow
python -m pip install .ReactionFlow needs Python 3.12 or newer. The core package depends only on ASE, NumPy, and NetworkX, and each model backend is installed separately (see Models).
examples/xtb runs 20 ps of malonaldehyde with two water molecules at
500 K, with GFN2-xTB as the potential. It needs no GPU and no model download, and it finishes in a
few minutes on one CPU core.
python -m pip install . tblite==0.7.0
OMP_NUM_THREADS=1 reactionflow run examples/xtb/campaign.json
reactionflow status examples/xtb/campaign.jsonEach time a proton moves between oxygens, the run pauses, refines that step, and continues.
status then lists the proton transfer as one reaction class, with every occurrence
saddle_validated and barriers near 0.15 eV.
reactionflow init campaign.json # write a campaign by answering questions
reactionflow validate campaign.json # check it without loading the model
reactionflow prepare campaign.json --install # install the model's backend, download its weights
reactionflow run campaign.json # run the trajectory; rerun the same command to resume
reactionflow status campaign.json # trajectories, reaction classes, and barriersA campaign is a single JSON file specifying the starting structure, model profiles, and
trajectories (temperature_K, pressure_GPa, length, and seed). Run one trajectory locally with
run --index N, or run an array under Slurm with srun reactionflow run campaign.json (one task
and GPU per trajectory; answer "no" to GPUs in init for CPU runs). Setting pressure_GPa to a
number runs NPT and refines enthalpy barriers with variable-cell SSNEB; null runs NVT with
ordinary NEB.
Each trajectory stores its frames, detected occurrences, refinements, and reactions.sqlite3
index under output_root/<trajectory-id>/. Published results are never overwritten, and
resubmitted jobs resume from the last exact checkpoint. Set "refine_after_md": true to queue
events until MD finishes (when barriers are refined);
individual refinements stop after max_hours_per_barrier hours (default 4, recording time_limit)
so one slow band cannot stall a trajectory
(time limit per barrier).
Additional commands for standalone refinement and analysis:
reactionflow band— refine one known reactant–product pair without MD at any chosen--pressure(refining a known step).reactionflow check— run the saddle curvature and connectivity check on any band from ReactionFlow or another code and report residual forces (CLI reference).reactionflow scan— replay saved frames offline through bond detection with the run's settings or new ones to tabulate bond changes and species (offline scan).reactionflow export-electrace— export a refined band as VASP frame folders and an ElecTrace configuration for electronic-structure analysis (electronic analysis).
MACE, UMA, AIMNet2, and ANI-1xnr are built in. reactionflow models lists their models, heads, and
tasks, and reactionflow prepare --install installs the backend a campaign names and downloads
its weights. Some backends pin conflicting versions of e3nn or Torch and need separate
environments (models guide).
Any other model with an ASE calculator runs through the generic adapter, with a profile like this one. The models guide has tested profiles for ORB, MatterSim, CHGNet, SevenNet, and NEP89.
"my-model": {
"factory": "reactionflow.adapters.ase:create_adapter",
"options": {
"calculator_factory": "my_package.calculators:MyCalculator",
"calculator_kwargs": {"model_path": "/abs/path/model.pt", "device": "cuda"},
"model_files": ["/abs/path/model.pt"],
"torch_device": "cuda"
}
}ReactionFlow calls calculator_factory with calculator_kwargs and records a hash of every file in
model_files in each checkpoint. torch_device turns on deterministic Torch inference, so that a
restarted trajectory continues exactly; leave it out for a model that does not use Torch.
An EON campaign sets "mode": "eon" and takes the same model profiles. EON runs on Linux x86_64.
This example uses an analytic two-atom potential and runs in seconds.
python -m pip install '.[eon]'
PYTHONPATH=examples/eon reactionflow run examples/eon/campaign.json
reactionflow status examples/eon/campaign.jsonWith "guide": {"form": ["C-N"], "break": ["C-H"]}, each search pushes one pair of the named
element types together or apart instead of moving atoms at random, and pairs can also be named by
atom ID. See the EON guide.
- How ReactionFlow works — walkthrough of bond detection, pathway refinement, reaction classes, EON aKMC, constant pressure, exact restart, and cluster execution
- Command-line reference — every command and option
- Campaigns — file format, multi-model campaigns, Slurm, and status
- Models — built-in backends, options, and environments
- EON mode
- Bond detection
- Candidate tracking
- Offline scan
- Reaction identity
- Occurrence store
- Pathway refinement
- Exact restart