  A general real-space multigrid algorithm for the self-consistent solution of
the Kohn-Sham equations appearing in the state-of-the-art electronic-structure
calculations is described. The most important part of the method is the
multigrid solver for the Schroedinger equation. Our choice is the Rayleigh
quotient multigrid method (RQMG), which applies directly to the minimization of
the Rayleigh quotient on the finest level. Very coarse correction grids can be
used, because there is no need to be able to represent the states on the coarse
levels. The RQMG method is generalized for the simultaneous solution of all the
states of the system using a penalty functional to keep the states orthogonal.
The performance of the scheme is demonstrated by applying it in a few molecular
and solid-state systems described by non-local norm-conserving
pseudopotentials.
