next up previous contents index
Next: Saving Computer Time Up: Implementation Previous: Fast Fourier Transforms   Contents   Index

Density and Force Calculations in Practice

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

$\displaystyle \sum_{\bf G'} V^\star_{\rm loc}({\bf G} - {\bf G'}) c_{i}({\bf G'}) \enspace .$ (234)

The expression in Eq. (234) is a convolution and can be calculated efficiently by a series of Fourier transforms. The flow charts of this calculations are presented in Fig. 6.
Figure 6: Flow chart for the calculation of the charge density (on the left) and the force on the wavefunction from the local potential (on the right). The charge density calculation requires $ N_{\rm b}$ (number of states) three dimensional Fourier transforms. For the application of the local potential two Fourier transforms per state are needed. If enough memory is available the first transform can be avoided if the wavefunction on the real space grid are stored during the density calculation.
Image dft-flowchart

Both of these modules contain a Fourier transform of the wavefunctions from $ {\bf G}$ 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.


next up previous contents index
Next: Saving Computer Time Up: Implementation Previous: Fast Fourier Transforms   Contents   Index
Costas Bekas 2008-07-04