Jump to content

Requests for technical support from the VASP team should be posted in the VASP Forum.

ALGO

From VASP Wiki
Revision as of 13:15, 22 June 2026 by Huebsch (talk | contribs) (Issue #27: add SCC/direct Class column; prominent ALGO=None tip; Fast DAV->RMM confirmed (NELM=15))

ALGO = Normal | VeryFast | Fast | Conjugate | All | Damped | Subrot | Eigenval | Exact | None | Nothing | CHI | G0W0 | GW0 | GW | scGW0 | scGW | G0W0R | GW0R | GWR | scGW0R | scGWR | ACFDT | RPA | ACFDTR | RPAR | BSE | TDHF
Default: ALGO = Normal 

Description: The ALGO tag selects the electronic-minimization algorithm for the ground state (as of VASP.4.5), and/or the type of GW, response-function, and BSE calculation.



Electronic-minimization algorithms

For a self-consistent ground-state calculation, ALGO selects how the orbitals are optimized at each electronic step. Each value corresponds to a setting of the lower-level tag IALGO. The algorithms fall into two groups (see the Class column): the self-consistency-cycle methods iterate the charge density with a charge-density mixer, whereas the direct-optimization methods minimize the energy functional directly, updating the density from the orbitals without a charge mixer.

ALGO Algorithm IALGO Class Notes
Normal (default) blocked Davidson 38 self-consistency cycle Robust default, recommended for most calculations.
Fast blocked Davidson + RMM-DIIS 38 / 48 self-consistency cycle Davidson for the initial phase, then RMM-DIIS; one Davidson sweep per ionic step. Faster for molecular dynamics and relaxations. Updated in vasp.6 — select "Old Fast" for the vasp.5 version.
VeryFast RMM-DIIS 48 self-consistency cycle Fewest Hamiltonian evaluations but least robust. Not supported for hybrid functionals. Updated in vasp.6 — select "Old VeryFast" for the vasp.5 version. Combine with LDIAG = .FALSE. to conserve the initial orbital order.
Conjugate / All all-band conjugate gradient 58 direct optimization Simultaneous update of all orbitals (the two values are synonymous). Recommended together with the improved line-search algorithm (ISEARCH = 1).
Damped damped molecular dynamics 53 direct optimization Damped velocity-friction dynamics for the orbitals; useful for difficult systems. Combine with LDIAG = .FALSE. to conserve the initial orbital order.
Exact exact diagonalization 90 self-consistency cycle Full diagonalization; expensive, mainly for testing or when many empty states are required.
Subrot subspace rotation 4 self-consistency cycle Diagonalization within the subspace spanned by the current orbitals.
Eigenval recompute eigenvalues 3 postprocessing Recompute one-electron energies, the density of states, and selected postprocessing from fixed orbitals (e.g., read from the WAVECAR file).
None / Nothing no orbital update 2 postprocessing Recompute the density of states or postprocessing from fixed orbitals and one-electron energies (e.g., read from the WAVECAR file).


Conjugate, Subrot, Eigenval, None, and Nothing are supported as of vasp.5.2.9. The "Old Fast"/"Old VeryFast" variants (also "of"/"fo" and "ov"/"vo") are available in vasp.6 and select the corresponding vasp.5 algorithms.

Recommendations

  • Most systemsALGO=Normal (blocked Davidson) is the most robust choice and the default. ALGO=Fast (Davidson followed by RMM-DIIS) is a faster alternative, well suited to molecular dynamics and ionic relaxations.
  • Large systemsRMM-DIIS (Fast or VeryFast) reduces the O(N3) orthonormalization cost and is faster for large cells; combine with LREAL = Auto. VeryFast needs good initial orbitals (it uses a large NELMDL) and is the least robust on its own.
  • Insulators, and Hartree–Fock / meta-GGA / hybrid functionals — the direct optimizers ALGO=All (or Conjugate) are robust and recommended; use the improved line search (ISEARCH = 1) and set NBANDS close to half the number of electrons. ALGO=VeryFast is not supported for hybrid functionals.
  • Metals or small-gap systems with Hartree–Fock / meta-GGA — use ALGO=Damped with an appropriate time step (TIME) and a somewhat larger NBANDS.
  • Difficult convergence / charge sloshing — prefer the mixing (self-consistency-cycle) algorithms (Normal or Fast) and tune the mixing tags (AMIX, BMIX, …); see Troubleshooting electronic convergence.
  • Preparing many empty states (e.g., for GW or RPA) — run ALGO=Exact after a normal ground-state calculation.
  • Postprocessing from a WAVECARALGO=Eigenval recomputes one-electron energies and the density of states; ALGO=None recomputes occupancies and the density of states.

Output during the electronic minimization

At each electronic step, VASP writes one line to standard output and to the OSZICAR file. For example:

      N       E                     dE             d eps       ncg     rms          rms(c)
DAV:   1     0.230591997322E+03    0.23059E+03   -0.16471E+04 13824   0.142E+03
DAV:   2     0.128984547176E+02   -0.21769E+03   -0.20617E+03 12600   0.334E+02
DAV:   3    -0.871201735783E+01   -0.21610E+02   -0.21211E+02 14288   0.100E+02
DAV:   4    -0.952629881459E+01   -0.81428E+00   -0.81287E+00 15680   0.208E+01
DAV:   5    -0.954352651394E+01   -0.17228E-01   -0.17224E-01 15640   0.295E+00    0.119E+01
...

The leading label marks the algorithm (and phase) used in that step. Self-consistency-cycle runs always begin with NELMDL non-self-consistent blocked-Davidson sweeps, so the first steps are labeled DAV: regardless of the selected algorithm:

Label Algorithm
DAV: blocked Davidson (IALGO=38; ALGO=Normal and the initial phase of Fast)
RMM: RMM-DIIS (IALGO=48; ALGO=VeryFast and the main phase of Fast)
SDA: / CGA: steepest-descent / conjugate-gradient all-band step (IALGO=58; ALGO=All or Conjugate)
DMP: damped dynamics (IALGO=53; ALGO=Damped)
DIA: (subspace) diagonalization (ALGO=Exact or Subrot)
EIG: eigenvalue recomputation (ALGO=Eigenval)
NONE no orbital update (ALGO=None/Nothing)

The columns are:

  • N — index of the electronic (self-consistency) step.
  • E — total free energy in eV at this step.
  • dE — change of the total energy with respect to the previous step.
  • d eps — change of the band-structure energy (sum of one-electron eigenvalues) due to the orbital optimization in this step.
  • ncg — number of evaluations of the Hamiltonian acting on an orbital (HΨ) in this step.
  • rms — root-mean-square norm of the residual vector [math]\displaystyle{ |(\mathbf{H}-\epsilon\mathbf{S})\Psi\rangle }[/math], i.e., how well the current orbitals solve the eigenvalue problem.
  • The last column depends on the algorithm:
    • For the self-consistency-cycle algorithms (ALGO=Normal, Fast, and VeryFast — and the Exact, Subrot, Eigenval, and None modes), it is rms(c), the root-mean-square change of the charge density in the charge-density mixer. It appears only once charge-density mixing has started, i.e., after the NELMDL non-self-consistent steps.
    • For the direct-minimization algorithms (ALGO=All/Conjugate and Damped), which update the density directly without a charge mixer, the column is headed ort instead and reports the orthonormality error of the orbitals.

The electronic loop stops once the energy change dE (and, for the mixing algorithms, rms(c)) drops below the threshold set by EDIFF, or after NELM steps. See Setting up an electronic minimization for guidance on choosing these tags, and IALGO for further details on the algorithms.

ALGO for response functions, GW, and ACFDT/RPA

The following tags are available as of VASP.5.X.

  • ALGO=CHI calculates the response functions only.
  • ALGO=TDHF selects TDHF (or TDDFT) calculations using the VASP internal Cassida code see BSE calculations, (available as of VASP.5.2.12)
  • ALGO=BSE selects BSE calculations using the VASP internal Cassida code see BSE calculations, (available as of VASP.5.4.1)

GW tags have been renamed in VASP as follows

< 5.2.12 scGW scGW0 GW GW0 N/A N/A
>= 5.2.12, < 6 QPGW QPGW0 GW GW0 N/A N/A
>= 6 QPGW QPGW0 EVGW EVGW0 GWR GW0R

  • ALGO=EVGW0 selects single-shot G0W0 calculations or partially self-consistent GW calculations. The orbitals (wavefunctions) of the previous groundstate calculations are maintained, and G0W0 calculations are performed. If NELM is set, several iterations are performed, and the QP energies are updated in the calculation of G (for details, see EVGW0 calculations).
  • ALGO=EVGW selects single-shot G0W0 calculations or partially self-consistent GW calculations. The orbitals of the previous groundstate calculations are maintained, and G0W0 calculations are performed. If NELM is set, several iterations are performed, and the QP energies are updated in the calculation of G AND W (for details, see self-consistent EVGW and QPGW calculations).
  • ALGO=QPGW0 selects self-consistent GW calculations including off-diagonal components of the selfenergy. A full update of the QP energies AND one-electron orbitals is performed in the calculation of G only (for details see QPGW0 calculations).
  • ALGO=QPGW selects self-consistent GW calculations, including off-diagonal components of the selfenergy. A full update of the QP energies AND one-electron orbitals is performed in the calculations of G AND W (for details, see QPGW calculations).

Following tags are available as of VASP.6

  • ALGO=ACFDTRK in combination with LMP2LT = .TRUE. selects the low scaling MP2 total energy calculations (for details see the MP2 ground state Tutorial)
  • ALGO=GW0R selects self-consistent GW0 calculations, where only the Green's function G is updated from the corresponding Dyson. The screened potential W remains unchanged after the first iteration. NELM iteration cycles are performed (see self-consistent GW calculations).
  • ALGO=GWR selects self-consistent GW calculations, where both, G and W are updated from the corresponding Dyson equation. NELM iteration cycles are performed. (for details see self-consistent GW calculations).
  • ALGO=G0W0R selects single-shot GW calculations, non-interacting G and W are determined from Kohn-Sham system and NELM tag is ignored. Use this tag for single-shot QP energies and first-order corrections to the density matrix (for details, see single-shot GW calculations).
  • ALGO=EVGW0R selects the low-scaling analog of EVGW0, that is the low-scaling partially self-consistent GW calculations, where non-interacting G and W are determined from Kohn-Sham system and NELMGW specifies the number of self-consistent loops for G. W is kept on the Kohn-Sham level.

Related tags and articles

IALGO, LDIAG, NELM, NELMDL, EDIFF, LMAXMIX, Setting up an electronic minimization, Electronic minimization

Examples that use this tag