sp¶
pdb2reaction sp evaluates the MLIP energy and atomic forces (optionally a Hessian) at a single geometry. Use it for a quick energy / forces / Hessian sanity check on a structure before running an optimization, for comparing backends head-to-head, or for generating reference values and Hessians outside the optimizer loop.
Examples¶
Command form:
pdb2reaction sp -i FILE [-q INT | -l 'RES:Q,...'] [-m INT] [-b uma|orb|mace|aimnet2] [--hess] [options]
Energy + forces (UMA backend, neutral closed-shell):
# energy + forces (UMA backend, neutral closed-shell)
pdb2reaction sp -i structure.pdb -q 0 -m 1
Also compute the full Hessian (finite differences are used by default for every backend):
# also compute the full Hessian (FiniteDifference by default)
pdb2reaction sp -i structure.pdb -q 0 -m 1 --hess
Outputs¶
sp writes its outputs under result_sp/ by default. After a successful
calculation, the scalar energy and |force|_max are printed to stdout and
forces.npy (plus hessian.npy with --hess) is written there.
file |
contents |
written |
|---|---|---|
stdout |
scalar energy (a.u.) and ` |
force |
|
|
successful calculation |
|
mass-unweighted Hessian (Hartree / Bohr²): |
only with |
|
machine-readable energy (a.u.), backend, charge/spin, paths to npy outputs, elapsed time |
only with |
sp writes no human-readable summary.log.
Hessian backend¶
When --hess is set, --hessian-calc-mode selects the Hessian computation strategy:
Every backend uses
FiniteDifferenceby default.Pass
--hessian-calc-mode Analyticalto use a supported backend’s autograd path explicitly.
UMA, ORB, MACE, and AIMNet2 all implement analytical Hessians. Use --hessian-calc-mode Analytical to request one explicitly, or force FiniteDifference for a numerical cross-check. With UMA, workers > 1 cannot be combined with an explicit analytical Hessian request and raises an error; use workers = 1 or finite differences.
CLI options¶
The full flag list is in the generated command reference; the table below covers the options that need explanation.
flag |
default |
meaning |
|---|---|---|
|
— |
PDB / mmCIF / XYZ / GJF structure file (required) |
|
— |
total charge; alternatively derive it with |
|
— |
per-residue charge mapping (e.g. |
|
|
spin multiplicity, 2S+1 (optional; defaults to 1. GJF inherits the template) |
|
|
MLIP backend selection |
|
|
also compute and write |
|
|
select the Hessian mode (only applies with |
|
|
output directory |
|
backend-dependent |
numeric precision passed to the backend |
|
— |
YAML config providing |
|
|
also write a machine-readable |
|
off |
print effective merged config / validate without running |
Run pdb2reaction sp --help-advanced for the full option list.
Notes¶
sphas no freeze CLI flag, but honors the 1-based YAMLgeom.freeze_atomslist. Frozen forces are zeroed by the backend geometry contract and--hesswrites the active partial-Hessian block by default.For single-point DFT (gpu4pyscf / PySCF) benchmarking use
dftinstead.