Firstly a matrix with structure dependent constants and one with their radial derivatives (if the calculation of pressure is required), are built before the start of the self-consistency loop:
(10) |
The Gaunt coefficients:
(11) |
(12) |
(13) |
The components of the potential in a spherical wave expansion are a straightforward product of the structure matrix and the multipole block vector:
(14) |
(15) |
(16) |
in is required for accurate calculation of the forces and this tends to increase its size very significantly for elements. The forces due to the Madelung terms are:
(17) |
A complication arises however in the nonorthogonal case due to offsite contributions:
(18) |
And additional forces:
(19) |
(20) |
The quantity needs to be calculated in every iteration:
(21) |