(sec:scfconv.detailed)= # SCF Convergence SCF convergence is a pressing problem in any electronic structure package because the total execution times increases linearly with the number of iterations. Thus, it remains true that the best way to enhance the performance of an SCF program is to make it converge better. In some cases, especially for open-shell transition metal complexes, convergence may be very difficult. ORCA makes a dedicated effort to achieve reasonable SCF convergence for these cases without compromising efficiency. Another issue is whether the solution found by ORCA is stable, i.e. a minimum on the surface of orbital rotations. Especially for open-shell singlets it can be hard to achieve a broken-symmetry solution. The SCF stability analysis (section {ref}`sec:scfstabilityanalysis.detailed`) may be able to help in such situations. Please also note that if `! TRAH` is used the solution must be a true local minimum though not necessarily a global. (sec:scfconv.tol.detailed)= ## Convergence Tolerances Before discussing how to converge a SCF calculation it should be defined what is meant by "converged". ORCA has a variety of options to control the target precision of the energy and the wavefunction that can be selected in the `% scf` block, or with a simple input line keyword that merges the criterion label with "SCF", e.g. `! StrongSCF` or `! VeryTightSCF`: ```orca %scf Convergence # The default convergence is between medium and strong Sloppy # very weak convergence Loose # still weak convergence Medium # intermediate accuracy Strong # stronger Tight # still stronger VeryTight # even stronger Extreme # close to numerical zero of the computer # in double precision arithmetic end ``` Like other keys, `Convergence` is a compound key that assigns default values to a variety of other variables given in the box below. In table {ref}`compoundConvergenceThresholds` we present the chosen values for each compound key. If the corresponding simple inputs are given (`StrongSCF`, `VeryTightSCF`, \...etc), then in addition the values of table {ref}`compoundAdditionalConvergenceThresholds` are also set. The default convergence criteria are reasonable and should be sufficient for most purposes. For a cursory look at populations weaker convergence may be sufficient, whereas other cases may require stronger than default convergence. Note that `Convergence` does not only affect the target convergence tolerances but also the integral accuracy as discussed in the section about direct SCF and alike. **This is very important: if the error in the integrals is larger than the convergence criterion, a direct SCF calculation cannot possibly converge.** The convergence criteria are always printed in the output. Given below is a list of the convergence criteria for `! TightSCF`, which is often used for calculations on transition metal complexes. ```orca %scf TolE 1e-8 # energy change between two cycles TolRMSP 5e-9 # RMS density change TolMaxP 1e-7 # maximum density change TolErr 5e-7 # DIIS error convergence TolG 1e-5 # orbital gradient convergence TolX 1e-5 # orbital rotation angle convergence ConvCheckMode 2 # = 0: check all convergence criteria # = 1: stop if one of criterion is met, this is sloppy! # = 2: check change in total energy and in one-electron energy # Converged if delta(Etot)$ 0 K $\rho^{FOD}$ is stored on disk in the file `Basename.scfp_fod` which is included in the general `Basename.densities` container). - Since the $\hat{S}^2$ expectation value is not defined for fractional occupation numbers, its printout is omitted. :::