all¶
pdb2reaction all runs the workflow end-to-end from PDB/mmCIF/XYZ/GJF.
mmCIF and oversized PDB inputs are converted to a safely reindexed internal
PDB; coordinate outputs also include CIF with the original identifiers.
all runs in one of three modes, chosen by what you pass:
Multi-structure MEP (
[mode] all (mep)) — give ≥ 2 structures in reaction order. With-c,allfirst extracts active-site models; without it, the full supplied structures are used. It then runs GSM / DMF MEP search and optionally runs TSOPT + IRC / freq / DFT per reactive segment. For extracted PDB/mmCIF input,--refine-path --write-ref-mergeadditionally writes a coordinate composite for inspection.Single-structure scan-defined workflow (
[mode] all (scan-lists)) — give one structure plus one or more--scan-lists/-sliterals. One literal defines one stage; several tuples inside it are advanced concertedly. The stage endpoints form the ordered input series for the MEP step.TSOPT-only — give a single input and set
--tsopt(no--scan-lists).allskips the MEP / merge stages, runstsopt+ EulerPC IRC on the active-site model (or the full input if extraction is skipped), and identifies the higher-energy endpoint as the reactant.
Note
The TSOPT-only reactant/product labels follow an energy-order presentation convention, not a chemically established reaction direction: the higher-energy IRC endpoint is presented as the reactant (on an exact energy tie the left endpoint is the reactant). The R/P labels, reactant_irc/product_irc filenames, barrier and delta are computed under this convention. The machine-readable summary records it explicitly under endpoint_assignment (policy = "higher_energy_endpoint_as_reactant", chemical_direction_known = false); read that field and do not infer chemical direction from the labels alone.
Important
Without --tsopt, the workflow produces TS candidates (highest-energy images from MEP search). Adding --tsopt refines them and performs terminal exact-PHVA validation. Numerical optimizer convergence and saddle order are reported separately. all proceeds to IRC only when optimization converged, terminal PHVA completed, and a negative reaction direction is available. A converged higher-order stationary point (n_imag > 1) may be followed by diagnostic IRC with an explicit warning, but it is not certified as a first-order TS. Actual optimizer non-convergence, no imaginary mode, failed/unavailable PHVA, or no valid negative root stops the pipeline after preserving the TS artifacts and before IRC. Always inspect the imaginary modes and IRC endpoint connectivity before mechanistic interpretation.
Examples¶
Working examples for GPP C6-methyltransferase BezA (Tsutsumi et al., Angew. Chem. Int. Ed. 2022, 61, e202111217) covering both multi-structure MEP and scan-based pipelines: examples/.
Command form:
pdb2reaction all -i INPUT1 [INPUT2 ...] [-c SUBSTRATE] [-b uma|orb|mace|aimnet2] [options]
Multi-structure MEP with TS + thermo + DFT:
# Multi-structure MEP with TS + thermo + DFT
pdb2reaction all -i 1.R.pdb 3.P.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' \
--tsopt --thermo --dft --out-dir ./result_mep
Single-structure staged scan (two stages):
# Single-structure staged scan (two stages)
pdb2reaction all -i 1.R.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' \
-s '[("CS1 SAM 320","GPP 321 C7",1.60)]' '[("GPP 321 H11","GLU 186 OE2",0.90)]' \
--tsopt --thermo --out-dir ./result_scan
TSOPT-only validation of a single TS candidate:
# TSOPT-only validation of a single TS candidate
pdb2reaction all -i TS_candidate.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' \
--tsopt --thermo --dft
PDB / CIF / GJF companion files are generated automatically when reference templates are available; CIF is emitted for mmCIF/oversized-PDB bridge inputs. Control with --convert-files (on by default).
pdb2reaction all --help shows core options; pdb2reaction all --help-advanced shows the full option list.
Workflow¶
Full system(s) (PDB / mmCIF / XYZ / GJF)
├─ (optional) active-site extraction `extract` — requires PDB/mmCIF when `-c` is used
│ └─ active-site cluster model(s)
│ ├─ (optional) staged scan `scan` — single-structure workflows
│ │ └─ ordered intermediates
│ └─ MEP search `path-opt` (default) or `path-search` (recursive, `--refine-path`)
│ └─ MEP trajectory `mep_trj.xyz` + energy diagrams
└─ (optional) TS optimization + IRC `tsopt` → `irc`
├─ (optional) thermochemistry `freq`
└─ (optional) single-point DFT `dft`
all runs the following stages in order. Stages 0 and 1 are automatic preprocessing; the rest fire based on the flags you pass.
Structure bridge and preflight (automatic) — mmCIF, oversized/nonstandard PDB, and PDB altloc input are converted once to a safely reindexed internal PDB; altloc is selected coherently per residue. For an ordinary PDB with blank element columns,
allrunsadd-elem-info. Standalonefix-altlocis only needed when you want a cleaned PDB deliverable; standalone commands use the same bridge. Missing element data must still be repaired for an ordinary PDB or supplied as mmCIF_atom_site.type_symbol.Active-site model extraction (when
-c/--centeris set) — accepts PDB/mmCIF paths, IDs/names,CHAIN:RESNAME, andCHAIN:RESNAME:RESSEQ. Per-input internal PDBs are saved under<out-dir>/_work/models/; bridge inputs also produce CIF companions.Optional staged scan (single-input only) — each
--scan-lists/-sliteral is a list of(i, j, target_Å)tuples. Atom indices use the original input ordering, 1-based by default (pass--no-scan-one-basedto interpret them as 0-based), and are remapped to the active-site model ordering. Three-field selectors like'TYR,285,CA'are order-flexible; use positionalCHAIN:RESNAME:RESSEQ[ICODE]:ATOMfor repeated names or numbering. Stages run sequentially (stage 2 starts from stage 1’s result), and the stage endpoints become the ordered intermediates that feed the MEP step.MEP search — by default runs single-pass
path-opt;--refine-pathswitches to recursivepath-search. Recursive refinement can improve a poor HEI but can also split a noisy/bad path into unnecessary segments and increase cost, so it is off by default. Segmentation is only a candidate mechanism until TS/frequency/IRC validation. Raw engine output stays under_work;mep.pdb, bridge-inputmep.cif,mep_trj.xyz, and the diagram are promoted to the top level.Full-system coordinate composite for inspection (optional) — with PDB/mmCIF input and
-c/--center,--refine-path --write-ref-mergewritesmep_w_ref.pdb; per-segment equivalents remain under_work/path_search/.Per-segment post-processing (reactive segments only — bridge segments without bond changes are skipped):
--tsopt— TS optimization on each HEI active-site model. The terminal result separatesoptimization_statusfromsaddle_validation. Numerical non-convergence, zero imaginary modes, failed/unavailable terminal PHVA, or inability to select a negative root stops after the TS geometry and result fields are registered and before IRC; frequencies and modes are present only when terminal PHVA completes. A numerically converged higher-order stationary point is retained and may continue through warning-labeled diagnostic IRC; this does not certify a first-order TS. For Hessian TS optimizers, the MEP’s energy-upwinding Cartesian tangent candidates are passed through a CPU/file cache to guide reaction-root identity (legacy paths without readable energies use normalized secants). Dimer does not consume--ref-mode, so the handoff/cache is marked not applicable. With--no-tsopt-from-mep-tan, TSOPT selects its initial root from the initial-structure Hessian modes. A continued result is followed by EulerPC IRC and IRC-endpoint re-optimization with--thresh-post(defaultbaker). The endpoint optimization working directory is retained with--dumpand otherwise removed after completion. Endpoint RFO uphill rejection is disabled by default; pass--reject-uphillto enable it for endpoint re-optimization only.--thermo—freqon (R, TS, P) for vibrational + thermochemistry data and an MLIP Gibbs diagram.--dft— single-point DFT on (R, TS, P) and a DFT diagram. With--thermo, a DFT//MLIP Gibbs diagram (DFT energies + MLIP thermal correction) is also produced.Shared overrides:
--opt-mode,--opt-mode-post,--flatten,--hessian-calc-mode,--tsopt-max-cycles,--tsopt-out-dir,--freq-*,--dft-*,--dft-engine(GPU-first by default). Frozen-boundary PHVA always uses the constrained rigid-mode treatment; it is unrelated to the MEP-derived--ref-mode. For Hessian evaluation modes see Hessian evaluation mode.
TSOPT-only mode (single input +
--tsopt, no--scan-lists) — skips MEP / merge; runstsopt+ EulerPC IRC and generates the same energy diagrams plus optional freq / DFT outputs.
Outputs¶
The tree has three top-level zones: deliverables at the root, per-segment deliverables under segments/seg_NN/, and pipeline scratch under _work/ (safe to rm -rf once you have the results you need).
out_dir/ (default: ./result_all/)
├─ summary.log # Text summary (authored at the root)
├─ summary.json # JSON results
├─ mep.pdb # Concatenated MEP path (promoted from the engine)
├─ mep.cif # Bridge inputs only; original identifiers restored
├─ mep_w_ref.pdb # Coordinate composite for inspection (--write-ref-merge)
├─ mep_w_ref.cif # Bridge-template companion (--write-ref-merge)
├─ mep_trj.xyz # Full MEP trajectory
├─ energy_diagram_MEP.png # All-segment MEP barriers
├─ energy_diagram_*.png # Aggregated post-processing diagrams (MLIP / Gibbs / DFT, with --tsopt etc.)
├─ segments/ # Per-reactive-segment deliverables (bridge segments are skipped)
│ └─ seg_NN/ # 2-digit index, e.g. seg_01, seg_02
│ ├─ reactant.{pdb,cif,xyz,gjf} # Canonical R/TS/P; bridge inputs write PDB + CIF
│ ├─ ts.{pdb,cif,xyz,gjf}
│ ├─ product.{pdb,cif,xyz,gjf}
│ ├─ ts/ # TS optimization output + vibrational analysis (--tsopt)
│ ├─ irc/ # IRC trajectories + plots (--tsopt)
│ ├─ freq/{R,TS,P}/ # frequencies_cm-1.txt + thermoanalysis.yaml (--thermo)
│ └─ dft/ # DFT single-point results (--dft)
└─ _work/ # Pipeline scratch (safe to delete)
├─ models/ # Extracted active-site model PDBs (model_<input_stem>.pdb, when extraction runs)
├─ scan/ # Staged scan results (with --scan-lists)
├─ add_elem_info/ # Preflight element-symbol fills
└─ path_opt/ # Raw MEP-engine output (path_search/ with --refine-path)
In TSOPT-only mode (single input + --tsopt, no --scan-lists) there is no MEP stage: the optimized R/TS/P plus ts/, irc/, freq/, and dft/ land directly under segments/seg_01/, and the MEP work directory (_work/path_opt/) is absent.
Note
The canonical structures are segments/seg_NN/reactant.*, ts.*, product.* — cite these when reporting mechanisms. The ts/, irc/, freq/, and dft/ subdirectories inside the same seg_NN/ hold the per-stage working files (e.g. ts/vib/imag_*_trj.xyz, irc/*_trj.xyz) for debugging a single stage. The raw MEP-search engine output under _work/path_opt/ is scratch — the products you need (mep.pdb, bridge-input mep.cif, mep_trj.xyz, energy_diagram_MEP.png) are already promoted to the root.
At -v 2 the console summarizes active-site charge resolution, scan stages,
MEP progress (GSM / DMF), and per-stage timing. Resolved configuration details
are shown at -v 3; see Verbosity levels.
Plot file naming¶
Energy-diagram filenames encode method and scope:
File |
Generated when |
Content |
|---|---|---|
|
|
All-segment MEP barriers (raw GSM / DMF values) |
|
per-segment |
R → TS → P (MLIP energy) |
|
per-segment thermo completes |
R → TS → P (MLIP Gibbs) |
|
per-segment DFT completes |
R → TS → P (DFT energy) |
|
per-segment DFT + thermo |
R → TS → P (DFT energy + MLIP thermal correction) |
|
all segments aggregated (variants for MLIP / Gibbs / DFT / DFT//MLIP Gibbs) |
Combined across all segments |
|
per-segment IRC completes |
IRC profile (MLIP energy along the trajectory) |
|
all segments aggregated |
IRC profiles concatenated across segments |
Reading summary.log¶
The header identifies the all entry route as MEP, Scan, or TS-only and
prints the absolute root output directory and, for MEP / Scan, the absolute
internal path module directory (TS-only reports -). Internal engine names
such as path-opt / path-search
remain machine-readable metadata rather than the user-facing pipeline mode.
The log is organized into numbered sections:
[1] Global MEP overview — image / segment counts, MEP trajectory plot paths, aggregate MEP energy diagram.
[2] Segment-level MEP summary (MLIP path) — per-segment barriers (ΔE‡), reaction energies (ΔE), bond-change summaries.
[3] Per-segment post-processing (TSOPT / Thermo / DFT) — TS imaginary-frequency checks, IRC outputs, MLIP / thermo / DFT energy tables.
[4] Energy diagrams (overview) — diagram tables for MEP / MLIP / Gibbs / DFT plus an optional cross-method summary.
[5] Output directory structure — a compact tree of generated files with inline annotations.
Reading summary.json¶
Top-level keys: out_dir, n_images, n_segments (run metadata and counts); segments (per-segment entries with index, tag, kind, barrier_kcal, delta_kcal, bond_changes); energy_diagrams (optional payloads with labels, energies_kcal, energies_au, ylabel, image paths). summary.json intentionally omits the formatted tables and filesystem tree from summary.log.
CLI options¶
Defaults shown are used when the option is not specified. The full flag list is in the generated command reference; the tables below cover the options that need explanation.
Input expectations:
Extraction enabled (
-c/--center): inputs must be PDB / mmCIF so residues can be located.Extraction skipped: inputs may be PDB / mmCIF / XYZ / GJF.
Multi-structure runs require ≥ 2 structures. For full input-file requirements (hydrogens, element columns, atom-order parity), see CLI Conventions.
Charge is resolved via the standard priority chain (see CLI Conventions: Charge specification). In all, the charge derivation from active-site model extraction (when -c is set) acts as an additional priority layer. Spin resolution: --multiplicity CLI → .gjf template → default 1. Always provide --ligand-charge/-l for non-standard substrates so the correct net charge propagates to scan / MEP / TSOPT / DFT.
Input / output¶
Option |
Description |
Default |
|---|---|---|
|
Two or more full structures in reaction order (single input allowed only with |
Required |
|
Reference PDB/mmCIF topology when |
None |
|
Top-level output directory. |
|
|
Global toggle for XYZ / TRJ → PDB / CIF / GJF companions when templates are available. CIF requires a bridged mmCIF/oversized-PDB topology. |
|
|
Dump MEP (GSM / DMF) trajectories. An explicit parent toggle is forwarded to |
|
|
Base YAML applied first. |
None |
|
Print the effective YAML plus parent settings before execution. Child-governing parent options are |
|
|
Validate options and print the plan. With |
|
Charge / spin¶
Option |
Description |
Default |
|---|---|---|
|
Net charge or per-resname mapping used when |
None |
|
Explicit net system charge with highest priority. If it differs from the extracted/workflow-derived value, warn and use |
None |
|
Spin multiplicity forwarded to all downstream steps. |
|
Extraction¶
Option |
Description |
Default |
|---|---|---|
|
PDB/mmCIF path, IDs/names, |
Required for extraction |
|
Active-site model inclusion cutoff (Å). |
|
|
Independent hetero–hetero cutoff (Å). |
|
|
Include waters (HOH / WAT / TIP3 / SOL). |
|
|
Remove backbone atoms on non-substrate amino acids. |
|
|
Add cap hydrogens for severed bonds. |
|
|
Force-include using the same ID/name/chain-qualified selector forms as |
|
|
Comma-separated residue names to treat as amino acids. |
|
|
Freeze cap parents in active-site model PDBs. |
|
|
Comma-separated 1-based indices frozen in every stage. With extraction, indices refer to the original full input and are mapped to the active-site model; without extraction, they refer to the current input. Merged with |
None |
Built-in amino-acid names follow force-field-normalized Amber/CHARMM
conventions. Raw PDB CCD name collisions are not inferred automatically; use
--modified-residue NAME:charge to state the intended nominal charge.
MEP search¶
Note
--max-cycles-gsm and --max-cycles-dmf bound the MEP stage only; leave
them unset to let each stage use its own default. The single-stage opt
and tsopt subcommands keep their own --max-cycles.
Option |
Description |
Default |
|---|---|---|
|
MEP algorithm: GSM (Growing String Method) or DMF (Direct Max Flux). |
|
|
Movable internal images per GSM/DMF segment. Both engines retain two endpoints, so total images = |
|
|
GSM node parameterization after string growth. |
|
|
Maximum GSM string-optimizer cycles. |
|
|
Maximum DMF IPOPT iterations. |
|
|
Enable climbing image for standard GSM segments (bridge segments always disable climbing). |
|
|
Workflow preset ( |
|
|
Convergence preset for single-structure optimizations and scan relaxations ( |
|
|
Convergence preset for the GSM string optimizer of the MEP stage (same presets as |
|
|
IPOPT dual-infeasibility tolerance of the DMF MEP stage: |
|
|
Pre-optimize active-site model endpoints before MEP search. Standalone |
|
|
Enable recursive |
disabled |
|
Write |
disabled |
MLIP calculator¶
Option |
Description |
Default |
|---|---|---|
|
UMA predictor parallelism. |
|
|
Shared MLIP Hessian engine. |
|
|
MLIP backend. |
|
Post-processing¶
Option |
Description |
Default |
|---|---|---|
|
Run TS optimization + IRC per reactive segment. |
|
|
For Hessian TS optimizers, guide reaction-root identity with CPU/file-cached HEI tangent candidates. Turning it off disables cache creation/use and selects from the initial Hessian modes. Not applicable to Dimer. |
|
|
Run vibrational analysis ( |
|
|
Run single-point DFT on R / TS / P; requires |
|
|
Optimizer preset for TSOPT + post-IRC ( |
|
|
Convergence preset for post-IRC endpoint optimizations. |
|
|
Enable surplus-imaginary-mode flattening in |
|
|
Opt in to rejecting energy-raising RFO steps during post-IRC endpoint re-optimization only, using a |
|
|
Override the IRC maximum EulerPC step (Bohr). If IRC stops after only a few frames, retry with a smaller value such as |
IRC default |
|
Ignore IRC gradient and energy stop conditions and trace each branch until its max-cycle cap. Numerical/integration failures and external interruption still stop propagation. |
|
Warning
--dft cost and memory depend on basis-function count, elements, functional,
grid, engine, and hardware; atom count alone is not a reliable cutoff. Pilot a
representative state and monitor peak memory before selecting resources.
TSOPT optimizer selection order: --opt-mode-post (if set) → --opt-mode (only when explicitly provided) → TSOPT default (hess → rsprfo). Example: --opt-mode grad --opt-mode-post hess uses L-BFGS for path optimization and RS-P-RFO for TS refinement.
TSOPT / freq / DFT / scan overrides¶
Option |
Description |
Default |
|---|---|---|
|
Override |
|
|
Custom tsopt subdirectory. |
None |
|
Base directory override for freq outputs. |
None |
|
Maximum modes to write. |
|
|
Mode-trajectory amplitude (Å). |
|
|
Frames per mode trajectory. |
|
|
Mode sorting behavior. |
|
|
Thermochemistry temperature (K). |
|
|
Thermochemistry pressure (atm). |
|
|
DFT backend (GPU4PySCF or PySCF). In |
|
|
DFT outputs base directory override. |
None |
|
Functional / basis pair. |
|
|
Maximum SCF iterations. |
|
|
SCF convergence tolerance. |
|
|
PySCF grid level. |
|
|
Staged scans: |
None |
|
Override the scan output directory. |
None |
|
How to read the |
None (1-based) |
|
Maximum step size (Å). |
|
|
Harmonic bias strength (eV · Å⁻²). |
|
|
Relaxation max cycles per step. |
|
|
Override the scan preoptimization toggle. |
None |
|
Override the scan end-of-stage optimization toggle. |
None |
YAML configuration¶
all supports layered YAML — base settings via --config FILE, with the precedence defaults < config < CLI. The effective YAML is forwarded to every invoked subcommand, and each subcommand reads its own sections:
Subcommand |
YAML sections |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Minimal example
calc:
model: uma-s-1p2 # uma-s-1p2 | uma-m-1p1
hessian_calc_mode: FiniteDifference # default; benchmark Analytical before opting in
gs:
max_nodes: 12
climb: true
dft:
grid_level: 6
Full schema: YAML Reference.
Notes¶
Structural differences outside the reaction coordinate can affect barriers obtained from independently prepared full-system structures. Inspect the structures and validate the selected path workflow for the modeled system.
With
--write-ref-merge, the static template is derived from the first original input;path-search --ref-full-pdbremains internal to this wrapper.Extraction radii:
-r 0(or--radius 0) disables radius-based expansion, so the model starts from residues selected by-cand--selected-resn; structural safeguards can still add a required disulfide partner or adjacent backbone context. The extractor internally clamps zero radii to0.001 Åto avoid an empty geometric query.Energies in diagrams are reported relative to the first state (reactant) in kcal/mol.
Omitting
-c/--centerskips extraction and feeds the entire input structures directly to MEP /tsopt/freq/dft; single-structure runs still require either--scan-lists/-sor--tsopt.
See Also¶
Installation · Getting Started · extract · scan · path-opt · path-search · tsopt · irc · freq · dft · Common Error Recipes · Troubleshooting · YAML Reference · Glossary.