The initialisation of the density-matrix is described in chapter 8. The functional minimisation consists of two nested loops. The inner loop consists of the minimisation with respect to the density-kernel, while keeping the support functions constant. As shown in section 7.4, this corresponds to making the density-matrix commute with the Hamiltonian in the representation of the current support functions. The outer loop consists of the support function minimisations, which in section 7.4 were shown to correspond to solving the Kohn-Sham equations. In general, we find that two or three cycles of the inner loop for each cycle of the outer loop suffice, and this is demonstrated in figure 7.1 in which three cycles of the inner loop appears to give the best performance to computational cost ratio.
![]() |
The conjugate gradients scheme is used to determine the search directions from the gradients, and these gradients are then projected perpendicular to the electron number gradient as described in section 7.7.2. We approximate the total functional by a parabola along the search direction, using the initial value of the functional, the first derivative of the functional at the initial position (which is simply the scalar product of the steepest descent and search directions) and the value of the functional at some trial position. The value of the functional at the predicted minimum is then evaluated. If this value deviates significantly from the value predicted by the quadratic fit, a cubic fit is constructed using this new value of the functional. In general, this is only necessary for the first few steps, and the parabolic fit is very good. In the case of the support function variation, the support functions are altered to give the correct number of electrons before each evaluation of the functional. The conjugate gradients procedure is reset after a finite number of steps, and this is illustrated in figure 7.2 for the inner and outer loops. In both cases, we see that there is little advantage in conjugating more than eight gradients before resetting.
![]() |
Once the functional has been minimised, the correction to the total energy
is calculated. The whole calculation is generally repeated for a few different
values of to ensure that the corrected energy has indeed
converged.