Testing
Unit and integration tests
python -m pytest -q # ~5 s; skips everything if AmberTools isn't available
The fixtures are built per session in pytest’s tmp dir (tests/conftest.py): acetaminophen
(GAFF2 and GAFF) and 4-chlorobenzoate next to an ff14SB peptide. Charges are antechamber
-c gas for speed.
Area |
Tests |
|---|---|
Round trip and diff ⊆ parmchk2 |
|
Custom dihedral/LJ edits recovered exactly |
|
Auto-detect in a complex, charged-ligand bond orders |
|
HMR undo / |
|
Base auto-detect (gaff1) |
|
NetCDF trajectory and REMD-style rst7 input |
|
Reversed improper order, leap angle correction |
|
Error paths |
|
Validation is not vacuous |
|
When you fix a new real-world case, add a fixture that reproduces it. Items 3–5 in Amber and ParmEd behaviors were invisible on the synthetic systems until real RBFE/ABFE topologies exposed them.
Real-data sweep
python scripts/vcm_sweep.py path/to/ABFE /tmp/vcm_sweep # directory holding vcm_* jobs; ~10 min
scripts/vcm_sweep.py runs unleap over every
ABFE/vcm_*/results/.../t1_{complex,binder}_abfeproduction directory (its parm7 plus the λ=0
production rst7). It then rebuilds each job’s inputs/abfe/<L>/binder_<L>.* with tleap and
compares that to the extracted ligand with compare_terms() and
compare_energies().
That is the strongest end-to-end check available: it asks “is what we recovered what was put in?”,
not just “do our files reproduce the topology?”. It writes one directory per job and leg, plus
summary.json. It’s worth re-running after any change to frcmod.py or validate.py.
Last result: 52/52 topologies pass, and 46/46 with inputs are identical to their inputs.
Docs build
make -C docs html SPHINXOPTS=-W # warnings are errors