Figure 1
Pseudocode for updating the magnetic and structure Fourier components using the intermediate results. For a given change in the supercell at location (R1, R2, R3, j), a nested for loop of size N1 × N2 × N3 is needed to update the Fourier components. By comparison, recalculation of the DFT by FFT requires on the order of
N1N2N3log2(N1N2N3) operations. |