The idea is to find a matrix which multiplied with the residual vector gives the exact error in the wavefunction. Formally this matrix can be written down and is given by
where is the exact eigenvalue for the band in interest. Actually the evaluation of this matrix is not possible, recognizing that the kinetic energy dominates the Hamiltonian for large G-vectors (i.e. ), it is a good idea to approximate the matrix by a diagonal function which converges to for large G vectors, and posses a constant value for small G vectors. We actually use the preconditioning function proposed by Teter et. al.
with being the kinetic energy of the residual vector. The preconditioned residual vector is then simply