Choosing the method
| Option | Method |
|---|---|
(none) or --gfn 2 | GFN2-xTB, the default |
--gfn 1 | GFN1-xTB |
--gfn 0 | GFN0-xTB, no SCF |
--gfnff | GFN-FF force field |
Use GFN2 unless there is a specific reason not to. The differences are summarised in the table in chapter 16 of the ORCA guide.
Charge and spin
xtb takes the number of unpaired electrons instead of the multiplicity: --uhf 2 for a
triplet, --uhf 1 for a doublet. ORCA's multiplicity 3 is xtb's --uhf 2, which is easy to get
wrong when copying settings across.
xtb anion.xyz --chrg -1
xtb triplet.xyz --uhf 2
xtb cation.xyz --chrg 1 --uhf 1
Files named .CHRG and .UHF in the working directory, each holding one number, are read without
any options. CREST reads them too, so for ions and radicals it pays to create them once.
Geometry optimisation
xtb ala.xyz --opt # default convergence (normal)
xtb ala.xyz --opt tight # use tight or better before frequencies
From loosest to tightest the levels are crude, sloppy, loose, lax, normal, tight, vtight and extreme.
The output must contain GEOMETRY OPTIMIZATION CONVERGED. xtbopt.xyz is written even when
the run stops at the iteration limit, so its existence alone does not mean convergence.
Frequencies and thermochemistry
xtb xtbopt.xyz --hess # Hessian at the given geometry
xtb ala.xyz --ohess tight # optimise, then Hessian
A Hessian run goes on to zero-point energy, enthalpy and entropy and prints TOTAL FREE ENERGY.
Low-frequency modes are interpolated towards free rotors instead of harmonic oscillators by default (mRRHO), which
keeps their entropy from being inflated. If the structure is not a minimum, imaginary frequencies are printed as negative numbers.
Example: gas-phase optimisation and frequencies
Alanine dipeptide optimised in the gas phase, followed by frequencies.
xtb ala.xyz --gfn 2 --opt tight > opt.out
xtb ala.xyz --gfn 2 --ohess tight > ohess.out
| Quantity | Value |
|---|---|
| Total energy (Eh) | −32.975847892266 |
| HOMO–LUMO gap (eV) | 4.480 |
| φ / ψ (°) | −81.4 / 74.0 (C7eq) |
| Free energy (Eh, 298 K) | −32.833577987317 |
| Lowest frequencies (cm⁻¹) | 51.78, 63.82, 81.38, 102.62 (no imaginary frequencies) |
| Wall time | 0.52 s for the optimisation, 0.68 s for optimisation plus frequencies (8 cores) |
The optimisation ended in C7eq, where an intramolecular N–H···O=C hydrogen bond closes a seven-membered ring. There are no imaginary frequencies, so it is a true minimum. The zero-point energy is 0.1806 Eh (113 kcal/mol); the free energy adds thermal corrections and entropy on top. There are three modes below 100 cm⁻¹, and it is the entropy of low-frequency modes like these that the mRRHO correction changes most.
Constraints and scans
To fix or scan a distance or dihedral, pass a detailed input file with --input. Atoms are numbered from 1
in xyz-file order (ORCA counts from 0).
$constrain
force constant=1.0
dihedral: 2, 4, 5, 7, -60.0
$end
$scan
1: -180.0, 180.0, 37
$end
xtb ala.xyz --opt --input scan.inp > scan.out
The 1: in $scan refers to the first constraint defined in $constrain.
This example steps φ from −180° to 180° in 37 points and relaxes everything else at each point; the results collect in
xtbscan.log. To keep atoms from moving at all, list them in a $fix block, for example atoms: 1-5.