GeinDFT
Home › SCF and optimisation

SCF and optimisation

The controls that decide how the self-consistent field converges, and how a geometry optimisation walks downhill.

The self-consistent field solves for the orbitals iteratively: each cycle builds a new potential from the current density and solves again, until the energy and the density stop changing. The defaults converge the overwhelming majority of closed-shell molecules without any attention, and the controls here exist for the cases that do not.

The SCF tab. The energy and density thresholds themselves are not here: they follow the Accuracy preset chosen on the Job tab, so the two cannot drift apart.
The SCF tab. The energy and density thresholds themselves are not here: they follow the Accuracy preset chosen on the Job tab, so the two cannot drift apart.

The SCF controls

ControlDefaultWhen to change it
Initial guessAtomic densities (SAD)SAD is the best general starting point. The alternatives matter mainly when comparing how different starts reach the same solution, which is a diagnostic rather than a production setting.
ConvergerAutomaticAutomatic picks a strategy and escalates if convergence stalls. Choose a specific one when you are investigating a difficult case and want the behaviour fixed.
Max iterations125Raise it for a system that is converging steadily but slowly. A calculation that is oscillating will not be rescued by more iterations; it needs a level shift or damping.
DIIS subspace12The number of previous iterations used to extrapolate. Smaller can help a system that oscillates; larger rarely helps.
Level shift0.00 EhPushes the empty orbitals up in energy, which stabilises a system whose occupied and empty orbitals are close together. Try 0.2 to 0.4 hartree for a stubborn open-shell or transition-metal case.
Damping0.00Mixes in the previous density to stop wild swings in the first iterations.
SmearingoffFractional occupations at an electronic temperature. For systems with a vanishing gap. The energy it produces is not the ground-state energy of an integer-occupied system, so use it to get convergence, then confirm without it.
Stability analysisoffAfter convergence, tests whether a lower solution exists with broken symmetry. Worth running for biradicals and for any result that looks too symmetric to be true.

When the SCF will not converge

  1. Check the structure first. A badly distorted geometry, two atoms almost on top of each other or a wrong multiplicity cause more convergence failures than any numerical setting.
  2. Add a level shift of 0.2 to 0.4 hartree.
  3. Add damping.
  4. Start from a converged calculation on a smaller basis set.
A calculation that does not converge produces no result at all, and the program says so rather than reporting the last iteration. An unconverged density gives forces that are not the derivative of any energy, which is why it cannot be allowed to continue into a geometry optimisation.

The Optimization tab

A geometry optimisation moves the atoms downhill on the energy surface using the analytic forces, in internal coordinates: bonds, angles and torsions, which are the coordinates the molecule actually moves along. It stops when five separate criteria are met at once, so that neither a flat torsion nor a small step on its own can declare success.

CriterionWhat it tests
Energy changeThe step changed the energy by less than the threshold.
Maximum forceNo single atom is still being pushed appreciably.
Root-mean-square forceThe forces as a whole have gone.
Maximum displacementNo atom moved far in the last step.
Root-mean-square displacementThe structure as a whole has stopped moving.
The Optimization tab, which carries the convergence thresholds and the step limit. The defaults are the standard criteria and are rarely worth changing.
The Optimization tab, which carries the convergence thresholds and the step limit. The defaults are the standard criteria and are rarely worth changing.

The tab also carries the step limit and lets the optimisation run in Cartesian coordinates instead, which is occasionally useful for a system whose connectivity confuses the internal coordinate generator.

A transition-state search needs a Hessian and is driven from the command line, with --ts. A frequency calculation afterwards is not optional there: exactly one imaginary frequency is what makes the structure a transition state.