ALGO: Difference between revisions
m Huebsch moved page ALGO to Construction:ALGO without leaving a redirect |
Issue #27: redesigned ALGO page (table of electronic-min algorithms + stdout-per-step section); GW section preserved |
||
| Line 1: | Line 1: | ||
{{TAGDEF|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 | Normal }} | {{TAGDEF|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 | Normal }} | ||
Description: | Description: The {{TAG|ALGO}} tag selects the electronic-minimization algorithm for the ground state (as of VASP.4.5), and/or the type of [[GW calculations|GW]], response-function, and [[BSE calculations|BSE]] calculation. | ||
---- | ---- | ||
== Electronic-minimization algorithms == | |||
For a self-consistent ground-state calculation, {{TAG|ALGO}} selects how the orbitals are optimized at each electronic step. Each value corresponds to a setting of the lower-level tag {{TAG|IALGO}}: | |||
{| class="wikitable" | |||
! {{TAG|ALGO}} !! Algorithm !! {{TAG|IALGO}} !! Notes | |||
|- | |||
| Normal ''(default)'' || [[Blocked-Davidson algorithm|blocked Davidson]] || 38 || Robust default, recommended for most calculations. | |||
|- | |||
| Fast || [[Blocked-Davidson algorithm|blocked Davidson]] + [[RMM-DIIS]] || 38 / 48 || Davidson for the initial phase, then [[RMM-DIIS]]; one Davidson sweep per ionic step. Faster for [[:Category:Molecular dynamics|molecular dynamics]] and relaxations. Updated in vasp.6 — select "Old Fast" for the vasp.5 version. | |||
|- | |||
| VeryFast || [[RMM-DIIS]] || 48 || Fewest Hamiltonian evaluations but least robust. Not supported for [[:Category:Hybrid functionals|hybrid functionals]]. Updated in vasp.6 — select "Old VeryFast" for the vasp.5 version. Combine with {{TAG|LDIAG|.FALSE.}} to conserve the initial orbital order. | |||
|- | |||
| Conjugate / All || all-band conjugate gradient || 58 || Simultaneous update of all orbitals (the two values are synonymous). Recommended together with the improved line-search algorithm ({{TAG|ISEARCH|1}}). | |||
|- | |||
| Damped || damped molecular dynamics || 53 || Damped velocity-friction dynamics for the orbitals; useful for difficult systems. Combine with {{TAG|LDIAG|.FALSE.}} to conserve the initial orbital order. | |||
|- | |||
| Exact || exact diagonalization || 90 || Full diagonalization; expensive, mainly for testing or when many empty states are required. | |||
|- | |||
| Subrot || subspace rotation || 4 || Diagonalization within the subspace spanned by the current orbitals. | |||
|- | |||
| Eigenval || recompute eigenvalues || 3 || Recompute one-electron energies, the density of states, and selected postprocessing from fixed orbitals (e.g., read from the {{FILE|WAVECAR}} file). | |||
|- | |||
| None / Nothing || no orbital update || 2 || Recompute the density of states or postprocessing from fixed orbitals ''and'' one-electron energies (e.g., read from the {{FILE|WAVECAR}} file). | |||
|} | |||
{{NB|tip|Except for 'None', 'Nothing', 'Exact', and 'Eigenval' (which must be spelled out), only the first letter determines the selected algorithm.}} | |||
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. | |||
{{NB|warning|For fast convergence, {{TAG|LMAXMIX}} must be set appropriately, e.g., {{TAG|LMAXMIX|6}} for systems with ''f'' electrons.}} | |||
== Output during the electronic minimization == | |||
At each electronic step, VASP writes one line to standard output and to the {{FILE|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 identifies the orbital-optimization algorithm used in that step: | |||
{| class="wikitable" | |||
! Label !! Algorithm | |||
|- | |||
| <code>DAV:</code> || [[Blocked-Davidson algorithm|blocked Davidson]] ({{TAG|IALGO}}=38) | |||
|- | |||
| <code>RMM:</code> || [[RMM-DIIS]] ({{TAG|IALGO}}=48) | |||
|- | |||
| <code>DMP:</code> || damped dynamics ({{TAG|IALGO}}=53) | |||
|- | |||
| <code>CG :</code> || conjugate-gradient / all-band ({{TAG|IALGO}}=58) | |||
|- | |||
| <code>EIG:</code> || eigenvalue recomputation ({{TAG|ALGO}}=Eigenval) | |||
|- | |||
| <code>DIA:</code> || exact diagonalization ({{TAG|ALGO}}=Exact) | |||
|- | |||
| <code>NONE</code> || no orbital update ({{TAG|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>|(\mathbf{H}-\epsilon\mathbf{S})\Psi\rangle</math>, i.e., how well the current orbitals solve the eigenvalue problem. | |||
* '''rms(c)''' — root-mean-square change of the charge density entering the [[:Category:Density mixing|charge-density mixer]]. It appears only once charge-density mixing (self-consistency) has started, i.e., after the initial non-self-consistent steps controlled by {{TAG|NELMDL}}. | |||
The electronic loop stops once the energy change '''dE''' (and '''rms(c)''') drops below the threshold set by {{TAG|EDIFF}}, or after {{TAG|NELM}} steps. See [[Setting up an electronic minimization]] for guidance on choosing these tags, and {{TAG|IALGO}} for further details on the algorithms. | |||
{{ | |||
<span id="GWALGOS"> | <span id="GWALGOS"> | ||
==ALGO for response functions | == ALGO for response functions, [[GW calculations|GW]], and [[ACFDT/RPA calculations|ACFDT/RPA]] == | ||
The following tags are available as of VASP.5.X. | The following tags are available as of VASP.5.X. | ||
*{{TAG|ALGO}}=CHI calculates the response functions only. | *{{TAG|ALGO}}=CHI calculates the response functions only. | ||
| Line 93: | Line 137: | ||
*{{TAG|ALGO}}=ACFDTRK in combination with LMP2LT = .TRUE. selects the low scaling MP2 total energy calculations (for details see the [[MP2_ground_state_calculation_-_Tutorial|MP2 ground state Tutorial]]) | *{{TAG|ALGO}}=ACFDTRK in combination with LMP2LT = .TRUE. selects the low scaling MP2 total energy calculations (for details see the [[MP2_ground_state_calculation_-_Tutorial|MP2 ground state Tutorial]]) | ||
*{{TAG|ALGO}}=GW0R selects self-consistent GW<sub>0</sub> calculations, where only the Green's function ''G'' is updated from the corresponding Dyson. The screened potential ''W'' remains unchanged after the first iteration. {{TAG|NELM}} iteration cycles are performed (see [[GW calculations#scGW0R|self-consistent GW calculations]]). | *{{TAG|ALGO}}=GW0R selects self-consistent GW<sub>0</sub> calculations, where only the Green's function ''G'' is updated from the corresponding Dyson. The screened potential ''W'' remains unchanged after the first iteration. {{TAG|NELM}} iteration cycles are performed (see [[GW calculations#scGW0R|self-consistent GW calculations]]). | ||
*{{TAG|ALGO}}=GWR selects self-consistent GW calculations, where both, ''G'' and ''W'' are updated from the corresponding Dyson equation. {{TAG|NELM}} iteration cycles are performed. (for details see [[GW calculations#scGWR|self-consistent GW calculations]]). | *{{TAG|ALGO}}=GWR selects self-consistent GW calculations, where both, ''G'' and ''W'' are updated from the corresponding Dyson equation. {{TAG|NELM}} iteration cycles are performed. (for details see [[GW calculations#scGWR|self-consistent GW calculations]]). | ||
| Line 103: | Line 147: | ||
*{{TAG|ALGO}}=CRPA selects [[Constrained–random-phase–approximation_formalism|constrained RPA calculations]]. | *{{TAG|ALGO}}=CRPA selects [[Constrained–random-phase–approximation_formalism|constrained RPA calculations]]. | ||
{{NB|important|available as of VASP.6.4:}} | {{NB|important|available as of VASP.6.4:}} | ||
*{{TAG|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 {{TAG|NELMGW}} specifies the number of self-consistent loops for ''G''. ''W'' is kept on the Kohn-Sham level. | *{{TAG|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 {{TAG|NELMGW}} specifies the number of self-consistent loops for ''G''. ''W'' is kept on the Kohn-Sham level. | ||
</span> | </span> | ||
== Related tags and | == Related tags and articles == | ||
{{TAG|IALGO}}, | {{TAG|IALGO}}, | ||
{{TAG|LDIAG}}, | {{TAG|LDIAG}}, | ||
{{TAG|NELM}}, | |||
{{TAG|NELMDL}}, | |||
{{TAG|EDIFF}}, | |||
{{TAG|LMAXMIX}}, | |||
[[Setting up an electronic minimization]], | |||
[[:Category:Electronic minimization|Electronic minimization]] | [[:Category:Electronic minimization|Electronic minimization]] | ||
Revision as of 12:06, 22 June 2026
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:
| ALGO | Algorithm | IALGO | Notes |
|---|---|---|---|
| Normal (default) | blocked Davidson | 38 | Robust default, recommended for most calculations. |
| Fast | blocked Davidson + RMM-DIIS | 38 / 48 | 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 | 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 | 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 | 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 | Full diagonalization; expensive, mainly for testing or when many empty states are required. |
| Subrot | subspace rotation | 4 | Diagonalization within the subspace spanned by the current orbitals. |
| Eigenval | recompute eigenvalues | 3 | 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 | Recompute the density of states or postprocessing from fixed orbitals and one-electron energies (e.g., read from the WAVECAR file). |
| Tip: Except for 'None', 'Nothing', 'Exact', and 'Eigenval' (which must be spelled out), only the first letter determines the selected algorithm. |
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.
Warning: For fast convergence, LMAXMIX must be set appropriately, e.g., LMAXMIX = 6 for systems with f electrons.
|
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 identifies the orbital-optimization algorithm used in that step:
| Label | Algorithm |
|---|---|
DAV: |
blocked Davidson (IALGO=38) |
RMM: |
RMM-DIIS (IALGO=48) |
DMP: |
damped dynamics (IALGO=53) |
CG : |
conjugate-gradient / all-band (IALGO=58) |
EIG: |
eigenvalue recomputation (ALGO=Eigenval) |
DIA: |
exact diagonalization (ALGO=Exact) |
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.
- rms(c) — root-mean-square change of the charge density entering the charge-density mixer. It appears only once charge-density mixing (self-consistency) has started, i.e., after the initial non-self-consistent steps controlled by NELMDL.
The electronic loop stops once the energy change dE (and 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)
- ALGO=Timeev performs a delta-pulse in time and then performs timepropagation
- ALGO=ACFDT selects RPA total energy calculations see ACFDT/RPA calculations
- ALGO=RPA synonymous to ACFDT see ACFDT/RPA calculations (available as of VASP.5.3.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=RPAR selects low scaling RPA total energy calculations (for details see ACFDT/RPA calculations)
- ALGO=ACFDTR synonym for RPAR (for details see ACFDT/RPA calculations)
- 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).
| Important: Changes as of VASP.6.3: |
- NELMGW replaces NELM in self-consistent GW calculations.
- ALGO=CRPA selects constrained RPA calculations.
| Important: available as of VASP.6.4: |
- 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