Above formulas for the total energy and forces were given in their Fourier space representation. Many terms are in fact calculated most easily in this form, but some terms would require double sums over plane waves. In particular, the calculation of the charge density and the wavefunction gradient originating from the local potential
![]() |
Both of these modules contain a Fourier transform of the wavefunctions from
space to the real space grid. In addition, the calculation of the wavefunction
forces requires a back transform of the product of the local potential with the
wavefunctions, performed on the real space grid, to Fourier space.
This leads to a number of Fourier transforms that is three times the
number of states in the system. If enough memory is available on the computer
the second transform of the wavefunctions to the grid can be avoided if the
wavefunctions are stored in real space during the computation of the density.