# Self Consistent Field (SCF)¶

The SCF procedure searches for a self-consistent density. The self-consistent error is the square root of the integral of the squared difference between the input and output density of the cycle operator. When the SCF error is below a certain criterion, controlled by subkey Criterion of block key Convergence, convergence is reached. In case of bad convergence the SCF looks at the subkeys Mixing, and Degenerate, and the subkeys of block key DIIS.

Troubleshooting: SCF does not converge

## SCF block¶

SCF
Eigenstates Yes/No
Iterations integer
Method [DIIS | MultiSecant]
Mixing float
PMatrix Yes/No
Rate float
VSplit float
End

SCF
Type: Block Controls technical SCF parameters.
Eigenstates
Type: Bool The program knows two alternative ways to evaluate the charge density iteratively in the SCF procedure: from the P-matrix, and directly from the squared occupied eigenstates. By default the program actually uses both at least one time and tries to take the most efficient. If present, Eigenstates turns off this comparison and lets the program stick to one method (from the eigenstates).
Iterations
Type: Integer 300 Maximum number of cycles The maximum number of SCF iterations to be performed.
Method
Type: Multiple Choice DIIS [DIIS, MultiSecant] Choose the general scheme used to converge the density in the SCF. In case of scf problems one can try the MultiSecant alternative at no extra cost per SCF cycle. For more details see the DIIS and MultiSecantConfig block.
Mixing
Type: Float 0.075 Initial ‘damping’ parameter in the SCF procedure, for the iterative update of the potential: new potential = old potential + mix (computed potential-old potential). Note: the program automatically adapts Mixing during the SCF iterations, in an attempt to find the optimal mixing value.
PMatrix
Type: Bool If present, evaluate the charge density from the P-matrix. See also the key Eigenstates.
Rate
Type: Float 0.99 Minimum rate of convergence for the SCF procedure. If progress is too slow the program will take measures (such as smearing out occupations around the Fermi level, see key Degenerate of block Convergence) or, if everything seems to fail, it will stop
VSplit
Type: Float 0.05 To disturb degeneracy of alpha and beta spin MOs the value of this key is added to the beta spin potential at the startup.

## Convergence¶

All options and parameters related to the convergence behavior of the SCF procedure are defined in the Convergence block key. Also the finite temperature distribution is part of this

Convergence
Criterion float
CriterionFactor float
Degenerate string
ElectronicTemperature float
InitialDensity [rho | psi]
LessDegenerate Yes/No
NoDegenerate Yes/No
NumBoltz integer
SpinFlip integer_list
startwithmaxspin Yes/No
End

Convergence
Type: Block Options and parameters related to the convergence behavior of the SCF procedure.
Criterion
Type: Float Criterion for termination of the SCF procedure. The default depends on the NumericalQuality and on the number of atoms in the system. Can be used for EngineAutomations
CriterionFactor
Type: Float 1.0 Multiply Criterion (which depends on system and quality) with this factor. Can be used for EngineAutomations
Degenerate
Type: String default Smooths (slightly) occupation numbers around the Fermi level, so as to insure that nearly-degenerate states get (nearly-) identical occupations. Be aware: In case of problematic SCF convergence the program will turn this key on automatically, unless the key ‘Nodegenerate’ is set in input. The smoothing depends on the argument to this key, which can be considered a ‘degeneration width’. When the argument reads default, the program will use the value 1e-4 a.u. for the energy width.
ElectronicTemperature
Type: Float 0.0 Hartree (KT) Specify this key for a gradient independent electronic temperature
InitialDensity
Type: Multiple Choice rho [rho, psi] The SCF is started with a guess of the density. There are the following choices RHO: the sum of atomic density. PSI: construct an initial eigensystem by occupying the atomic orbitals. The guessed eigensystem is orthonormalized, and from this the density is calculated/
LessDegenerate
Type: Bool No If smoothing of occupations over nearly degenerate orbitals is applied (see Degenerate key), then, if this key is set in the input file, the program will limit the smoothing energy range to 1e-4 a.u. as soon as the SCF has converged ‘halfway’, i.e. when the SCF error has decreased to the square root of its convergence criterion.
NoDegenerate
Type: Bool No This key prevents any internal automatic setting of the key DEGENERATE.
NumBoltz
Type: Integer 10 The electronic temperature is done with a Riemann Stieltjes numerical integration, between zero and one occupation. This defines the number of points to be used.
SpinFlip
Type: Integer List Flip spin for atoms List here the atoms for which you want the initial spin polarization to be flipped. This way you can distinguish between ferromagnetic and anti ferromagnetic states. Currently, it is not allowed to give symmetry equivalent atoms a different spin orientation. To achieve that you have to break the symmetry.
startwithmaxspin
Type: Bool Yes To break the initial perfect symmetry of up and down densities there are two strategies. One is to occupy the numerical orbitals in a maximum spin configuration. The alternative is to add a constant to the potential. See also Vsplit key.

## DIIS¶

The DIIS procedure to obtain the SCF solution depends on several parameters. Default values can be overruled with this block.

DIIS
CHuge float
CLarge float
Condition float
DiMix float
DiMixMax float
DiMixMin float
NCycleDamp integer
NVctrx integer
Variant [DIIS | LISTi | LISTb | LISTd]
End

DIIS
Type: Block Parameters for the DIIS procedure to obtain the SCF solution
Adaptable
Type: Bool Yes Change automatically the value of dimix during the SCF.
CHuge
Type: Float 20.0 No DIIS (but damping) when coefs > When the largest coefficient in the DIIS expansion exceeds this value, damping is applied
CLarge
Type: Float 20.0 Reduce DIIS space when coefs > When the largest DIIS coefficient exceeds this value, the oldest DIIS vector is removed and the procedure re-applied
Condition
Type: Float 1000000.0 The condition number of the DIIS matrix, the largest eigenvalue divided by the smallest, must not exceed this value. If this value is exceeded, this vector will be removed.
DiMix
Type: Float 0.2 Bias DIIS towards latest vector with Mixing parameter for the DIIS procedure
DiMixMax
Type: Float -1.0 For adaptive diis: A negative value means automatic, see DiMixatnvctrx. If positive it is an absolute upper bound for (adaptive) dimix
DiMixMin
Type: Float 0.01 An absolute lower bound for adaptive dimix.
NCycleDamp
Type: Integer 1 Do not start DIIS before cycle Number of initial iterations where damping is applied, before any DIIS is considered
NVctrx
Type: Integer 20 Size of DIIS space Maximum number of DIIS expansion vectors
Variant
Type: Multiple Choice DIIS [DIIS, LISTi, LISTb, LISTd] Which variant to use. In case of problematic SCF convergence, first try MultiSecant, and if that does not work the LISTi is the advised method. Note: LIST is computationally more expensive per SCF iteration than DIIS.

## Multisecant¶

For more detais on the multisecant method see ref [1].

MultiSecantConfig
CMax float
InitialSigmaN float
MaxSigmaN float
MaxVectors integer
MinSigmaN float
End

MultiSecantConfig
Type: Block Parameters for the Multi-secant SCF convergence method.
CMax
Type: Float 20.0 Max coeff Maximum coefficient allowed in expansion
InitialSigmaN
Type: Float 0.1 Initial This is a lot like a mix factor: bigger means bolder
MaxSigmaN
Type: Float 0.3 Max Upper bound for the SigmaN parameter
MaxVectors
Type: Integer 20 Number of cycles to use Maximum number of previous cycles to be used
MinSigmaN
Type: Float 0.01 Min Lower bound for the SigmaN parameter

## DIRIS¶

In the DIRIS block, which has the same options as the DIIS block, you can specify the DIIS options to be used in the Dirac subprogram, for numerical single atom calculations, which constructs the radial tables for the NAOs.

 [1] L. D. Marks and D. R. Luke, Robust mixing for ab initio quantum mechanical calculations, Phys. Rev. B 78, 075114 (2008)