LDIAG: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{TAGDEF|LDIAG|[logical]|.TRUE.}}
{{TAGDEF|LDIAG|[logical]|.TRUE.}}


Description: This tag determines whether a subspace diagonalization is performed or not within the main algorithm selected by {{TAG|IALGO}}.
Description: Determines whether a subspace diagonalization is performed within the algorithm selected by {{TAG|ALGO}} or {{TAG|IALGO}}.
----
----
For ALGO=Normal, Fast, and VeryFast, VASP performs a diagonalization in the subspace spanned by all orbitals. This is often referred to as Rayleigh–Ritz method. The step
For {{TAG|ALGO}} = <tt>Normal</tt>, <tt>Fast</tt>, and <tt>VeryFast</tt>, VASP performs a diagonalization in the subspace spanned by all orbitals. This is often referred to as the [https://en.wikipedia.org/wiki/Rayleigh%E2%80%93Ritz_method Rayleigh–Ritz method].  
increases the convergence rate and thus is expedient in most cases. For the algorithms that optimize (https://en.wikipedia.org/wiki/Rayleigh%E2%80%93Ritz_method).
This step increases the convergence rate and thus is expedient in most cases.
For the direct optimization algorithms (for instance ALGO = All or Damped), the subspace diagonalization is usually not performed, but in order to improve
Furthermore, the subspace diagonalization sorts the orbital/eigenvalues in ascending order.
the accuracy of the calculated forces, after convergence has been reached, one single diagonalization in the subspace spanned by all orbitals is performed.
Note that the subspace diagonalization sorts the orbital/eigenvalues in ascending order.


For ALGO = VeryFast, Damped and All, it is possible to switch off the subspace diagonalization by specifying LDIAG=.FALSE. in the INCAR file.
For the direct optimization algorithms (for instance {{TAG|ALGO}} = <tt>All</tt> or <tt>Damped</tt>),
Specifically, for ALGO = VeryFast, LDIAG= .FALSE. changes from an exact  Rayleigh–Ritz diagonalization to Loewdin perturbation theory.
a subspace diagonalization is usually not performed, but in order to improve the accuracy of the calculated forces,
Loewdin perturbation theory strictly conserves the orbital order, i.e. the orbitals will be ordered according
after convergence has been reached one single diagonalization in the subspace spanned by all orbitals is performed.
to their eigenenergy. For ALGO = Damped and All, the final sub space diagonalization is simply skipped.
Generally using LDIAG = .FALSE. is only advised, if one wants to keep a certain orbital order, for instance when reading the orbitals from an existing WAVECAR file.  


For {{TAG|ALGO}} = <tt>VeryFast</tt> and <tt>Damped</tt> it is possible to switch off the subspace diagonalization by specifying {{TAG|LDIAG}} = <tt>.FALSE.</tt> in the {{FILE|INCAR}} file.
Specifically, for {{TAG|ALGO}} = <tt>VeryFast</tt>, {{TAG|LDIAG}} = <tt>.FALSE.</tt> changes from an exact Rayleigh–Ritz diagonalization to Loewdin perturbation theory.


Note, Loewdin perturbation theory strictly conserves the orbital order, ''i.e.'', the ''n''-th orbital will remain stored in the ''n''-th storage slot and only small rotations into that orbital can occur.
For {{TAG|ALGO}} = <tt>Damped</tt> and <tt>All</tt>, the final subspace diagonalization is simply skipped if {{TAG|LDIAG}} = <tt>.FALSE.</tt> is set.
Generally using {{TAG|LDIAG}} = <tt>.FALSE.</tt> is only advised, if one wants to maintain a certain orbital order, for instance, when reading the orbitals from an existing {{FILE|WAVECAR}} file.


== Related Tags and Sections ==
For the algorithms {{TAG|ALGO}} = <tt>Normal</tt> or <tt>Fast</tt>, by construction it is not possible to switch off subspace diagonalization, as these algorithms require subspace diagonalizations during the iterative refinement of the orbitals.
Furthermore, algorithms that minimize the total energy ({{TAG|ALGO}} = <tt>All</tt>) are often too "greedy" and tend to alternate the orbital order in the course of the SCF cycle and energy optimization. 
 
In summary, the following combinations are potentially useful:
 
ALGO = VeryFast ; LDIAG = .FALSE.
 
ALGO = Damped ; LDIAG = .FALSE.
 
Other combinations using {{TAG|LDIAG}} = <tt>.FALSE.</tt> are likely to yield undesirable results.
{{NB|warning| {{TAG|ALGO}} {{=}} <tt>VeryFast</tt> is not supported for hybrid functionals. }}
 
== Related tags and articles ==
{{TAG|IALGO}},
{{TAG|IALGO}},
{{TAG|ALGO}}
{{TAG|ALGO}}


{{sc|LDIAG|Examples|Examples that use this tag}}
{{sc|LDIAG|Examples|Examples that use this tag}}
----
[[The_VASP_Manual|Contents]]


[[Category:INCAR]][[Category:Electronic Minimization]][[Category:Electronic Minimization Methods]]
[[Category:INCAR tag]][[Category:Electronic minimization]]

Latest revision as of 12:15, 17 October 2024

LDIAG = [logical]
Default: LDIAG = .TRUE. 

Description: Determines whether a subspace diagonalization is performed within the algorithm selected by ALGO or IALGO.


For ALGO = Normal, Fast, and VeryFast, VASP performs a diagonalization in the subspace spanned by all orbitals. This is often referred to as the Rayleigh–Ritz method. This step increases the convergence rate and thus is expedient in most cases. Furthermore, the subspace diagonalization sorts the orbital/eigenvalues in ascending order.

For the direct optimization algorithms (for instance ALGO = All or Damped), a subspace diagonalization is usually not performed, but in order to improve the accuracy of the calculated forces, after convergence has been reached one single diagonalization in the subspace spanned by all orbitals is performed.

For ALGO = VeryFast and Damped it is possible to switch off the subspace diagonalization by specifying LDIAG = .FALSE. in the INCAR file. Specifically, for ALGO = VeryFast, LDIAG = .FALSE. changes from an exact Rayleigh–Ritz diagonalization to Loewdin perturbation theory.

Note, Loewdin perturbation theory strictly conserves the orbital order, i.e., the n-th orbital will remain stored in the n-th storage slot and only small rotations into that orbital can occur. For ALGO = Damped and All, the final subspace diagonalization is simply skipped if LDIAG = .FALSE. is set. Generally using LDIAG = .FALSE. is only advised, if one wants to maintain a certain orbital order, for instance, when reading the orbitals from an existing WAVECAR file.

For the algorithms ALGO = Normal or Fast, by construction it is not possible to switch off subspace diagonalization, as these algorithms require subspace diagonalizations during the iterative refinement of the orbitals. Furthermore, algorithms that minimize the total energy (ALGO = All) are often too "greedy" and tend to alternate the orbital order in the course of the SCF cycle and energy optimization.

In summary, the following combinations are potentially useful:

ALGO = VeryFast ; LDIAG = .FALSE.
ALGO = Damped ; LDIAG = .FALSE.

Other combinations using LDIAG = .FALSE. are likely to yield undesirable results.

Warning: ALGO = VeryFast is not supported for hybrid functionals.

Related tags and articles

IALGO, ALGO

Examples that use this tag