Basic usage
Add Opt to the keyword line. The example below optimises formaldehyde
(HCHO) at B3LYP/SV(P):
! B3LYP D4 def2-SVP Opt
* int 0 1
C 0 0 0 0.000 0.000 0.00
O 1 0 0 1.203 0.000 0.00
H 1 2 0 1.107 122.016 0.00
H 1 2 3 1.107 122.016 180.00
*
Pure GGA functionals (e.g. BP86) enable the RI approximation automatically, so no
extra option is needed. For hybrids, pair the run with RIJCOSX def2/J:
# RI + BP86 — extremely fast optimisation
! BP86 D4 def2-SVP Opt
# Hybrids pair with RIJCOSX
! B3LYP D4 def2-TZVP RIJCOSX def2/J Opt
Coordinate systems — Cartesian vs redundant internal
In ORCA 6 the Opt keyword defaults to redundant internal
coordinates. This coordinate system represents the geometry as a chemically
meaningful set of bond lengths, angles, and dihedrals, and usually converges fastest.
You can force Cartesian coordinates instead, but only in special cases:
| Keyword | Coordinates | When to use |
|---|---|---|
Opt | Redundant internal | Almost all molecules — the default. |
COpt | Cartesian | Very large systems, fragment optimisations, extremely flat surfaces. |
Reading the convergence criteria
Each optimisation step evaluates five convergence indicators. The geometry is declared converged once they all fall below their thresholds.
*********************HURRAY********************
*** THE OPTIMIZATION HAS CONVERGED ***
*************************************************
------------------------|Geometry convergence|---------------------------
Item value Tolerance Converged
---------------------------------------------------------------------------
Energy change -0.0000001234 Eh 0.0000050000 YES
RMS gradient 0.0000234567 Eh/bohr 0.0001000000 YES
MAX gradient 0.0000456789 Eh/bohr 0.0003000000 YES
RMS step 0.0001234567 bohr 0.0020000000 YES
MAX step 0.0002345678 bohr 0.0040000000 YES
---------------------------------------------------------------------------
Thresholds tighten in three steps: NormalOpt (default),
TightOpt, VeryTightOpt.
| Indicator | NormalOpt | TightOpt | VeryTightOpt |
|---|---|---|---|
| Energy change (Eh) | 5e-6 | 1e-6 | 2e-7 |
| Max gradient (Eh/bohr) | 3e-4 | 1e-4 | 3e-5 |
| RMS gradient | 1e-4 | 3e-5 | 1e-5 |
| Max step (bohr) | 4e-3 | 2e-3 | 6e-4 |
| RMS step | 2e-3 | 1e-3 | 3e-4 |
If a frequency calculation is the next step, converge the geometry to at least
TightOpt. Otherwise the frequencies are evaluated at a point too far
from the true equilibrium, and you may see spurious imaginary modes.
Constrained optimisation
Use this when you want to freeze part of a reaction path, hold specific bonds or
angles fixed, etc. Write the constraints inside a %geom Constraints
block:
! B3LYP D4 def2-SVP Opt
%geom Constraints
{ B 0 1 1.25 C } # freeze 0–1 bond length at 1.25 Å
{ A 2 0 3 120.0 C } # freeze 2-0-3 angle at 120°
{ D 3 1 0 2 180.0 C } # freeze 3-1-0-2 dihedral at 180°
{ C 5 C } # freeze atom 5 (full Cartesian)
end
end
* xyzfile 0 1 mol.xyz
The first character inside the braces selects the constraint type:
| Type | Syntax | Meaning |
|---|---|---|
| Bond length | { B N1 N2 value C } | Freeze the N1–N2 distance at value (Å). |
| Bond angle | { A N1 N2 N3 value C } | Freeze the N1–N2–N3 angle at value (°). |
| Dihedral | { D N1 N2 N3 N4 value C } | Freeze the four-atom dihedral. |
| Cartesian | { C N1 C } | Freeze atom N1's (x, y, z). |
The value is optional. If omitted, the current value in the input geometry
is preserved. Cartesian constraints accept no value — they always use the initial
position. Atom indices are 0-based, the opposite of the
int coordinate input — easy to get wrong, watch out.
Wildcards and ranges
Multiple coordinates can be tied down in one go:
%geom Constraints
{ B 3 * C } # all bonds that involve atom 3
{ B * * C } # every bond
{ A * 5 * C } # all angles centred on atom 5
{ C 10:17 C } # Cartesian-freeze atoms 10 through 17
end
end
Inverse constraints
To release only a few coordinates and fix everything else, list the
coordinates you want to be free and add invertConstraints true:
%geom Constraints
{ B 0 1 C }
end
invertConstraints true # optimise only the C–O distance, freeze everything else
end
Hydrogen-only / partial optimisation
Useful for large active sites or X-ray structures where you want to relax only the hydrogens:
%geom optimizehydrogens true
end
Relaxed surface scan
Step one coordinate from one value to another and at each point relax everything else — the standard tool for exploring a reaction coordinate or a conformational change.
# Scan the H–O–O–H dihedral of H2O2 from 0° to 180° in 19 points
! B3LYP D4 def2-SVP Opt
%geom Scan
D 0 1 2 3 = 0.0, 180.0, 19 # dihedral 0 → 180, 19 points
end
end
* xyz 0 1
H 0.000 0.872 0.873
O 0.000 0.625 -0.085
O 0.000 -0.625 -0.085
H 0.000 -0.872 0.873
*
After the scan ORCA writes the (coordinate value, energy) pairs to
basename.relaxscanact.dat, and every intermediate geometry is appended
to basename_trj.xyz for visualisation.
For reaction-coordinate scans it is often smoother to go "from outside in" (long distance → short distance) than the other way around. Starting from a stretched geometry the system is already partially relaxed, and the scan is less likely to fall into local minima.
Multidimensional scans
Scanning two coordinates simultaneously produces a surface:
%geom Scan
B 0 1 = 3.0, 1.0, 15
B 1 2 = 1.0, 3.0, 15
end
end
By default the two scans combine as a grid, giving 15 × 15 = 225 points. To run them
synchronously instead (pair the same indices, 15 points total), add
Simul_Scan true.
Choice of initial Hessian
The optimisation algorithm needs an approximate Hessian (matrix of second
derivatives) at each step. The default is a model Hessian
(Almloef), which works well for most organic molecules. For tricky
systems other options are worth trying:
%geom
InHess Almloef # default, robust
end
| Option | Description |
|---|---|
Almloef | Default. Almlöf model. |
Lindh | Lindh model. Effective on flat surfaces. |
Swart | Swart model. Stable for transition metals. |
Schlegel | Schlegel model. General organics. |
Unit | Identity matrix. Last resort for very hard cases. |
Read | Read a .hess file from a previous frequency job. |
Reading a previously computed Hessian
Computing a Hessian cheaply first (e.g. a semi-empirical method) and using it as the initial guess can make a difficult optimisation tractable:
# Step 1: quick Hessian with XTB
! XTB2 NumFreq
* xyzfile 0 1 mol.xyz
$new_job
# Step 2: high-quality optimisation seeded with the XTB Hessian
! B3LYP D4 def2-TZVP Opt TightSCF
%geom
InHess Read
InHessName "mol_job1.hess"
end
* xyzfile 0 1
When the optimisation refuses to converge
Things to try when the optimisation diverges or oscillates:
- Raise the iteration cap:
%geom MaxIter 500 end. - Shrink the maximum step:
%geom MaxStep 0.1 end(bohr). - Switch to Cartesian: try
! COptinstead. - Improve the initial Hessian: the
InHess Readpattern shown above. - Sanity-check the input geometry: look for unreasonable bond lengths or overlapping atoms.
You now have a stationary point. Whether it really is a minimum — no imaginary frequencies — is what a frequency calculation tells you next.