Electrostatic corrections: Difference between revisions

From VASP Wiki
No edit summary
 
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
For charged cells or for calculations of molecules and surfaces with a large dipole moment, the energy converges very slowly with respect to the size <math>L</math> of the supercell. Using methods discussed by Makov ''et al.''<ref name="Makov95"/> and Neugebauer ''et al.''<ref name="Neugebauer92"/>, VASP can correct for the leading errors (in many details, we have taken a more general approach, though).  
For charged cells or for calculations of molecules and surfaces with a large dipole moment, the energy converges very slowly with respect to the size <math>L</math> of the supercell. Using methods discussed by Makov ''et al.''<ref name="Makov95"/> and Neugebauer ''et al.''<ref name="Neugebauer92"/>, VASP can correct for the leading errors (in many details, we have taken a more general approach, though).  


The following flags control the behaviour of VASP:
== Suggested combination of tags for electrostatic corrections ==
* {{TAG|NELECT}}, charged systems:
In cases where the system has no net charge and no net dipole moment, no specific tags need to be set and this section can be skipped.
:{{TAG|NELECT}} determines the total number of electrons in the system. The value may deviate from the default value, which is calculated assuming charge neutrality in the system. If {{TAG|NELECT}} differs from the default, an additional neutralizing background charge is applied by VASP. In this case, however, the energy converges very slowly with respect to the size ''L'' of the super cell. The required first order correction to the energy is given by
=== Bulk ===
::<math>\frac{e^2q^2\alpha}{L\epsilon}</math>
If the system has a net dipole or net charge, please follow the recommendations of [[Dipole_corrections_for_defects_in_solids|this]] wiki page.
=== Surfaces ===
If the system has a net dipole moment, a combination of {{TAG|IDIPOL}}=1,2,3 and {{TAG|LDIPOL}} tags may be used. The former corrects the energies, while the latter corrects the potential and forces. Optionally, {{TAG|DIPOL}} may be set. The following options may be used to improve convergence for this case.


:where ''q'' is the net charge of the system, &alpha; the Madelung constant of a point charge ''q'' placed in a homogeneous background charge ''-q'', and &epsilon; the dielectric constant of the system. For atoms or molecules surrounded by vacuum, &epsilon; takes on the vacuum value &epsilon;=1. VASP can automatically correct for the leading error, by setting the {{TAG|IDIPOL}} and {{TAG|EPSILON}} tags in the {{FILE|INCAR}} file (see below).
1. Use any of these tags only after pre-converging the orbitals without the {{TAG|LDIPOL}} tag
:It is important to emphasize that the total energy can not be corrected for charged slabs, since a charged slab results in an electrostatic potential that grows linearly with the distance from the slab (corresponding to a fixed electrostatic field). It is fairly simple to show that as a result of the interaction between the charged slab and the compensating background, the total energy depends linearly on the width of the vacuum. Presently, no simple ''a posteriori'' correction scheme is known or implemented in VASP. ''Total energies from charged slab calculations are hence useless, and can not be used to determine relative energies.''


:'''Note''': If you are not convinced, simply vary the vacuum width and draw the energy versus the vacuum width.
2. The center of charge should be set in the {{FILE|INCAR}} file ({{TAG|DIPOL}}= center of mass)


* {{TAG|EPSILON}}, dielectric constant:
3. Ensure that the cell is sufficiently large to determine the dipole moment with sufficient accuracy (see {{TAG|DIPOL}}). If the cell is too small, the charge might slash through the vacuum, causing very slow convergence. Often convergence improves with the size of the supercell.
{{NB|warning|Surface calculations with a net charge result in total energies that do not converge. Relative energies may still be useful.}}


* {{TAG|IDIPOL}}, type of correction (monopole/dipole and quadrupole):
=== Wires ===
:For systems with a net dipole moment, the energy converges slowly with respect to the size of the super cell as well. The dipole corrections (and quadrupole corrections for charged systems) fall off like 1/''L''<sup>3</sup>. Both corrections, dipole and quadrupole for charged systems, will be calculated and added to the total energy if {{TAG|IDIPOL}} is set.
Not implemented.


:There are four possible settings for {{TAG|IDIPOL}} (= 1 {{!}} 2 {{!}} 3 {{!}} 4).
=== Molecules ===
:For {{TAG|IDIPOL}}=1-3, the dipole moment will be calculated only parallel to the direction of the first, second or third lattice vector, respectively. The corrections for the total energy are calculated as the energy difference between a monopole/dipole and quadrupole in the current supercell and the same dipole placed in a super cell with the corresponding lattice vector approaching infinity. This flag should be used for slab calculations.
If the system has a net dipole moment, use the {{TAG|LDIPOL}} tag. The former corrects the energies, while the latter corrects the potential and forces. Optionally, {{TAG|DIPOL}} may be set.
:For {{TAG|IDIPOL}}=4 the full dipole moment in all directions will be calculated, and the corrections to the total energy are calculated as the energy difference between a monopole/dipole/quadrupole in the current supercell and the same monopole/dipole/quadrupole placed in a vacuum, use this flag for calculations for isolated molecules.


:'''Note''': strictly speaking quadrupole corrections is not the proper wording. The relevant quantity is
== Current limitations ==
::<math> \int d^3{\mathbf r} \rho(\mathbf r) \Vert \mathbf r\Vert^2.</math>


* {{TAG|DIPOL}}, center of the net charge of the cell
For the current implementation, there are several restrictions; please read carefully:
:This tag sets the center of the net charge distribution: {{TAG|DIPOL}}='''R'''<sub>center</sub>. The dipole is then defined as
* Charged systems:
::<math>\int ({\mathbf r}-{\mathbf R}_\mathrm{center})\rho_\mathrm{ions+valence} ({\mathbf r})d{\mathbf r}</math>
:Quadrupole corrections are only correct for cubic supercells (this means that the calculated 1/''L''<sup>3</sup> corrections are wrong for charged supercells if the supercell is non-cubic). In addition, we have found empirically that for charged systems with excess electrons ({{TAG|NELECT}}>{{TAG|NELECT}}<sub>neutral</sub>) more reliable results can be obtained if the energy after correction of the linear error (1/''L'') is plotted against 1/''L''<sup>3</sup> to extrapolate results manually for ''L''&rarr;&infin;. This is due to the uncertainties in extracting the quadrupole moment of systems with excess electrons.
* Potential corrections are only possible for orthorhombic cells (at least the direction in which the potential is corrected must be orthogonal to the other two directions).
 
== Step-by-step instructions ==
=== Using the dipole correction for slab calculations ===
In this section, we discuss step-by-step instructions to use the dipole corrections for slab calculations.
 
'''Step 1:''' Create a system which has enough vacuum on either side of the surface normal. An example for such a structure is shown below, for an fcc-Aluminium with a carbon adsorbed on one of its surface terminations.
Al3C
1.0000000000000000
    2.8637824638055176    0.0000000000000000    0.0000000000000000
    1.4318912319027588    2.4801083645679673    0.0000000000000000
    0.0000000000000000    0.0000000000000000  20.0000000000000000
Al C
3 1
Direct
    0.8333333333333333    0.5000000000000000    0.3380865704891008
    0.1666666666666666    0.8333333333333334    0.4550000000000000
    0.4999999999999999    0.1666666666666667    0.5719134295108992
    0.4999999999999999    0.1666666666666667    0.6619134295108993


:If {{TAG|DIPOL}} is not set, VASP determines, where the charge density averaged over one plane drops to a minimum and calculates the center of the charge distribution by adding half of the lattice vector perpendicular to the plane where the charge density has a minimum (this is a rather reliable approach for orthorhombic cells).
Note that the system has plenty of vacuum on either side. This empty space is important for the potential corrections needed for the {{TAG|LDIPOL}} tag.


* {{TAG|LDIPOL}} and {{TAG|LMONO}}, enable dipole and/or monopole corrections to the potential:
'''Step 2:''' Switch on the dipole corrections to the energy, potential and forces. Optionally set the {{TAG|DIPOL}}
:These tags switch on the potential correction mode. Due to the periodic boundary conditions, not only the total energy converges slowly with respect to the size of the supercell, but also the potential and the forces are affected by finite size errors. This effect can be counterbalanced by setting {{TAG|LDIPOL}}=.TRUE. (dipole corrections) and/or {{TAG|LMONO}}=.TRUE. (monopole corrections) in the {{FILE|INCAR}} file. For {{TAG|LDIPOL}}=.TRUE.,a linear and for {{TAG|LMONO}}=.TRUE., a quadratic electrostatic potential is added to the local potential, correcting the errors introduced by the periodic boundary conditions. This is in the spirit of Neugebauer ''et al.''<ref name="Neugebauer92"/> (but more general and the total energy has been correctly implemented right away). The biggest advantage of this mode is that leading errors in the forces are corrected, and that the work-function can be evaluated for asymmetric slabs. The disadvantage is that the convergence to the electronic groundstate might slow down considerably (''i.e.'', more electronic iterations might be required to obtain the required precision). It is recommended to use this mode only after pre-converging the orbitals without the {{TAG|LDIPOL}} flag, and the center of charge should be set in the {{FILE|INCAR}} file ({{TAG|DIPOL}}= center of mass). The user must also ensure that the cell is sufficiently large to determine the dipole moment with sufficient accuracy. If the cell is too small, charge might swap through the vacuum, causing very slow convergence (often convergence improves with the size of the supercell).


* {{TAG|EFIELD}}, applied electrostatic field
LDIPOL    = T
:It is possible to apply an external electrostatic field in slab, or molecular calculations. Presently only a single value can be supplied and the field is applied in the direction selected by {{TAG|IDIPOL}}=1-3. The field is supplied in units of eV/Å. Dipole corrections ({{TAG|LDIPOL}}=.TRUE.) can and should be turned on to avoid interactions between the periodically repeated images.
IDIPOL   = 3
DIPOL    = 0.5 0.5 0.5


For the current implementation, there are several restrictions; please read carefully:
'''Step 3 (Optional):''' View the dipole moment for the system using the following bash command,
* Charged systems:<br/>Quadrupole corrections are only correct for cubic supercells (this means that the calculated <math>1/L^3</math> corrections are wrong for charged supercells if the supercell is non cubic). In addition, we have found empirically that for charged systems with excess electrons ({{TAG|NELECT}}<math>></math>{{TAG|NELECT}} <math>_{\rm neutral}</math>) more reliable results can be obtained if the energy after correction of the linear error (<math>1/L</math>) is plotted against <math>1/L^3</math> to extrapolate results manually for <math>L\to \infty</math>. This is due to the uncertainties in extracting the quadrupole moment of systems with excess electrons.
 
* Potential corrections are only possible for orthorhombic cells (at least the direction in which the potential is corrected must be orthogonal to the other two directions).
grep dipolmoment OUTCAR | tail -1
 
In this example, we get the following output:
 
  dipolmoment          0.000000      0.000000      0.128389 electrons x Angstroem
 
which refers to the dipole moment along the three axes. Consistent with the {{FILE|POSCAR}} used in this example, only the last axis has a non-zero dipole moment.


== Related Tags and Sections ==
== Related Tags and Sections ==
Line 47: Line 72:
{{TAG|LMONO}},
{{TAG|LMONO}},
{{TAG|EFIELD}}
{{TAG|EFIELD}}
{{sc|Monopole Dipole and Quadrupole corrections|Examples|Examples that use this tag}}


== References ==
== References ==
Line 55: Line 82:


----
----
[[The_VASP_Manual|Contents]]


[[Category:INCAR]]
[[Category:Atoms and Molecules]][[Category:Monopole Dipole and Quadrupole Corrections]][[Category:Electrostatics]][[Category:Howto]]

Latest revision as of 12:10, 9 September 2024

For charged cells or for calculations of molecules and surfaces with a large dipole moment, the energy converges very slowly with respect to the size of the supercell. Using methods discussed by Makov et al.[1] and Neugebauer et al.[2], VASP can correct for the leading errors (in many details, we have taken a more general approach, though).

Suggested combination of tags for electrostatic corrections

In cases where the system has no net charge and no net dipole moment, no specific tags need to be set and this section can be skipped.

Bulk

If the system has a net dipole or net charge, please follow the recommendations of this wiki page.

Surfaces

If the system has a net dipole moment, a combination of IDIPOL=1,2,3 and LDIPOL tags may be used. The former corrects the energies, while the latter corrects the potential and forces. Optionally, DIPOL may be set. The following options may be used to improve convergence for this case.

1. Use any of these tags only after pre-converging the orbitals without the LDIPOL tag

2. The center of charge should be set in the INCAR file (DIPOL= center of mass)

3. Ensure that the cell is sufficiently large to determine the dipole moment with sufficient accuracy (see DIPOL). If the cell is too small, the charge might slash through the vacuum, causing very slow convergence. Often convergence improves with the size of the supercell.

Warning: Surface calculations with a net charge result in total energies that do not converge. Relative energies may still be useful.

Wires

Not implemented.

Molecules

If the system has a net dipole moment, use the LDIPOL tag. The former corrects the energies, while the latter corrects the potential and forces. Optionally, DIPOL may be set.

Current limitations

For the current implementation, there are several restrictions; please read carefully:

  • Charged systems:
Quadrupole corrections are only correct for cubic supercells (this means that the calculated 1/L3 corrections are wrong for charged supercells if the supercell is non-cubic). In addition, we have found empirically that for charged systems with excess electrons (NELECT>NELECTneutral) more reliable results can be obtained if the energy after correction of the linear error (1/L) is plotted against 1/L3 to extrapolate results manually for L→∞. This is due to the uncertainties in extracting the quadrupole moment of systems with excess electrons.
  • Potential corrections are only possible for orthorhombic cells (at least the direction in which the potential is corrected must be orthogonal to the other two directions).

Step-by-step instructions

Using the dipole correction for slab calculations

In this section, we discuss step-by-step instructions to use the dipole corrections for slab calculations.

Step 1: Create a system which has enough vacuum on either side of the surface normal. An example for such a structure is shown below, for an fcc-Aluminium with a carbon adsorbed on one of its surface terminations.

Al3C
1.0000000000000000
   2.8637824638055176    0.0000000000000000    0.0000000000000000
   1.4318912319027588    2.4801083645679673    0.0000000000000000
   0.0000000000000000    0.0000000000000000   20.0000000000000000
Al C
3 1
Direct
   0.8333333333333333    0.5000000000000000    0.3380865704891008
   0.1666666666666666    0.8333333333333334    0.4550000000000000
   0.4999999999999999    0.1666666666666667    0.5719134295108992
   0.4999999999999999    0.1666666666666667    0.6619134295108993

Note that the system has plenty of vacuum on either side. This empty space is important for the potential corrections needed for the LDIPOL tag.

Step 2: Switch on the dipole corrections to the energy, potential and forces. Optionally set the DIPOL

LDIPOL    = T
IDIPOL    = 3
DIPOL     = 0.5 0.5 0.5

Step 3 (Optional): View the dipole moment for the system using the following bash command,

grep dipolmoment OUTCAR | tail -1

In this example, we get the following output:

 dipolmoment           0.000000      0.000000      0.128389 electrons x Angstroem

which refers to the dipole moment along the three axes. Consistent with the POSCAR used in this example, only the last axis has a non-zero dipole moment.

Related Tags and Sections

NELECT, EPSILON, DIPOL, IDIPOL, LDIPOL, LMONO, EFIELD

Examples that use this tag

References