path-opt (MEP between two structures)¶
path-opt finds a minimum-energy path (MEP) between two structures, a reactant and a product, in one pass with GSM (growing string method, the default) or DMF (direct max flux). It writes the trajectory of the structural change that connects R and P, and the highest-energy image (HEI) as a TS candidate.
What it is for¶
A first MEP from R and P: get a path and its energy profile from two endpoint structures, without recursive refinement.
A TS candidate for
tsopt:hei.pdb(orhei.xyz) is the starting structure fortsopt.Comparing GSM and DMF: run the same pair with
--mep-mode gsmand--mep-mode dmfand compare the paths.
To give three or more structures at once, use the Endpoint mode of all. To try whether intermediates between R and P can be detected automatically, use path-search.
Examples¶
1. Two endpoints¶
Give the reactant and the product after one -i, with the charge and the spin multiplicity.
pdb2reaction path-opt -i reactant.pdb product.pdb -q 0 -m 1 --out-json --out-dir ./result_path_opt
The console line [write] Wrote '…/hei.xyz'. shows that the TS candidate was written. In result.json (--out-json), scientific_status is success when every requested stage (endpoint pre-optimization, MEP) converged, otherwise partial or failed. barrier_kcal is the HEI energy relative to the first image, and hei_index is the position of the HEI on the path.
2. Set the endpoint pre-optimization limit¶
Both endpoints are pre-optimized by default; --preopt-max-cycles caps each pass, and --no-preopt skips it for optimized endpoints.
pdb2reaction path-opt -i reactant.pdb product.pdb -q 0 -m 1 \
--preopt-max-cycles 20000 --out-dir ./result_path_opt_preopt
3. DMF instead of GSM¶
DMF needs cyipopt; here we also use fewer movable images.
pdb2reaction path-opt -i reactant.pdb product.pdb -q 0 -m 1 \
--mep-mode dmf --max-nodes 12 --out-dir ./result_path_opt_dmf
4. Quick pass: freeze cap parents, no climbing¶
Skip the climbing-image search for a fast first look; the parents of cap hydrogens stay frozen.
pdb2reaction path-opt -i reactant.pdb product.pdb -q 0 -m 1 \
--freeze-links --no-climb --out-dir ./result_path_opt_quick
How it works¶
Preparing the endpoints: Each endpoint is pre-optimized, with L-BFGS by default (
--opt-mode). The product is then rigidly aligned to the reactant on the frozen atoms, and the frozen atoms are moved step by step onto their reactant positions while the other atoms relax. The parents of cap hydrogens are frozen by default (--freeze-links).Growing and refining the path: GSM grows a string of
--max-nodesmovable images between the two endpoints and optimizes it to--thresh-gsm. With--climb(on by default), a climbing-image search then pushes the highest image toward the saddle. DMF instead builds an interpolated path and optimizes it with IPOPT (an interior-point optimizer) to--dmf-tol.Writing the HEI: The image with the highest energy on the final path becomes the HEI.
hei.xyzholds it with its energy on the comment line.
Reading the HEI¶
Where the HEI is |
Meaning |
Next step |
|---|---|---|
Inside the path ( |
A TS candidate |
|
At an endpoint ( |
Not a TS candidate: no image between the endpoints lies above the higher endpoint |
Check the endpoints, or get a candidate another way (see When a TS search fails) |
The HEI is the top of an approximate path, not a TS. A successful TS optimization gives one imaginary mode along the reaction coordinate; the HEI becomes a TS once tsopt gives n_imag = 1 and IRC from that TS reaches the intended R and P.
Output files¶
path-opt writes these files to --out-dir:
result_path_opt/
├─ final_geometries_trj.xyz # Final path, every image, energies on the comment lines
├─ final_geometries.pdb # Same path as PDB (PDB/mmCIF input; DMF names it final_geometries_trj.pdb)
├─ hei.xyz # HEI, the TS candidate, with its energy on the comment line
├─ hei.pdb # Same HEI as PDB (PDB/mmCIF input)
├─ align_refine/ # Endpoint alignment and relaxation files
├─ result.json # Summary (--out-json)
└─ summary.json # Same content as result.json (with --out-json)
Open final_geometries_trj.xyz to watch the path. Pass hei.pdb to tsopt for PDB/mmCIF input, so that -l and --freeze-links apply there; with hei.xyz, add --ref-pdb. For PDB, mmCIF, or .gjf input, the outputs are also written in that format under the same name; mmCIF input, and PDB input too large for the PDB columns, also get .cif files that keep the original identifiers. With DMF, the path is not written as .gjf. --dump also keeps the optimizer trajectories.
The console prints the MEP progress cycle by cycle, with timings.
Main options¶
Option |
Type |
Default |
Description |
|---|---|---|---|
|
2 paths |
(required) |
Reactant and product, in that order, after one |
|
integer |
|
Total charge. Required unless |
|
integer |
|
Spin multiplicity (2S+1) |
|
text |
|
Total ligand charge (for example |
|
path |
|
PDB/mmCIF topology for |
|
text |
|
Backend ( |
|
path |
|
Output directory |
|
|
|
Path method: growing string method / direct max flux |
|
|
|
DMF compute backend ( |
|
integer |
|
Movable images between the endpoints; the path has |
|
flag |
|
Pre-optimize each endpoint before alignment |
|
integer |
|
Maximum cycles of each endpoint pre-optimization |
|
|
|
Optimizer of the endpoint pre-optimization: L-BFGS / RFO |
|
preset |
|
Convergence criteria of the GSM string ( |
|
text |
|
IPOPT tolerance of the DMF path: |
|
flag |
|
Keep the endpoints fixed while the GSM string is optimized (not used by DMF) |
|
flag |
|
Run the GSM climbing-image search after the path is grown (not used by DMF) |
|
flag |
|
Freeze the parent atoms of cap hydrogens (PDB/mmCIF input or |
|
flag |
|
Write a summary to |
See the generated CLI reference for every option.
Notes¶
Frozen atoms move slightly with DMF: DMF holds frozen atoms with a harmonic restraint (k = 300 eV/Ų, YAML
dmf.k_fix) instead of fixing them, so they can drift a little from their reference positions; GSM keeps them fixed. See Freeze atoms and restrain distances.DMF needs
cyipopt: install it with PyTorch from conda-forge, as in step 3 of Step-by-step installation, before you run--mep-mode dmf;pydmfcomes withpdb2reaction. The default--dmf-backend gpustops with an error when CUDA is unavailable; use--dmf-backend cputhen, or after a GPU out-of-memory error.DMF and implicit solvent cannot be combined: with an MLIP backend,
--mep-mode dmftogether with--solventstops with an error. Use GSM for a path with solvent.Options DMF ignores:
--climb,--dump, and--fix-endsare accepted but not used by DMF.Conflicting optimizer settings in YAML: setting the same key to different values in
opt:and in the section of the optimizer that runs (lbfgs:,opt.lbfgs:,stopt.lbfgs:, or therfoequivalents) stops the run with an error.
See also¶
path-search — MEP through two or more structures, refined where bonds change
tsopt — optimize the HEI into a TS
irc — check that the TS connects the intended R and P
all — the full workflow; its MEP step uses
path-opt, and--refine-pathswitches it topath-searchYAML Reference — every
gs,dmf, andstoptsettingGlossary — MEP, GSM, DMF, HEI, and other terms
Troubleshooting — when a run fails
Exit codes — what each exit status means