path-opt (MEP between two structures)¶
path-opt finds a minimum-energy path (MEP) between two layered enzyme structures, a reactant and a product, in one pass with GSM (growing string method, the default) or DMF (direct max flux), using the ML/MM calculator on the whole system. 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.
The ML region is computed with UMA (Meta) by default, and the rest of the system is computed with the Amber force field of --parm7. 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 of the ML region and the spin multiplicity. reactant.pdb and product.pdb hold the whole system that matches real.parm7 (the Amber topology), and ml_region.pdb selects its ML region.
mlmm path-opt -i reactant.pdb product.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --out-json --out-dir ./result_path_opt
A console line that starts with [write] Wrote '…/hei.xyz' shows that the TS candidate was written. In result.json, scientific_status is success when every requested stage (endpoint pre-optimization and the MEP) converged, otherwise partial or failed. barrier_kcal is the HEI energy relative to the first image, and hei_index tells you where the HEI sits on the path.
2. Set the endpoint pre-optimization limit¶
Both endpoints are pre-optimized by default; --preopt-max-cycles caps each pass. Use --no-preopt when the endpoints are already optimized.
mlmm path-opt -i reactant.pdb product.pdb --parm7 real.parm7 --model-pdb ml_region.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.
mlmm path-opt -i reactant.pdb product.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --mep-mode dmf --max-nodes 12 --out-dir ./result_path_opt_dmf
4. Quick pass: no climbing, fewer nodes¶
Skip the climbing-image search and use fewer movable images for a fast first look at the path.
mlmm path-opt -i reactant.pdb product.pdb --parm7 real.parm7 --model-pdb ml_region.pdb \
-q 0 -m 1 --no-climb --max-nodes 8 --out-dir ./result_path_opt_quick
How it works¶
Preparing the endpoints: Each endpoint is pre-optimized (L-BFGS by default). The product is then rigidly aligned to the reactant by a Kabsch fit on the frozen atoms (on all atoms if there are none), and the frozen atoms are moved step by step onto their reactant positions while the other atoms relax. The frozen atoms are the Frozen-MM layer together with any
--freeze-atoms.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
├─ hei.xyz # HEI, the TS candidate, with its energy on the comment line
├─ hei.pdb # Same HEI as PDB
├─ preopt/endNN/ # Endpoint pre-optimization files (--preopt)
├─ align_refine/ # Endpoint alignment and relaxation files
├─ dmf_initial_trj.xyz # Interpolated starting path (DMF only)
├─ result.json # Summary (--out-json)
└─ summary.json # Same content as result.json (with --out-json)
Open final_geometries_trj.xyz to watch the path. The PDB files mark the layers in the B-factor column (ML 0, Movable-MM 10, Frozen-MM 20), so pass hei.pdb to tsopt with the same --parm7 and --model-pdb; with hei.xyz, add --ref-pdb. mmCIF input, and PDB input too large for the PDB columns, also get .cif files that keep the original identifiers; --no-convert-files writes only the .xyz files. With DMF, the IPOPT logs dmf_fbenm_ipopt.out and dmf_ipopt.out are also written. --dump also keeps the optimizer trajectories.
The console prints the MEP progress cycle by cycle, with timings.
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 path-opt.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
2 paths |
(required) |
Reactant and product, in that order, after one |
|
integer |
|
Charge of the ML region. Required unless |
|
integer |
|
Spin multiplicity (2S+1) |
|
text |
|
Total ligand charge (for example |
|
text |
|
Backend of the ML region ( |
|
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) |
|
text |
|
Comma-separated 1-based atom indices to freeze in every image, added to YAML |
|
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 2 of Step-by-step installation, before you run--mep-mode dmf;pydmfcomes withmlmm-toolkit. The default--dmf-backend gpustops with an error when CUDA is unavailable; use--dmf-backend cputhen, or after a GPU out-of-memory error.Options DMF ignores:
--climband--fix-endsare accepted but not used by DMF.One template for XYZ endpoints:
--ref-pdbtakes a single full-system PDB, applied to both.xyzendpoints.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