all (end-to-end workflow)¶
all runs the whole ML/MM workflow in one command: it selects the ML region around the active site, builds the Amber topology and the three layers of the full system, and finds the minimum energy path (MEP). When asked, it optimizes the transition state (TS) of each reaction step and runs the intrinsic reaction coordinate (IRC), frequency, and DFT calculations on it.
Without --tsopt, the run ends with TS candidates: the highest-energy image (HEI) of each MEP segment. The ML region is computed by UMA, Meta’s pretrained machine-learning interatomic potential (MLIP), by default; -b/--backend also selects ORB, MACE, AIMNet2, or DFT (dft). The rest of the enzyme is computed with the Amber force field, and ONIOM combines the two.
What it is for¶
What you pass selects the mode:
Path and energy diagram from R and P (Endpoint mode): give two or more full structures in reaction order (reactant, intermediates, product);
allfinds the MEP between each neighbouring pair and draws the energy diagram.Path from a reactant alone (Scan-list mode): give one structure and the bonds to form or break with
-s; a staged scan makes the intermediates, and the MEP search runs through them.Check one TS candidate (TS-only mode): give one structure with
--tsoptand no-s;alloptimizes the TS and runs IRC from it. The TS is confirmed when n_imag = 1 and the IRC ends at the intended R and P.
Examples¶
The examples use the GPP C6-methyltransferase BezA (Tsutsumi et al., Angew. Chem. Int. Ed. 2022, 61, e202111217); the full scripts are in examples/beza/. 1.R.pdb (reactant), 2.IM.pdb (intermediate), and 3.P.pdb (product) are full enzyme structures with every hydrogen; your own structures need hydrogens too. Examples 1–3 are walked through, with how to check the results, in Quickstart: all, Quickstart: --scan-lists, and Quickstart: TS-only mode.
1. MEP with TS optimization, thermochemistry, and DFT¶
-c names the residues the ML region is built around, and -l gives the charges of the non-standard residues. --refine-path splits the path where bonds change, so each chemical step becomes its own segment.
mlmm all -i 1.R.pdb 3.P.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' \
--refine-path --tsopt --thermo --dft --out-dir ./result_mep
Every requested stage finished when the console prints [Imaginary modes] n=1 (...) for each TS and Scientific status: success under the last ====== Pipeline summary ======. Then check the endpoints as in Reading the run status. The optimized structures are in result_mep/segments/seg_NN/.
2. Path from the reactant by a staged scan¶
Stage 1 brings the methyl carbon of SAM (CS1) to C7 of GPP (1.50 Å) and away from SD of SAM (3.30 Å), and stage 2 moves H11 of GPP away from C7 (2.90 Å) onto OE2 of Glu186 (1.00 Å).
mlmm all -i 1.R.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' \
-s '[("CS1 SAM 320","C7 GPP 321",1.50),("CS1 SAM 320","SD SAM 320",3.30)]' \
'[("C7 GPP 321","H11 GPP 321",2.90),("OE2 GLU 186","H11 GPP 321",1.00)]' \
--tsopt --thermo --out-dir ./result_scan
The targets inside one literal move together in one stage. Literals given in a row run as successive stages, each starting from the end of the one before, and the stage ends become the inputs of the MEP search. Give -s once and list every literal after it. To decide how to split a reaction, see Tips for studying reaction mechanisms. In a PDB with an empty chain field, write an atom as its residue name, residue number, and atom name in any order ("CS1 SAM 320"); with chains, write A:SAM:320:CS1. All accepted forms are in Common options and selectors.
3. Check a TS candidate (TS-only mode)¶
One input with --tsopt and no -s skips the MEP search.
mlmm all -i TS_candidate.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' \
--tsopt --thermo --dft
The optimized R, TS, and P are written to result_all/segments/seg_01/.
4. Resume post-processing from a segment¶
To redo the post-processing from segment N, repeat the original command with the same inputs, extraction, layer, path, and calculator options and the same --out-dir, and add --resume-segment N. Post-processing options such as --tsopt-max-cycles may change.
mlmm all -i 1.R.pdb 3.P.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' \
--refine-path --tsopt --thermo --dft \
--resume-segment 1 --out-dir ./result_mep
The segments before N are kept; the post-processing from segment N onward, the summary, and the diagrams are written again.
How it works¶
Full structure(s) (PDB / mmCIF, or XYZ with --ref-pdb)
├─ (with -c) ML-region selection: extract
│ └─ ml_region.pdb
├─ Amber topology of the full system: mm-parm (skipped with --parm7)
│ └─ mm_parm/<input>.parm7
├─ three layers in the B-factors: define-layer
│ └─ layered/<input>_layered.pdb
├─ (one structure with -s) staged scan: scan
│ └─ stage ends as intermediates
├─ MEP search: path-opt (default) or path-search (--refine-path)
│ └─ mep_trj.xyz and energy_diagram_MEP.png
└─ (with --tsopt) TS optimization and IRC: tsopt → irc
├─ (with --thermo) frequencies and thermochemistry: freq
└─ (with --dft) DFT single points: dft
Preparing the input and the ML region: for a PDB with blank element columns,
allfills them in. With-c, it cuts out the active-site model around the given residues; the model of the first input becomes the ML region and is written toml_region.pdb.Building the topology and the layers:
mm-parmbuilds the Amber topology of the full system from the first input with AmberTools (ff19SB, GAFF2 for non-standard residues);--parm7skips this step.define-layerthen writes the three layers into the B-factors: ML (0), Movable-MM residues within 8 Å of the ML region (10), and Frozen-MM (20). Every later calculation runs on the full system with ML/MM, and the bonds cut at the ML/MM boundary are capped with link hydrogens.Building the path: the input structures are optimized first (
--preopt). With-s, the staged scan makes the intermediates.path-optthen finds the MEP between each neighbouring pair by GSM (growing string method, the default) or DMF (direct max flux); with--refine-path, the recursivepath-searchrefines the path and splits it into steps where bonds change. The HEI of each step is its TS candidate.Optimizing the TS and following the IRC (
--tsopt): each HEI is optimized by RS-P-RFO (restricted-step partitioned rational function optimization) by default, and the final Hessian of the ML and movable MM atoms (PHVA, partial Hessian vibrational analysis) gives n_imag. From the TS, the IRC is traced in both directions with EulerPC (an Euler predictor–corrector integrator), and both ends are optimized to minima. These become the R and P of the segment.Thermochemistry and DFT:
--thermorunsfreqon R, TS, and P for the ML/MM Gibbs energy, and--dftcomputes the ML region of the same structures with DFT and combines it with the MM energy. Each adds its own energy diagram.
Reading the run status¶
A successful TS optimization gives one imaginary mode along the reaction coordinate (n_imag = 1). all continues from the TS to IRC only when the TS optimization converged, its final Hessian was computed, and n_imag ≥ 1:
TS result |
What |
|---|---|
Converged, n_imag = 1 |
Runs IRC and optimizes both IRC ends. |
Converged, n_imag ≥ 2 |
Warns, then runs IRC along the imaginary mode that best matches the MEP direction (the lowest one when none matches). The result is |
Converged, n_imag = 0 |
Stops before IRC. |
Stopped at the cycle limit |
Computes no final Hessian and stops before IRC. |
Stopped by |
Computes the final Hessian, reports n_imag, and stops before IRC. |
|
Stops before IRC. |
The full table of how a TS optimization can end is in tsopt → Reading the TS result.
Even if the IRC does not converge, the result is usable when the endpoint optimizations reach the intended R and P.
Read the outcome in three places:
Console: each TS with one imaginary mode prints
[Imaginary modes] n=1 (...)with its frequency. The====== Pipeline summary ======block printsExecution status:andScientific status:. When the result is notsuccess,RESULT WARNING:lines give the reasons.summary.log: the header showsPipeline mode(MEP,Scan, orTS-only) and both statuses. Section [1] is the MEP overview; [2] lists the barrier ΔE‡, the reaction energy ΔE, and the bond changes of each segment on the MEP; [3] gives the post-processing of each segment, with n_imag underTS imaginary freq:; [4] tabulates the energy diagrams; [5] shows the output tree.summary.json:scientific_statusissuccesswhen every requested stage converged, otherwisepartialorfailedwith the reasons inscientific_status_reasons. n_imag of each TS ispost_segments[].tsopt.n_imaginary_modes. The status fields are described in Execution and requested-stage completion.Barriers: with
--tsopt, the barrier of each segment ispost_segments[].mlip.barrier_kcal, the ML/MM energy of the optimized TS minus R. With--thermoand--dft, the barriers of the other methods are in the same form undergibbs_mlip,dft, andgibbs_dft_mlip.segments[].barrier_kcalis the barrier on the MEP before TS optimization; in TS-only mode it is TS − R.
Whether the endpoints are the intended R and P is for you to check: compare the bond changes in section [2] of summary.log and the structures segments/seg_NN/reactant.* and product.* with the R and P you intended. If n_imag is not 1 or the IRC ends are not the intended ones, see When the TS search fails.
Output files¶
all writes these files to --out-dir:
result_all/
├─ summary.log # Text summary
├─ summary.json # Machine-readable results (always written; all has no --out-json)
├─ mep_trj.xyz # MEP trajectory over all segments
├─ mep_trj.pdb # Same trajectory as PDB
├─ mep_plot.png # ML/MM energy along the MEP trajectory
├─ energy_diagram_MEP.png # MEP energy profile over all segments
├─ energy_diagram_*_all.png # R → TS → P diagrams over all segments (--tsopt, --thermo, --dft)
├─ irc_plot_all.png # IRC profiles over all segments (--tsopt)
├─ ml_region.pdb # ML region (reusable with --model-pdb)
├─ ml_region_without_linkH.xyz # ML region without and with the link hydrogens
├─ ml_region_with_linkH.xyz # (.pdb versions too for PDB input)
├─ mm_parm/ # Amber topology <input>.parm7 and .rst7 (reusable with --parm7)
├─ layered/ # Full structures with the three layers in the B-factors
├─ segments/
│ └─ seg_NN/ # One reaction step: seg_01, seg_02, ...
│ ├─ reactant.* # Optimized R, TS, and P in the input format (--tsopt)
│ ├─ ts.*
│ ├─ product.*
│ ├─ energy_diagram_*.png # R → TS → P diagrams of this step
│ ├─ ts/ # TS optimization; vib/imag_*_trj.xyz animates the imaginary modes
│ ├─ irc/ # IRC trajectories and irc_plot.png
│ ├─ endpoint_opt/ # Endpoint optimizations (kept with --dump or when an endpoint did not converge)
│ ├─ freq/{R,TS,P}/ # Frequencies and thermochemistry (--thermo)
│ └─ dft/{R,TS,P}/ # DFT single points (--dft)
└─ _work/ # Intermediate files, including the TS candidates (HEI)
├─ pockets/ # Extracted models, pocket_<input>.pdb (with -c)
├─ scan/ # Staged scan (with -s)
└─ path_opt/ # MEP search and hei_seg_NN.* (path_search/ with --refine-path)
Structures to report: cite
segments/seg_NN/reactant.*,ts.*, andproduct.*. The subdirectories ofseg_NN/hold the files of each stage..ciffiles: for mmCIF input and for PDB input too large for the PDB columns,allalso writes.ciffiles that keep the original identifiers.TS-only mode: there is no MEP search, so the MEP files and
_work/path_opt/are absent; R, TS, and P go tosegments/seg_01/.
The energy diagrams are named by method:
File |
Written when |
Content |
|---|---|---|
|
The MEP search finishes |
MEP energy profile over all segments |
|
|
R → TS → P, ML/MM energy |
|
|
R → TS → P, ML/MM Gibbs energy |
|
|
R → TS → P, DFT energy of the ML region on the ML/MM geometries |
|
|
R → TS → P, ML(DFT)/MM energy plus the ML/MM thermal correction |
|
Same as the diagram without |
The same diagram over all segments, at the top of the output directory |
|
|
IRC energy profile of one segment, and of all segments |
Energies in the diagrams are in kcal/mol relative to the first state (the reactant).
Main options¶
all builds the Amber topology and the layers itself, so the shared ML/MM options are needed only to reuse the topology and ml_region.pdb of a previous run; the table below lists only the options specific to all.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
path(s) |
(required) |
Two or more full structures in reaction order, or one structure with |
|
text |
|
Residues the ML region is built around, normally the substrate and catalytic residues: residue names ( |
|
text |
|
Charges of non-standard residues (e.g. |
|
integer |
|
Charge of the ML region. It is derived from the ML region; an explicit value overrides it with a warning |
|
integer |
|
Spin multiplicity (2S+1) of the ML region |
|
text |
|
Backend of the ML region ( |
|
float |
|
Extraction cutoff (Å) around the center atoms. |
|
text |
|
Residues to include without radius expansion: IDs ( |
|
|
|
Force field of the topology: ff19SB with OPC3 water, or ff14SB with TIP3P |
|
flag |
|
Insert TER records around ligand, water, and ion blocks and between disconnected peptides before building the topology |
|
flag |
|
Bond cysteines found by their SG–SG distance and rename them CYX; when off, only residues already named CYX are bonded |
|
text |
|
Spin multiplicities of the ligands for the topology (e.g. |
|
flag |
|
Keep the temporary directory of the topology build |
|
text |
|
Staged scan targets for one input, one literal per stage (e.g. |
|
flag |
|
Optimize the TS of each segment and run IRC |
|
flag |
|
Frequencies and ML/MM thermochemistry on R, TS, and P (needs |
|
flag |
|
DFT single points of the ML region on R, TS, and P (needs |
|
flag |
|
Run the recursive |
|
|
|
MEP method: GSM or DMF |
|
|
|
Optimizer for the single-structure optimizations and the scan: |
|
|
|
Optimizer for the TS and the endpoints after IRC: |
|
flag |
|
Optimize the input structures before the scan and the MEP search |
|
flag |
|
Remove extra imaginary modes left after the TS optimization |
|
flag |
|
Stop an optimization when the energy stops changing before convergence; the run is reported as stalled, not converged. The MM micro-iterations are not stopped this way |
|
integer |
|
Cycle limit of the TS optimization |
|
integer |
|
Redo the post-processing from segment N, reusing the MEP in |
|
flag |
|
Prepare the input and run the preflight checks in a temporary directory, print the plan, and skip the calculations |
|
path |
|
Output directory |
For every option, run mlmm all --help-advanced or see the generated CLI reference.
Note: In YAML (
--config), you can set what the options above do not cover; options given on the command line override the file. See YAML Reference for the sections and keys.
Notes¶
--dftand-b dft: they cannot be used together, and the run stops with an error at startup. To add DFT single points after a-b dftrun, runmlmm sp -b dftas a separate job.Cost of
--dft: memory use depends on the size of the ML region, basis, functional, precision, and software stack. Try a representative structure on the target node and watch the peak memory. For a large ML region, finish the MLIP run first and run the DFT single points as a separate job.R and P in TS-only mode: the higher-energy IRC end is named the reactant. The names, the file names, the barrier, and the reaction energy follow this energy order, not a known chemical direction; the barrier from P is
barrier_kcal − delta_kcal.summary.jsonrecords the rule underendpoint_assignment, withchemical_direction_known: false.summary.login TS-only mode: [1] is the TS and IRC overview, and [2] comes from the optimized TS and endpoints.When
allstops before IRC: the TS files stay insegments/seg_NN/ts/, and the later segments are not post-processed.Endpoint optimizations: if one endpoint optimization does not converge, the result is
partialandsegments/seg_NN/endpoint_opt/is kept for inspection. If an endpoint optimization fails with an error, the error is written tosegments/seg_NN/endpoint_opt/failure.json, and that segment stops before the frequency and DFT stages; the TS and IRC structures are kept.Thermochemistry file: with
--thermo,thermoanalysis.yamlis kept even under--no-dump, becauseallreads the thermochemistry from it.Extraction radius:
-r 0disables radius-based expansion, so the model starts from the residues selected by-cand--selected-resn. Structural safeguards can still add a disulfide partner or the backbone of an adjacent residue. A zero radius is evaluated internally as 0.001 Å.Without
-c: extraction is skipped, and the full input structures are used. The ML region comes from the B-factors of the input (--detect-layer, on by default) or from--model-pdb; with--no-detect-layerand no--model-pdb, the run stops with an error. One structure still needs-sor--tsopt.AmberTools: without
--parm7,allstops with an error when AmberTools is not found.Input formats:
allreads PDB and mmCIF; XYZ input needs--ref-pdb, a PDB with the same atoms. All structures of one run must have the same atoms in the same order.Charge and multiplicity:
-qand-mdescribe the ML region, not the whole enzyme. With-c, the ML-region charge is the sum over the extracted model of the first input: built-in values for amino acids, ions, and water,-lfor the other residues, and 0 for residues not listed in-l. Without-c, the same sum is taken over the ML region from the B-factors or--model-pdb.-qoverrides the derived value with a warning; when no value can be derived,calc.model_chargein the YAML file is used. The multiplicity is-m, otherwisecalc.model_multin the YAML file, otherwise 1. See Common options and selectors.Frozen atoms and rigid-body motions: the vibrational analysis projects out only the rigid translations and rotations that leave the frozen atoms in place, so with a frozen MM layer usually none are removed; see freq → Rigid modes with frozen boundaries.
Separately prepared structures: when the input structures were prepared independently, their differences outside the reaction coordinate enter the barrier. Compare the structures before reading the barrier. For two mechanisms of the same composition, use one common atom set and atom order for both paths.
--resume-segment: it needs--tsopt,--thermo, or--dft, and cannot be combined with--dry-run. The run stops with an error when the saved inputs, ML region, topology, layered structures, or MEP do not match the command.
Comparing a mutant with the wild type¶
Within one path, every structure has the same atoms in the same order. A mutant and the wild type (WT) differ in residues and often in atom count, so their total energies cannot be subtracted. Compare the barriers computed within each system instead:
ΔΔG‡ = (G_TS − G_R)_mutant − (G_TS − G_R)_WT
Select the same ML-region residues and the same layer rules for both systems, so that the mutation is the only designed difference. Two independent radius-based selections can differ, because a boundary residue may enter one ML region and not the other; compare the two
ml_region.pdbfiles.Use the same protonation rules, charge assignment, force field, backend and model, precision, restraints, and thermochemistry settings. If the mutation changes a protonation state or a formal charge in the ML region, the ML-region charges differ; do not force the same
-qon both.
The two runs use the same options except for the input and the output directory. Give R and P of each system (Endpoint mode), so that R is the chemical reactant; G_TS − G_R is post_segments[].gibbs_mlip.barrier_kcal:
mlmm all -i wt_R.pdb wt_P.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' --tsopt --thermo --out-dir ./result_wt
mlmm all -i mutant_R.pdb mutant_P.pdb -c 'SAM,GPP,MG' -l 'SAM:1,GPP:-3' --tsopt --thermo --out-dir ./result_mutant
See also¶
extract — selection of the ML region
mm-parm — Amber topology of the full system
define-layer — the three layers in the B-factors
scan — staged scans of distances, angles, and dihedrals
path-opt — one MEP between two structures (GSM / DMF)
path-search — recursive MEP search that splits the path into steps
tsopt — TS optimization
irc — IRC from a TS
freq — vibrational analysis and thermochemistry
dft — DFT single points of the ML region
Refine an MLIP TS with DFT —
-b dftand--dftTips for studying reaction mechanisms — splitting the reaction, checking the TS, and what to try when it fails
Troubleshooting — what to do when a run fails
Getting Started — the shortest run and what to read next