PoreReax is a Python package for analysing and setting up reactive molecular dynamics workflows based on ReaxFF and LAMMPS. Features include:
- Sample and post-process trajectories with different samplers
- Angle distributions
- Charge distributions
- Bond length distributions
- Existing molecular structures
- Density of atoms, structures, bonds, and reactions
- Time evolution of structures, bonds, and reactions
- Radial distribution functions (RDFs)
- Plot sampled results with built-in plotting function
- Build simulation-ready LAMMPS input files from equilibrated GROMACS structures (
.gro) - Configure multi-stage ReaxFF workflows (for example NpT/NVT/NVE)
The idea of PoreReax analysis is to not focus on atoms or species, but rather on local structures. A structure is defined as a central atom or bond and their so called bonding environment. This allows to analyse very large structures and the existence of functional groups in a system.
PoreReax can be used standalone for reactive analysis or integrated into the study of confined systems, i.e. pores created with PoreMS.
Installation
PoreReax targets Python 3.12+ and is tested on Linux (x86_64) and macOS (arm64). The supported platforms require to run OVITO in combination with multiprocessing for analysis. Running the generated simulations requires a separate LAMMPS installation with the REAXFF package.
Direct installation from github:
python -m pip install git+https://github.com/ProkopK/PoreReax.git
Quickstart
1) Create a simulation workflow
To create a simulation from a GROMACS structure file (.gro), run the following code. This will generate system.data, run_0.lmp, run_0.job, and ana.py. Define your system matching to your .gro file and set a force field with set_force_field(). Run the simulation with LAMMPS and afterwards analyse the output with the ana.py script.
from porereax import Simulate
# Set up a dictionary to translate GRO atom types to ReaxFF
# atom types as well as masses and charges
gro_lib = {"OM": "O", "OW": "O", "Si": "Si", "HW": "H", "MW": ""}
gro_charges = {"OM": -0.64, "OW": -1.1128, "Si": 1.28, "HW": 0.5564}
atom_masses = {"Si": 28.086, "O": 15.9994, "H": 2.016}
# Create a simulation object
sim = Simulate(gro_lib, gro_charges, atom_masses, structure_file="system.gro")
sim.set_force_field("reax.ffield")
sim.add_sim(type="nvt", nsteps=10000, temp=300)
# Generate the simulation files
sim.generate()
2) Analyse simulation output
To run the analysis use the ana.py script generated in the previous step or run the following code. This code will sample the molecule structure, the Si-O-Si angle distribution and the 2D density of O-H bonds of water, and save the results in molecule_structure.obj, angle_Si-O-Si.obj and density_water_2d_yz.obj.
from porereax import Sample
atom_lib = {"Si": 1, "O": 2, "H": 3}
atom_masses = {"Si": 28.086, "O": 15.9994, "H": 2.016}
sampler = Sample(atom_lib, atom_masses, "run_0.lammpstrj", "run_0.bonds")
sampler.add_molecule_structure_sampling("molecule_structure")
sampler.add_angle_sampling(
"angle_Si-O-Si",
atoms=[{"atom": "O", "bonds": ["Si", "Si"]}],
)
sampler.add_bond_density_sampling(
name_out="density_water_2d_yz",
bonds=[
{"bond": "H-O", "bonds_B": ["H"]},
],
dimension="Cartesian2D",
direction="yz",
)
sampler.sample()
3) Visualise results
To plot the results, run the following code to plot the results of the previous step.
from porereax import plot_data
plot_data("molecule_structure.obj")
plot_data("angle_Si-O-Si.obj")
plot_data("density_water_2d_yz.obj")
Usage
A detailed usage guide can be found in the documentation. It gives further information on
Citation
If you use PoreReax in your research, please cite it using the metadata in CITATION.cff (GitHub's "Cite this repository" button).
License
This project is licensed under GPL-3.0-only.
Metadata
Release files for porereax 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| porereax-0.1.0.tar.gz | 72.9 kB | With provenance | Details for porereax-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| porereax-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for porereax-0.1.0-py3-none-any.whl |
Total release size: 145.2 kB
Release files / porereax-0.1.0.tar.gz
| Download URL | porereax-0.1.0.tar.gz |
|---|---|
| Size | 72.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ca5322d9ba1a9a3c9dca52d4faa94ee2a150da7e7d8e262093c4f63f8732d1b
|
|
BLAKE2b-256 checksum How to use checksums |
3cd072c0423869949ba1155e036ee78925d99455f01553f0a3287c41e6f00970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logRelease files / porereax-0.1.0-py3-none-any.whl
| Download URL | porereax-0.1.0-py3-none-any.whl |
|---|---|
| Size | 72.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
707feb77d773f89bef589d57c8beaf5350154da02b82dc148d2d99b99e6fa10e
|
|
BLAKE2b-256 checksum How to use checksums |
a20577c8ae6267e30ab59617c99b39518278941776c4532f2425ea15a5cd50cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logSecurity for porereax 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for porereax-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.