Category:Electronic minimization: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 1: Line 1:
The algorithms {{VASP}} offers for electronic minimisation (i.e., determining the electronic ground state) can be divided in two categories:
'''Electronic minimization''' is the process of determining the electronic ground state described by Kohn-Sham orbitals.
* Iterative matrix diagonalisation + density mixing, ''aka'' the "Self-Consistency Cycle" (SCC).
{{VASP}} offers various algorithms for '''electronic minimization''' with different purposes. These are set by the {{FILE|INCAR}} tag {{TAG|ALGO}} and can be divided into two categories:
* Direct optimisation of the orbitals.
* Iterative matrix diagonalisation + density mixing, ''aka'' the "self-consistency cycle" (SCC).
* Direct optimization of the orbitals.


== The Self-Consistency Cycle ==
== Self-consistency cycle ==


# The SCC starts with an initial guess for the electronic density of the system under consideration: {{VASP}} uses the approximation of overlapping atomic charge densities. This density defines the initial Hamiltonian.
# The SCC starts with an initial guess for the electronic density of the system. In particular, {{VASP}} uses the approximation of overlapping atomic charge densities. This density defines the initial Hamiltonian.
# By means of iterative matrix diagonalisation techniques one obtains the ''N'' lowest lying eigenstates of the Hamiltonian (where ''N'' is of the order of the number of electrons in the unit cell). The iterative matrix diagonalisation algorithms implemented in {{VASP}} are the blocked-Davidson algorithm and the Residual Minimization Method with Direct Inversion in the Iterative Subspace (RMM-DIIS). Per default {{VASP}} uses the blocked-Davidson algorithm ({{TAG|ALGO}} = Normal).
# By means of iterative matrix-diagonalization techniques, one obtains the ''N'' lowest lying eigenstates of the Hamiltonian, where ''N'' is of the order of the number of electrons in the unit cell. The iterative matrix-diagonalization algorithms implemented in {{VASP}} are the blocked-Davidson algorithm and the Residual Minimization Method with Direct Inversion in the Iterative Subspace (RMM-DIIS). Per default {{VASP}} uses the blocked-Davidson algorithm ({{TAG|ALGO}} = Normal).
# After the eigenstates and eigenvalues have been the determined with sufficient accuracy, they are used to to compute the total energy of the system, and to construct a new electronic density.
# After the eigenstates and eigenvalues have been determined with sufficient accuracy, they are used in order to compute the total energy of the system and to construct a new electronic density.
# In principle, this new density could be taken to define a new Hamiltonian. However, in order to arrive at a stable algorithm this new density is not used as is, but is mixed with the old density. By default {{VASP}} uses a Broyden mixer. The resulting density then defines the new Hamiltonian for the next round of iterative metrix diagonalisation (step 2).
# In principle, this new density could be taken to define a new Hamiltonian. However, in order to obtain a stable algorithm, this new density is not used as is but is mixed with the old density. By default {{VASP}} uses a Broyden mixer. The resulting density then defines the new Hamiltonian for the next round of iterative matrix diagonalization (step 2).


Steps 2-4 are repeated until the change in the total energy from one cycle to the next drops below a specific threshold ({{TAG|EDIFF}}).
Steps 2-4 are repeated until the change in the total energy from one cycle to the next drops below a specific threshold set by {{TAG|EDIFF}}.


Note that when starting from scratch ({{TAG|ISTART}} = 0), the self-consistency cycle procedure of {{VASP}} always begins with several ({{TAG|NELMDL}}) cycles where the density is kept fixed at the initial approximation (overlapping atomic charge densities).
Note that when starting from scratch ({{TAG|ISTART}} = 0), the SCC procedure of {{VASP}} always begins with several ({{TAG|NELMDL}}) cycles where the density is kept fixed at the initial approximation, i.e., overlapping atomic charge densities.
This ensures that the wave functions that are initialised with random numbers have converged to a something sensible before they are used to construct a new charge density.
This ensures that the wavefunctions that are initialized with random numbers have converged to something sensible before they are used to construct a new charge density.


For a more detailed description of the SCC have a look at: the [[Self-Consistency Cycle]].
For a more detailed description of the SCC have a look at: the [[Self-consistency cycle]].


== Direct optimisation ==
== Direct optimization ==


Similar to the SCC procedure described above, when starting from scratch ({{TAG|ISTART}} = 0), the direct optimisation procedures in {{VASP}} always begin with several ({{TAG|NELMDL}}) self-consistency cycles where the density is kept fixed at the initial approximation (overlapping atomic charge densities).
Similar to the SCC procedure described above, when starting from scratch ({{TAG|ISTART}} = 0), the direct optimization procedures in {{VASP}} always begin with several ({{TAG|NELMDL}}) self-consistency cycles where the density is kept fixed at the initial approximation (overlapping atomic charge densities).
This ensures that the wave functions that are initialised with random numbers have converged to reasonable starting point for the subsequent direct optimisation.
This ensures that the wavefunctions that are initialized with random numbers have converged to a reasonable starting point for the subsequent direct optimization.


The direct optimisation of the orbitals uses the gradient of the total energy with respect to the orbitals to move towards the ground state of the system: the orbitals are changed such that the total energy is lowered, using, ''e.g.'' the Conjugate Gradient Approximation, or Damped Molecular Dynamics.
The direct optimization of the orbitals uses the gradient of the total energy with respect to the orbitals to move towards the ground state of the system: the orbitals are changed such that the total energy is lowered, using, e.g., the conjugate-gradient approximation, or damped molecular dynamics.


After every change of the orbitals, the total energy and electronic density are recomputed.
After every change of the orbitals, the total energy and electronic density are recomputed.
Per default, the electronic density is constructed directly from the orbitals at each step along the way, without any density mixing.
Per default, the electronic density is constructed directly from the orbitals at each step along the way, without any density mixing.
Optionally, though, density mixing may be used to stabilise these optimisation procedures when charge sloshing occurs.
Optionally, though, density mixing may be used to stabilize these optimization procedures when [[charge sloshing]] occurs.


Similar to the SCC described above, the direct optimisation of the orbitals stops when the change of the total energy drops below {{TAG|EDIFF}}.
As for the SCC described above, the direct optimization of the orbitals stops when the change of the total energy drops below {{TAG|EDIFF}}.


For more details on the direct optimisation algorithms please read: [[Direct optimisation of the orbitals]].
For more details on the direct optimization algorithms, please read: [[Direct optimization of the orbitals]].


----
----

Revision as of 10:18, 19 October 2023

Electronic minimization is the process of determining the electronic ground state described by Kohn-Sham orbitals. VASP offers various algorithms for electronic minimization with different purposes. These are set by the INCAR tag ALGO and can be divided into two categories:

  • Iterative matrix diagonalisation + density mixing, aka the "self-consistency cycle" (SCC).
  • Direct optimization of the orbitals.

Self-consistency cycle

  1. The SCC starts with an initial guess for the electronic density of the system. In particular, VASP uses the approximation of overlapping atomic charge densities. This density defines the initial Hamiltonian.
  2. By means of iterative matrix-diagonalization techniques, one obtains the N lowest lying eigenstates of the Hamiltonian, where N is of the order of the number of electrons in the unit cell. The iterative matrix-diagonalization algorithms implemented in VASP are the blocked-Davidson algorithm and the Residual Minimization Method with Direct Inversion in the Iterative Subspace (RMM-DIIS). Per default VASP uses the blocked-Davidson algorithm (ALGO = Normal).
  3. After the eigenstates and eigenvalues have been determined with sufficient accuracy, they are used in order to compute the total energy of the system and to construct a new electronic density.
  4. In principle, this new density could be taken to define a new Hamiltonian. However, in order to obtain a stable algorithm, this new density is not used as is but is mixed with the old density. By default VASP uses a Broyden mixer. The resulting density then defines the new Hamiltonian for the next round of iterative matrix diagonalization (step 2).

Steps 2-4 are repeated until the change in the total energy from one cycle to the next drops below a specific threshold set by EDIFF.

Note that when starting from scratch (ISTART = 0), the SCC procedure of VASP always begins with several (NELMDL) cycles where the density is kept fixed at the initial approximation, i.e., overlapping atomic charge densities. This ensures that the wavefunctions that are initialized with random numbers have converged to something sensible before they are used to construct a new charge density.

For a more detailed description of the SCC have a look at: the Self-consistency cycle.

Direct optimization

Similar to the SCC procedure described above, when starting from scratch (ISTART = 0), the direct optimization procedures in VASP always begin with several (NELMDL) self-consistency cycles where the density is kept fixed at the initial approximation (overlapping atomic charge densities). This ensures that the wavefunctions that are initialized with random numbers have converged to a reasonable starting point for the subsequent direct optimization.

The direct optimization of the orbitals uses the gradient of the total energy with respect to the orbitals to move towards the ground state of the system: the orbitals are changed such that the total energy is lowered, using, e.g., the conjugate-gradient approximation, or damped molecular dynamics.

After every change of the orbitals, the total energy and electronic density are recomputed. Per default, the electronic density is constructed directly from the orbitals at each step along the way, without any density mixing. Optionally, though, density mixing may be used to stabilize these optimization procedures when charge sloshing occurs.

As for the SCC described above, the direct optimization of the orbitals stops when the change of the total energy drops below EDIFF.

For more details on the direct optimization algorithms, please read: Direct optimization of the orbitals.


How to