Blocked-Davidson algorithm
The workflow of the blocked-Davidson iterative matrix diagonalization scheme implemented in VASP is as follows:[1][2]
- Take a subset (block) of $\displaystyle{ n_1 }$ orbitals out of the total set of NBANDS orbitals:
$\displaystyle{ \{ \psi_n| n=1,..,N_{\rm bands}\}\Rightarrow \{ \psi^1_k| k=1,..,n_1\} }$.
- Extend the subspace spanned by $\displaystyle{ \{\psi^1\} }$ by adding the preconditioned residual vectors of $\displaystyle{ \{\psi^1\} }$:
$\displaystyle{ \left \{ \psi^1_k \, / \, g^1_k = \left (1- \sum_{n=1}^{N_{\rm bands}} | \psi_n \rangle \langle\psi_n | {\bf S} \right) {\bf K} \left ({\bf H} - \epsilon_{\rm app} {\bf S} \right ) \psi^1_k \, | \, k=1,..,n_1 \right \}. }$
- Rayleigh-Ritz optimization (“subspace rotation”) within the $\displaystyle{ 2n_1 }$-dimensional space spanned by $\displaystyle{ \{\psi^1/g^1\} }$, to determine the $\displaystyle{ n_1 }$ lowest eigenvectors:
$\displaystyle{ {\rm diag}\{\psi^1/g^1\} \Rightarrow \{ \psi^2_k| k=1,..,n_1\} }$
- Extend the subspace with the residuals of $\displaystyle{ \{\psi^2\} }$:
$\displaystyle{ \left \{ \psi^2_k \,/ \, g^1_k \, / \, g^2_k = \left (1- \sum_{n=1}^{N_{\rm bands}} | \psi_n \rangle \langle\psi_n | {\bf S} \right ) {\bf K} \left ({\bf H} - \epsilon_{\rm app} {\bf S} \right) \psi^2_k \, | \, k=1,..,n_1 \right \}. }$
- Rayleigh-Ritz optimization (“subspace rotation”) within the $\displaystyle{ 3n_1 }$-dimensional space spanned by $\displaystyle{ \{\psi^1/g^1/g^2\} }$:
$\displaystyle{ {\rm diag}\{\psi^1/g^1/g^2\} \Rightarrow \{ \psi^3_k| k=1,..,n_1\} }$
- If need be the subspace may be extended by repetition of this cycle of adding residual vectors and Rayleigh-Ritz optimization of the resulting subspace:
$\displaystyle{ {\rm diag}\{\psi^1/g^1/g^2/../g^{d-1}\}\Rightarrow \{ \psi^d_k| k=1,..,n_1\} }$ Per default VASP will not iterate deeper than $\displaystyle{ d=4 }$, though it may break off even sooner when certain criteria that measure the convergence of the orbitals have been met.
- When the iteration is finished, store the optimized block of orbitals back into the set:
$\displaystyle{ \{ \psi^d_k| k=1,..,n_1\} \Rightarrow \{ \psi_k| k=1,..,N_{\rm bands}\} }$.
- Move on to the next block $\displaystyle{ \{ \psi^1_k| k=n_1+1,..,2 n_1\} }$.
- When LDIAG=.TRUE. (default), a Rayleigh-Ritz optimization in the complete subspace $\displaystyle{ \{ \psi_k| k=1,..,N_{\rm bands}\} }$ is performed after all orbitals have been optimized.
The blocksize $\displaystyle{ n_1 }$ used in the blocked-Davidson algorithm can be set by means of the NSIM tag. In principle $\displaystyle{ n_1= 2\times }$ NSIM, but for technical reasons it needs to be dividable by an integer N:
$\displaystyle{ n_1 = {\rm int}\left(\frac{2*{\rm NSIM} + N - 1}{N}\right) N }$
where $\displaystyle{ N }$ is the “number of band groups per k-point group”:
$\displaystyle{ N = \frac{{\rm \#\; of\; MPI\; ranks}}{{\rm IMAGES}*{\rm KPAR}*{\rm NCORE}} }$
(see the section on parallelization basics).
As mentioned before, the optimization of a block of orbitals is stopped when either the maximum iteration depth (NRMM), or a certain convergence threshold has been reached. The latter may be fine-tuned by means of the EBREAK, DEPER, and WEIMIN tags. Note: we do not recommend you to do so! Rather rely on the defaults instead.
The blocked-Davidson algorithm is approximately a factor of 1.5-2 slower than the RMM-DIIS, but more robust.