

Compute the total KS potential in real space.
 Use a 3DFFT to put the reciprocal portion (from Hartree and local external) into real space on the discrete grid.
 Add the two contributions to the KS potential.
Compute the derivative of the three terms with respect to the Fourier coefficients of the states:
 Use 3DFFTs to compute the real space rep. of each state.
 Multiply the state by the KS potential
 3DFFT the product back to real space to produce the exact derivative of the energy expression evaluated.
Compute the nonlocal energy and kinetic energy of noninteracting electrons and the derivatives.
Evolve the Fourier coefficients of states towards the minima using a solver (e.g. constrained conjugate gradient).
Enforce Orthonormality : Fix finite step size errors in the solver.


