A function that returns a dictionary with parameters that determine the convergence criteria of the self-consistent iteration.
The density-functional methods used in ATK to solve the electronic structure problem depend on the electron density as an input parameter to calculate the Hamiltonian. At the same time, the density can only be calculated once the Hamiltonian has been diagonalized. To resolve this paradox, ATK uses a method in which the output and input quantities are mixed in a self-consistent iteration scheme, until the difference between the input and the output is below a specified tolerance. To avoid non-convergence, there is a also a criterion for specifying the maximum number of iteration steps to be taken, before giving up.
List of arguments
The control quantity that is used to measure whether the convergence tolerance has been reached.
Default:
IterationControl.TotalEnergy
The maximum number of steps before the iteration will halt if an equilibrium is not found.
Default: 100
The iteration is considered to be converged if the change
in the quantity specified by the convergence
criterion between two successive iterations
falls below the tolerance.
Default:
1.0e-5
Decrease tolerance (increase accuracy):
from ATK.TwoProbe import * low_tolerance = iterationControlParameters( tolerance = 1.0e-6 ) accurate_method = KohnShamMethod(iteration_control_parameters=low_tolerance) scf = executeSelfConsistentCalculation(method=accurate_method)
Change tolerance and quantity used to determine convergence:
from ATK.TwoProbe import * iteration_control = iterationControlParameters( tolerance = 1.0e-4, criterion = IterationControl.DensityMatrix, )
The variable criterion
can assume only one of the following values:
IterationControl.TotalEnergy
This is the default convergence criterion.
In this case, only
the total energy is measured against the tolerance.
IterationControl.DensityMatrix
In this case, only
the density matrix is measured against the tolerance.
IterationControl.TotalEnergyAndDensityMatrix
Both the total energy and the density matrix are measured against the tolerance.
IterationControl.Strict
In this case, the density matrix, the band-structure energy, and the Hamiltonian are measured against the tolerance.
Notice that the convergence status can be obtained, e.g.
from the convergence
progress information printed on the terminal when running with a verbosity level larger
than zero.
A few notes on the variable tolerance
are listed in the following.
The tolerance criteria in ATK are not relative, but
absolute. If the iteration
control is performed on the total energy or the band-structure energy the
change in these quantities is measured against the tolerance level. However,
in the case that the iteration control quantity is a matrix (e.g., the
Hamiltonian or the density matrix) it is a norm of the
difference between the old and new matrix which is compared with the tolerance.
At present, this norm consists of taking the maximum value of the
difference between the corresponding matrix elements
of the old and new matrix.
This means that the tolerance should be interpreted as given in Rydberg
for the total energy, the band-structure energy, and the Hamiltonian, and
as dimensionless for the density matrix. The tolerance
parameter itself should, however, always be given without any unit!
The choice of performing a calculation using the
default values for the variables
tolerance (1.e-5) and
criterion
(IterationControl.TotalEnergy) means that the
self-consistent iterative cycle is terminated if the variation of the
Total Energy is smaller than 1.0e-5 Rydberg (equivalent
to slightly more than 1/10 of a meV). This corresponds
to the standard accuracy of SCF calculations.
When performing calculations using a
different criterion than the default one,
an accuracy which is equivalent to the one provided by the default choice
can be often obtained by increasing the tolerance of one
(or even more, in some cases) order of magnitude.
In order to achieve a better accuracy than the one corresponding
to the choice of default values, it is often a good idea to decrease the tolerance
by one or two orders of magnitude. Often, but not always, this
will only add a few extra iterations to the calculation, since the Pulay mixing
algorithm usually performs very well once it approaches equilibrium.
If only a fast rough estimation of the results is needed
the accuracy can be lowered by increasing the tolerance value.
In order to ensure efficiency, the total energy used for the two criteria
IterationControl.TotalEnergyAndDensityMatrix and
IterationControl.TotalEnergy is only evaluated when the calculation
is close to convergence. The change in the density matrix is used as a criterion for
checking if the calculation is close to converge. Below, the output for a verbose calculation
using the total-energy criterion is shown. Note how the evaluation of the total energy is
setting in after the 6th iteration. The change in total energy is evaluated for the first time
one iteration later, because it depends on the result of the previous iteration.
# sc 0 : Fermi Energy = 0.00000 Ry # sc 1 : Fermi Energy = -0.21613 Ry dRho = 1.0317E+00 # sc 2 : Fermi Energy = -0.17129 Ry dRho = 6.1782E-02 # sc 3 : Fermi Energy = -0.01558 Ry dRho = 2.1349E-01 # sc 4 : Fermi Energy = -0.03431 Ry dRho = 1.0472E-01 # sc 5 : Fermi Energy = 0.00167 Ry dRho = 5.4534E-02 # sc 6 : Fermi Energy = 0.00428 Ry dRho = 4.9847E-03 # sc 7 : Fermi Energy = 0.00590 Ry Etot = -34.19669 Ry dRho = 2.5855E-03 # sc 8 : Fermi Energy = 0.00561 Ry Etot = -34.19669 Ry dRho = 6.2618E-04 dEtot = -2.3161E-07 Ry
See the section on iteration mixing parameters for a discussion of the parameters that determine how the mixing is controlled in the self-consistent iteration.