irc (intrinsic reaction coordinate)¶
irc traces the intrinsic reaction coordinate (IRC) of an ML/MM system from an optimized transition state (TS) in both directions with EulerPC (an Euler predictor–corrector integrator). It writes the trajectory of each branch and the two endpoint candidates. Optimizing those endpoints with opt shows which reactant (R) and product (P) the TS connects.
What it is for¶
Checking a TS: after
tsoptandfreq(n_imag = 1), confirm that the TS connects the intended R and P.Getting R and P: optimize the endpoints with
optto obtain the R and P structures of this TS.Rerunning the IRC step of
all: trace the IRC of anallrun again on its own, with different settings.
The ML region uses UMA (Meta) by default; -b/--backend also selects ORB, MACE, AIMNet2, or DFT. The MM atoms use the Amber force field of --parm7.
Examples¶
1. Both branches¶
Trace both directions from the TS ts.pdb, and write a summary with --out-json.
mlmm irc -i ts.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --out-json --out-dir ./result_irc
The endpoint candidates are forward_first.xyz and backward_last.xyz.
2. Forward branch only¶
Trace only the forward branch.
mlmm irc -i ts.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --no-backward --out-dir ./result_irc_forward
3. Analytical Hessian¶
Have the ML backend compute the starting Hessian analytically instead of by finite differences.
mlmm irc -i ts.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --hessian-calc-mode Analytical --out-dir ./result_irc_analytical
4. Retry with a smaller step¶
When a branch stops after only a few frames, retry with a maximum step of 0.05 bohr.
mlmm irc -i ts.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --step-size 0.05 --out-dir ./result_irc_small_step
5. Trace to the cycle limit¶
Add --never-stop to ignore the gradient and energy stop criteria and trace each branch until --max-cycles.
mlmm irc -i ts.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --step-size 0.05 --never-stop --max-cycles 250 \
--out-dir ./result_irc_continue
How it works¶
Building the ML/MM system:
ircreads the TS structure from-i, the Amber topology from--parm7, and the ML region from--model-pdb.-qand-mare the charge and the spin multiplicity of the ML region.Starting direction:
irccomputes the Hessian at the TS (or reads it with--read-hess), removes rigid motions asfreqdoes, and takes the eigenvector--root(default0, the lowest eigenvalue) as the reaction mode. If that mode is not imaginary, the run stops with an error.EulerPC integration: each branch (forward, then backward) starts from the TS. Every step is an Euler predictor along the mass-weighted steepest-descent direction, with the gradient estimated from a second-order Taylor expansion with the current Hessian (Bofill update), followed by a modified Bulirsch–Stoer corrector on a DWI (distance-weighted interpolation) surface. A branch stops when the RMS gradient falls below 1 × 10⁻³ hartree/bohr after leaving the TS region, when the energy rises, when the energy changes by 1 × 10⁻⁶ hartree or less in one step, or at
--max-cycles(default 125 steps per branch).Writing the path:
ircwrites each branch, the whole path through the TS, and the end structures. For PDB/mmCIF input or with--ref-pdb, the trajectories and the two endpoint candidates are also converted to PDB.
Judging the IRC¶
Even if the IRC does not converge, the result is usable when the endpoints, optimized with opt, reach the intended R and P.
What to check |
Where to look |
|---|---|
The start was a TS |
The console line |
How each branch stopped |
|
Bonds that change along the path |
|
Which end is R and which is P |
Optimize |
irc does not judge the endpoints; whether they are the intended R and P is for you to check.
Optimize both endpoints with opt; they are .xyz files, so pass the TS PDB with --ref-pdb for the atom order and the layers:
mlmm opt -i result_irc/forward_first.xyz --ref-pdb ts.pdb --parm7 real.parm7 \
--model-pdb ml_region.pdb -q 0 -m 1 --out-dir ./result_opt_forward
mlmm opt -i result_irc/backward_last.xyz --ref-pdb ts.pdb --parm7 real.parm7 \
--model-pdb ml_region.pdb -q 0 -m 1 --out-dir ./result_opt_backward
If the endpoints are not the intended R and P, see When the TS search fails.
Output files¶
When the run finishes, --out-dir (default ./result_irc/) contains:
result_irc/
├─ finished_irc_trj.xyz # Whole IRC path through the TS
├─ finished_irc.pdb # Same path as PDB
├─ finished_first.xyz # First frame of the whole path (= forward_first.xyz when the forward branch runs)
├─ finished_last.xyz # Last frame of the whole path (= backward_last.xyz when the backward branch runs)
├─ forward_irc_trj.xyz # Forward branch, from the TS (when it runs)
├─ forward_irc.pdb # Same branch as PDB
├─ forward_first.xyz # End of the forward branch (endpoint candidate)
├─ forward_first.pdb # Same structure as PDB
├─ backward_irc_trj.xyz # Backward branch, from the TS (when it runs)
├─ backward_irc.pdb # Same branch as PDB
├─ backward_last.xyz # End of the backward branch (endpoint candidate)
├─ backward_last.pdb # Same structure as PDB
└─ result.json # Summary (--out-json)
The .pdb files are written for PDB/mmCIF input or with --ref-pdb. mmCIF input, and PDB input too large for the PDB columns, also get .cif files that keep the original identifiers.
Endpoint candidates:
forward_first.xyzandbackward_last.xyzare the structures to optimize withopt. Each branch also writes its other end, next to the TS (forward_last.xyz,backward_first.xyz).Path: open
finished_irc_trj.xyzorfinished_irc.pdbin PyMOL or VMD to watch the reaction.Summary: with
--out-json,result.jsonrecords the number of frames of each branch (n_frames_forward,n_frames_backward), how each branch stopped,bond_changes, the energies of the two ends and the TS (energy_first_hartree,energy_ts_hartree,energy_last_hartree), and the removed rigid motions and the starting Hessian underrigid_projection.Console: the step table of each branch and the elapsed time.
Note: with YAML
irc.prefix: trial, every file name other thanresult.jsonstarts withtrial_, as intrial_finished_irc_trj.xyz, andfilesinresult.jsonrecords the prefixed names. A positive YAMLirc.dump_everyalso writes the HDF5 checkpointirc_data.h5during the run; it is off by default.
Main options¶
The options shared by every ML/MM calculation command are explained once in ML/MM options; the table below lists only the options specific to irc.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
path |
(required) |
TS structure ( |
|
integer |
|
Charge of the ML region. Required unless |
|
text |
|
Total charge of unknown ligand residues (for example |
|
integer |
|
Spin multiplicity (2S+1) of the ML region |
|
integer |
|
Maximum number of IRC steps per branch |
|
float |
|
Maximum step length in bohr (unweighted Cartesian coordinates) |
|
integer |
|
Hessian eigenvector used as the reaction mode, counted from 0 in ascending order of eigenvalue |
|
flag |
|
Run the forward branch |
|
flag |
|
Run the backward branch |
|
flag |
|
Ignore the gradient and energy stop criteria and trace until |
|
path |
|
Output directory |
|
|
|
How the ML backend computes the starting Hessian |
|
text |
|
ML-region backend ( |
|
path |
|
Start from the Hessian in a |
|
flag |
|
Write a summary to |
See the generated CLI reference for every option.
Note: in YAML (
--config), every key of theircblock is listed underircin the YAML Reference.
Notes¶
A branch that stops at once: when a branch ends after three frames or fewer before the cycle limit, the console warns
[irc] IRC stopped after only a few frames in …. Retry with a smaller--step-size, for example0.05, before changing other settings; a large step can make EulerPC unstable.--never-stopis off by default: with it, the branches run past the physical end points to the cycle limit. Numerical failures and interruptions still stop the run. Inspect the trajectory and optimize the endpoints, and raise--max-cyclesonly when the extra path is useful.--rootcounts from 0: a successful TS optimization gives one imaginary mode along the reaction coordinate, so for a TS with n_imag = 1 keep--root 0(the only negative eigenvalue). Use1,2, … only when you know that spurious modes with lower (more negative) eigenvalues come before the reaction mode.Cartesian coordinates:
ircalways uses Cartesian coordinates, whatever YAMLgeom.coord_typesays.The
--read-hessfile is the same.npyfile as infreq, in Hartree/bohr², for all atoms or only the atoms in the Hessian calculation; pass a Hessian computed for the same geometry, charge, multiplicity, and calculator settings. It needsirc.hessian_init: calc(the default); when the file is used,result.json["rigid_projection"]["hessian_source"]is"file".Analytical Hessian and
--uma-workers: with UMA,--hessian-calc-mode Analyticalcannot be combined with--uma-workersabove 1 and stops with an error. Use--uma-workers 1for an analytical Hessian. Its speed and memory use depend on the backend and the system, so compare both modes on your system first.Frozen atoms: besides the Frozen-MM layer,
--freeze-atomsfreezes more atoms (1-based); how to choose them is described in Frozen atoms and distance restraints.Large systems:
--hess-device cpukeeps the starting Hessian and the IRC Hessian operations on the CPU, to stay within GPU memory.At least one branch:
--no-forwardtogether with--no-backwardstops with an error.One structure per run:
-itakes a single structure. Extract the frame you need from a trajectory to.xyzfirst and pass it with--ref-pdb.
See also¶
tsopt — optimize the TS before running IRC
freq — check that the TS has one imaginary mode (n_imag = 1)
opt — optimize the IRC endpoints to R and P
all — the full workflow, which runs IRC after
tsoptand optimizes the endpointsTroubleshooting — when a run fails
YAML Reference — every
ircsettingGlossary — IRC and other terms
Exit codes — what each exit status means