Popcornn
Popcornn is a tool for finding how a chemical reaction gets from a starting structure (the reactant) to an ending structure (the product). Given those two structures, popcornn fits a smooth path between them and then bends that path until it crosses the lowest-energy barrier the chosen energy model can find.
The energy model can be a simple analytic toy (Wolfe, Müller–Brown), a classical force field, or a modern machine-learned interatomic potential (MACE, Orb, UMA, …). The path itself is represented by a small neural network, so the whole thing is differentiable and trains by gradient descent.
If "lowest-energy barrier" sounds unfamiliar, that's fine — see
docs/concepts.md for a one-page background.
Installation
conda create --name popcornn python=3.12
conda activate popcornn
git clone https://github.com/khegazy/popcornn.git
pip install -e ./popcornn
The pip install step takes about 2.5 min: 153 s and 158 s in two runs
on a NERSC Perlmutter node (2026-11-25), each in a fresh Python 3.12
environment with pip's cache off. It downloads 137 packages, mostly
PyTorch with its CUDA libraries and fairchem-core, and the
environment then takes 6.1 GB. On a slower network it takes longer.
That gets you everything you need for the analytic potentials. Each
machine-learned potential (MACE, Orb, UMA, …) has its own install steps —
see docs/potentials.md.
Examples
The shipped configs in examples/configs/ go from analytic 2D toys
to a published organic-chemistry benchmark. Run any of them from the
examples/ directory with
python run.py --config configs/<name>.yaml
| Config | What it is | Needs | Runtime* |
|---|---|---|---|
wolfe.yaml |
2D Wolfe–Schlegel analytic surface | nothing beyond the base install | 21 s (opt. 3.5 s, 108 iterations) |
muller_brown.yaml |
2D Müller–Brown analytic surface | nothing beyond the base install | 18 s (opt. 7.2 s, 192 iterations) |
loss_example.yaml |
Wolfe–Schlegel with the pvre and vre integrands combined |
nothing beyond the base install | 26 s (opt. 9.9 s, 186 iterations) |
lj13.yaml |
13-atom Lennard–Jones cluster rearrangement | nothing beyond the base install | 24 s (opt. 11.2 s, 171 iterations) |
gg3.yaml |
a Grambow–Green organic reaction (3rd entry of the GG benchmark set) | GPU + the UMA model installed (see docs/potentials.md) |
12.6 min† (opt. 3.4 s repel stage, 49 iterations; 12.0 min UMA stage, 142 iterations) |
*Wall time of python run.py --config configs/<name>.yaml on one
NVIDIA A100-SXM4-80GB (NERSC Perlmutter GPU node), popcornn 0.4.0 with
padaquad 2.0.0, measured 2026-11-26. About 11–18 s of each run is spent
outside the optimization stages (start-up such as imports and CUDA
initialization, and writing the output). "opt."
is the optimization time of the stages and the number of iterations
until the convergence threshold was met. Every run stopped at its
threshold, so the iteration counts, and the times,
depend on the seed and the machine: over seeds 0–9 on a CPU,
Müller–Brown took 48 to 504 iterations to the same barrier (see
"Known issues" under 0.4.0 in the CHANGELOG). †Timed without imports or writing
the output (the Popcornn constructor and optimize_path only).
Each run writes the optimized path and predicted transition state to
popcornn_path.xyz / popcornn_ts.xyz; the second is not written when the
path has no transition state. To swap in your own reaction,
point images: in the config at an xyz or traj file with at least
the reactant and product structures. The
Getting Started guide walks through this
from scratch.
Where to go next
- Getting Started — install through first custom run.
- Concepts — what a reaction path is, what the transition state is, why a neural network represents the path.
- Configuration reference — every key in the YAML config.
- Potentials — what's built in and how to install the MLIPs.
- Convergence — picking
thresholdandpatiencefor your system. - Memory & OOM — what to do if you run out of GPU memory.
- Advanced — multi-stage optimization, schedulers, transition-state losses.
Citing
If you use popcornn in your research, please cite this repository. A citable release is on the way; until then, link to the GitHub repo.
Support and contributing
Popcornn is under active development. Open a GitHub issue for bugs or questions, and pull requests are welcome.
Before your first commit, install the development tools and the git hook that lints and formats your changes with ruff on every commit:
pip install -e "./popcornn[dev]"
cd popcornn && pre-commit install
git config blame.ignoreRevsFile .git-blame-ignore-revs # git blame skips formatting-only commits
To check the whole repository by hand, run pre-commit run --all-files.
Metadata
Release files for popcornn 0.6.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 |
|---|---|---|---|---|
| popcornn-0.6.0.tar.gz | 136.2 kB | With provenance | Details for popcornn-0.6.0.tar.gz |
Release files / popcornn-0.6.0.tar.gz
| Download URL | popcornn-0.6.0.tar.gz |
|---|---|
| Size | 136.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57f0108d0703bb0cd9b9d0573fb7686fc9ce186e0cb965932642d7da0861098b
|
|
BLAKE2b-256 checksum How to use checksums |
c15ea8bd01b639ca04a4e8a12d8eceefeee33ff2c2cc470a04757d00e0926173
|
| 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 Dec 1, 2026.
Transparency logSecurity for popcornn 0.6.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
1 file in this release has been uploaded with provenance metadata.
Attestation for popcornn-0.6.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 Dec 1, 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.