tsopt (transition-state optimization)¶
tsopt optimizes a transition-state (TS) candidate to a first-order saddle point, then computes the Hessian at the final geometry and counts its imaginary frequencies (n_imag). A successful TS optimization gives one imaginary mode along the reaction coordinate.
What it is for¶
Refining a TS candidate: turn the highest-energy image (HEI) of
path-opt/path-search, or the top of ascan, into an optimized TS.Checking a structure you built: confirm that a hand-made candidate is a TS (n_imag = 1) and watch its reaction mode as an animation.
Rerunning the TS step of
all: optimize the TS of anallrun again on its own, with different settings.
The default backend is UMA, Meta’s pretrained machine-learning interatomic potential (MLIP); -b/--backend also selects ORB, MACE, AIMNet2, or DFT.
If you do not have a candidate yet, make one first:
What you have |
Command that gives a candidate |
|---|---|
The reactant and the product |
|
Only the reactant, or a bond you want to drive |
|
Examples¶
1. Default run (RS-P-RFO)¶
Give the charge and the spin multiplicity explicitly.
pdb2reaction tsopt -i ts_cand.pdb -q 0 -m 1 --out-dir ./result_tsopt
The run succeeded when the console prints [tsopt] Converged (n_imag=1).
2. Dimer method¶
Use this when computing the full Hessian again and again is too expensive, or to try a second method on a difficult candidate.
pdb2reaction tsopt -i ts_cand.pdb -q 0 -m 1 --opt-mode dimer --out-dir ./result_tsopt_dimer
3. Remove extra imaginary modes¶
Add --flatten when the candidate has more than one imaginary frequency.
pdb2reaction tsopt -i ts_cand.pdb -q 0 -m 1 --flatten --out-dir ./result_tsopt_flatten
4. Start from a saved Hessian¶
Read a Hessian saved at this geometry with --dump-hess (for example by freq) instead of computing it again.
pdb2reaction tsopt -i ts_cand.pdb -q 0 -m 1 --read-hess ts_cand_hess.npy --out-dir ./result_tsopt
How it works¶
Reading the structure and freezing the boundary: the charge comes from
-qor-l. With--freeze-links(on by default), the parent atoms of the cap hydrogens of a cut-out cluster are frozen, and the Hessian covers only the movable atoms (PHVA: partial Hessian vibrational analysis). For an.xyzcandidate from a PDB model, add--ref-pdbwith that PDB so that--freeze-linkscan freeze the boundary.Choosing the optimizer (
--opt-mode):hess(default) runs RS-P-RFO (restricted-step partitioned rational function optimization), which uses the full Hessian;rsirfoandtrimselect RS-I-RFO (restricted-step image RFO) and TRIM (trust-region image minimization).dimer(orgrad) runs the Hessian-guided Dimer method, which follows the lowest mode with gradients and refreshes its direction from an exact Hessian at intervals.Climbing along the reaction mode: the optimizer goes uphill along the reaction mode and downhill along every other direction until the convergence criteria (
--thresh) are met. RS-P-RFO updates the Hessian with the Bofill formula and keeps each step within a trust radius of 0.1 bohr. The defaultbakerneeds all five at once (atomic units): max force below 3 × 10⁻⁴, RMS force below 2 × 10⁻⁴, max step below 3 × 10⁻⁴, RMS step below 2 × 10⁻⁴, and an energy change below 10⁻⁶ hartree. All of them are tighter than Gaussian’s default (gau).Final check: after convergence,
tsoptcomputes the Hessian at the final geometry, counts n_imag, and writes each imaginary mode as an animation. A mode counts as imaginary when ν < −5.00 cm⁻¹ (YAMLfreq.zero_cutoff_cm); values between −5.00 and 0 cm⁻¹ are numerical noise. Frozen atoms are handled as infreq.Removing extra imaginary modes (only with
--flatten): if more than one imaginary mode remains,tsoptdisplaces the structure along the extra modes and optimizes again, until one mode is left or the round limit is reached. In Dimer mode, each round also refreshes the dimer direction and runs a short Dimer + L-BFGS segment.
Reading the TS result¶
How the run ended decides what you get:
How it ended |
|
Exit code |
What |
What |
|---|---|---|---|---|
Converged |
|
0 |
Final geometry, n_imag, and the imaginary modes |
Continues to IRC if n_imag ≥ 1; stops before IRC if n_imag = 0 |
Stopped on an energy plateau |
|
1 |
Final geometry and n_imag |
Stops before IRC |
Stopped without converging, usually at |
|
1 |
Final geometry; no Hessian |
Stops before IRC |
Converged with |
|
0 |
Final geometry; no Hessian |
Stops before IRC, because the reaction mode is unchecked |
The final Hessian failed |
|
1 |
Final geometry, with |
Stops before IRC |
Read n_imag as follows:
n_imag |
Meaning |
|---|---|
1 |
A first-order saddle point. Check that the mode moves the intended atoms, then run |
0 |
No imaginary mode: the structure has relaxed toward a minimum. |
2 or more |
A higher-order saddle point: extra imaginary modes remain. |
Read n_imag on the [tsopt] verdict line or, with --out-json, as n_imaginary_modes in result.json.
Wrong imaginary-mode count after optimization¶
If n_imag is not 1, or the mode does not move the atoms of the intended reaction, try the following. The remedies can be combined.
Result |
What to try |
|---|---|
n_imag = 0 |
The candidate is not near a saddle. Get a better candidate from a path search or a scan. In |
n_imag ≥ 2 |
Watch each mode. Re-optimize with |
One mode, but the wrong motion |
Check which atoms move, and start from a candidate closer to the intended reaction. |
For example, to retry in fp64 and DLC coordinates with flattening on:
pdb2reaction tsopt -i ts_cand.pdb -q 0 -m 1 \
--precision fp64 --coord-type dlc --flatten --out-dir ./result_tsopt_retry
For more ideas, see When the TS search fails; for other failures, see Troubleshooting.
Output files¶
When the run finishes, --out-dir contains:
result_tsopt/
├─ final_geometry.xyz # Final geometry (always written)
├─ final_geometry.pdb # Same, for PDB/mmCIF input (.gjf for Gaussian input)
├─ vib/
│ ├─ imag_-385.20cm-1_trj.xyz # Animation of each imaginary mode
│ └─ imag_-385.20cm-1.pdb # Same, as PDB (PDB/mmCIF input)
├─ optimization_trj.xyz # Optimization trajectory (--dump; Dimer writes optimization_all_trj.xyz)
└─ result.json # Summary (--out-json)
mmCIF input, and PDB input too large for the PDB columns, also get .cif files that keep the original identifiers.
Final geometry:
final_geometry.*is the TS to pass toirc.Reaction mode: open
vib/imag_*_trj.xyzin PyMOL or VMD and check that the atoms move along the bonds that form or break.Summary: with
--out-json,result.jsonrecords how the run ended (optimization_status) andhessian_status.
Main options¶
Option |
Type |
Default |
Description |
|---|---|---|---|
|
path |
(required) |
One structure ( |
|
integer |
|
Total charge. Required unless |
|
integer |
|
Spin multiplicity (2S+1) |
|
text |
|
Total ligand charge (for example |
|
path |
|
Reference PDB/mmCIF topology for |
|
path |
|
Output directory |
|
text |
|
Backend ( |
|
|
|
Optimizer: RS-P-RFO / Dimer / RS-I-RFO / TRIM ( |
|
path |
|
Reference direction for the reaction mode ( |
|
|
|
How the Hessian is computed |
|
flag |
|
Remove extra imaginary modes |
|
flag |
|
Freeze the parent atoms of cap hydrogens (PDB/mmCIF input or |
|
text |
|
Atoms to freeze (1-based, comma-separated, for example |
|
preset |
|
Convergence criteria ( |
|
integer |
|
Maximum number of optimization cycles |
|
flag |
|
Stop when the energy stops changing (range below 1e-4 hartree over 50 cycles), then compute the Hessian |
|
flag |
|
Skip the final Hessian after convergence |
|
path |
|
Start from the Hessian in a |
|
path |
|
Save the final-geometry Hessian to a |
|
|
per backend ( |
Backend precision. |
|
|
|
Optimization coordinates: Cartesian / redundant internal / delocalized internal (DLC) / translation-rotation internal (TRIC) |
|
path |
|
YAML file applied before the command-line options |
|
flag |
|
Write the optimization trajectory |
|
flag |
|
Write a summary to |
For every option, run pdb2reaction tsopt --help-advanced or see the generated CLI reference.
Note: in YAML, Dimer reads the
hessian_dimer:block, and RS-P-RFO, RS-I-RFO, and TRIM share thersirfo:block. Every key is listed underrsirfoandhessian_dimerin the YAML Reference.
Note: if the reaction mode switches to another Hessian eigenvector (root) during the optimization, set
rsirfo.track_mode_by_overlap: true.
Note: if convergence is slow, lower
rsirfo.hessian_recalc(default500) to 50–200 to recompute the exact Hessian more often, at the cost of more Hessian evaluations.
Notes¶
When --flatten is on¶
One YAML key, hessian_dimer.flatten_max_iter, sets the number of flatten rounds for every optimizer, Dimer and RS-P-RFO / RS-I-RFO / TRIM alike.
Command line |
Flatten rounds |
|---|---|
Neither |
|
|
The YAML value if it is positive, otherwise |
|
|
--flatten cannot create a missing reaction mode; when n_imag = 0, get a better candidate instead.
Other notes¶
Uphill steps are always allowed: a saddle search has to go uphill along the reaction mode, so
tsoptkeepsreject_uphill: falseeven if YAML sets it.--reject-uphill/--no-reject-uphillbelongs tooptand to the endpoint optimization inall.Barrier from a product-side scan: if the scan that made this candidate started from the product, read its barrier as described in
scan→ Barrier sign.One root: the optimizer climbs along one root (
0= lowest eigenvalue). Set it as a one-item list such asrsirfo.roots: [0]; Dimer useshessian_dimer.root.tsopthas no--rootflag.Other RS-P-RFO settings:
trust_norm: max_atomlimits the displacement of each atom instead of the whole step (Cartesian coordinates only), andhessian_update: ts_bfgsselects the TS-BFGS update instead of Bofill. Neither changes the trust radii.Extra searches are opt-in: after convergence,
tsoptdoes not search further on its own, even when n_imag is not 1. Use--flatten, or setrsirfo.saddle_recovery_max_cyclesabove0(default0) to let RS-P-RFO / RS-I-RFO / TRIM step uphill when the exact Hessian shows no imaginary mode.Flags that cannot be combined:
--skip-final-freqwith--dump-hess;--uma-workersabove 1 with--hessian-calc-mode Analytical.--skip-final-freqand--flatten: with RS-P-RFO / RS-I-RFO / TRIM,--skip-final-freqalso skips--flatten, which needs the final Hessian.--read-hesswith RS-P-RFO / RS-I-RFO / TRIM: the file replaces the first exact Hessian, so keeprsirfo.hessian_initat its defaultcalc; other values stop with an error.Dimer direction: Dimer writes its current direction to
.dimer_mode.datin the output directory.--ref-modeand frozen atoms:--ref-modeonly gives the reaction direction from the MEP; it does not change how frozen boundaries are treated.
See also¶
irc — follow the reaction path from the optimized TS
freq — full vibrational analysis and thermochemistry
path-opt / path-search / scan — make a TS candidate
all — extraction, MEP, TS optimization, IRC, and frequencies in one run
Tips for studying reaction mechanisms — what to try when the TS search fails
Troubleshooting — when a run fails
YAML Reference — every
rsirfoandhessian_dimersettingGlossary — TS, Dimer, Hessian, and other terms
Exit codes — what each exit status means