PRECFOCK: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{TAGDEF|PRECFOCK|Low {{!}} Medium {{!}} Fast {{!}} Normal {{!}} Accurate|Normal}}
{{TAGDEF|PRECFOCK|Normal {{!}} Accurate {{!}} Fast {{!}} Medium {{!}} Single {{!}} Low}}
{{DEF|PRECFOCK|Fast|for RPAR calculations |Single|if {{TAG|PREC}}{{=}}Single or SingleN |Normal |  else}}


Description: {{TAG|PRECFOCK}} controls the FFT grids used in the exact exchange routines (Hartree-Fock and hybrid functionals).
Description: {{TAG|PRECFOCK}} controls the FFT grids used in the exact exchange routines (Hartree-Fock and hybrid functionals).
----
----
The FFT grid used for the exact exchange contributions may differ from the one used for the local Hartree and DFT potentials. In fact, the exact exchange is rather insensitive to the FFT grids, and in many cases a rather coarse grid can be used to calculate the overlap densities and the potentials. Since the [[Hartree-Fock_and_HF/DFT_hybrid_functionals#ExFock|exact exchange]] requires the evaluation of an overlap density:
The FFT grid used for the exact exchange contributions can be chose to be different from the one used for the Hartree and DFT potentials. Information on the  FFT grid that is used in the exact Fock exchange routines is written to the {{FILE|OUTCAR}} file after the lines


::<math>\psi_{\mathbf{k}n}^{*}(\mathbf{r})\psi_{\mathbf{q}m}(\mathbf{r})</math>
FFT grid for exact exchange (Hartree Fock)
 
We recommend to set {{TAG|PRECFOCK}}=Normal for routine calculations.
If speed is an issue, you can also use {{TAG|PRECFOCK}}=Fast (e.g. use this to pre-converge the orbitals). For very high precision, in particular for phonon calculations, {{TAG|PRECFOCK}}=Accurate is recommended.
The two setting, {{TAG|PRECFOCK}}=Medium and {{TAG|PRECFOCK}}=Low are not recommended, but have been kept to maintain compatibility with older VASP versions.


errors in the convolution (aliasing errors) are only avoided, if the FFT grid contains all Fourier components up to twice the plane wave with the largest wave vector, 2|'''G'''<sub>cut</sub>|.
Generally, as opposed to gradient corrected density functionals, the exact exchange energy is rather insensitive to the FFT grids, and in many cases a rather coarse grid can be used to calculate the overlap densities and the exact exchange (Fock) potential. [[Hybrid_functionals|Exact exchange]] requires one to evaluation the overlap density


For {{TAG|PRECFOCK}}=Low and Fast, however, the smallest possible FFT grid, which just encloses the cutoff sphere (|'''G'''<sub>cut</sub>|) determined by the plane wave cutoff ({{TAG|ENCUT}}), is used. This accelerates the calculations by roughly a factor two to three, but causes slight changes in the total energies and some noise in the calculated forces. The corresponding FFT grid that is used in the Hartree Fock routines is written to the {{FILE|OUTCAR}} file after the lines
::<math>\psi_{\mathbf{k}n}^{*}(\mathbf{r})\psi_{\mathbf{q}m}(\mathbf{r})</math>


FFT grid for exact exchange (Hartree Fock)
between two orbitals. Strictly speaking, errors in the convolution (aliasing errors) are only avoided, if the FFT grid contains all Fourier components up to twice the plane wave with the largest wave vector, 2|G<sub>cut</sub>|. As usual, |G<sub>cut</sub>| is determined by the plane wave cutoff ({{TAG|ENCUT}}).
A grid avoiding aliasing errors is chosen by setting {{TAG|PRECFOCK}}=Accurate. In this case, the FFT grid for the exact exchange is identical to the FFT grid used for the orbitals for {{TAG|PREC}}=Accurate in the DFT part. {{TAG|PRECFOCK}}=Accurate is the recommended setting for very accurate calculations.


For {{TAG|PRECFOCK}}=Normal, the FFT grid for the exact exchange is identical to the FFT grid used for the orbitals for {{TAG|PREC}}=Normal in the DFT part. For {{TAG|PRECFOCK}}=Accurate, the FFT grid for the exact exchange is identical to the FFT grid used for the orbitals for {{TAG|PREC}}=Accurate in the DFT part (any combination of {{TAG|PREC}} and {{TAG|PRECFOCK}} is allowed).
For {{TAG|PRECFOCK}}=Low and Fast, the smallest possible FFT grid that just encloses the cutoff sphere (G<sub>cut</sub>|) is used. This accelerates the calculations by roughly a factor two to three, but causes slight errors in the total energies and some noise in the calculated forces. To reduce the noise, the augmentation charges
are made very soft for {{TAG|PRECFOCK}}=Fast (whereas {{TAG|PRECFOCK}}=Low uses the standard augmentation charges also used for DFT).


For {{TAG|PRECFOCK}}=Normal, the FFT grid for the exact exchange is identical to the FFT grid used for the orbitals for {{TAG|PREC}}=Normal in the DFT part. In this case, the grid density is between the ones for
{{TAG|PRECFOCK}}=Accurate and {{TAG|PRECFOCK}}=Fast. This is often a very reasonable comprise and hence recommended for most routine calculations.
For {{TAG|PRECFOCK}}=Fast, Normal and Accurate, the augmentation charges (required to restore the norm and dipoles of the overlap density on the plane wave grid) are softened, such that an accurate presentation on the plane wave grid is possible even for relatively coarse FFT grids. The sphere size is printed out after
For {{TAG|PRECFOCK}}=Fast, Normal and Accurate, the augmentation charges (required to restore the norm and dipoles of the overlap density on the plane wave grid) are softened, such that an accurate presentation on the plane wave grid is possible even for relatively coarse FFT grids. The sphere size is printed out after


  Radii for the augmentation spheres in the non-local exchange
  Radii for the augmentation spheres in the nonlocal exchange
 
Since VASP always uses one-center terms to correct for the difference between all-electron and pseudo orbitals, the precise shape of the augmentation charges matters little for exchange  
energies. Still it is recommended to keep PRECFOCK and PREC the same if relative energies are calculated (for instance adsorption energies, energies differences between different phases, etc.).


The following table summarizes the possible setting:
The following table summarizes the possible setting:


:{| cellpadding="5" cellspacing="0" border="1"
:{| cellpadding="5" cellspacing="0" border="1"
|{{TAG|PRECFOCK}} || FFT-grid || Augmentation charge || Quality
|{{TAG|PRECFOCK}} || FFT-grid || Augmentation charge || Quality || Comment
|-
|-
| Low || G<sub>cut</sub> || identical to standard DFT || large noise in forces/energy errors
|Normal
|3/2&times;G<sub>cut</sub> identical to std. FFT for PREC=Normal
|soft augmentation charge<sup>a</sup>
|accurate forces and energy
|good compromise
|-
|-
| Medium || identical to std. FFT || identical to standard DFT || some noise in forces/good energy
|Accurate
|2&times;G<sub>cut</sub> identical to std. FFT for PREC=Accurate
|soft augmentation charge<sup>a</sup>
|very accurate forces and energy
|for phonons
|-
|-
| Fast || G<sub>cut</sub> || very soft augmentation charge<sup>a</sup>|| some noise in forces/good energy
| Fast || G<sub>cut</sub> d|| very soft augmentation charge<sup>b</sup>|| some noise in forces/good energy || need for speed
|-
|-
| Normal || 3/2&times;G<sub>cut</sub> || soft augmentation charge<sup>b</sup> || accurate forces and energy
| Medium || strictly identical to std. FFT|| identical to standard DFT || identical to standard DFT || outdated
|-
|-
| Accurate || 2&times;G<sub>cut</sub> || soft augmentation charge<sup>b</sup> || very accurate forces and energy
|Single<sup>c</sup>
|strictly identical to std. FFT
|identical to standard DFT
|identical to standard DFT
|if compatibility between Hartree and exchange is desired
|-
|-
|colspan="4"|<sup>a</sup > radius for augmentation sphere is increased by factor 1.25 compared to default.
| Low || G<sub>cut</sub> || identical to standard DFT || large noise in forces/energy errors  || outdated
<sup>b</sup> radius is increased by factor 1.35 compared to default except for ''s'' -like charge, for the ''s'' -channel the radius of the augmentation sphere is increased by a factor 1.25.
|-
| colspan="5" |<sup>a</sup> radius for augmentation sphere is increased by factor 1.25 compared to default.
<sup>b</sup> radius is increased by factor 1.35 compared to default except for ''s'' -like charge; for the ''s'' -channel the radius of the augmentation sphere is increased by a factor 1.25.
 
<sup>c</sup> if user selects {{TAG|PREC}} = Single or {{TAG|PREC}} = SingleN, the default for PRECFOCK also becomes Single.
|}
|}


where
Medium and Single are synonyms. They are useful the select the same treatment for the Hartree  and exchange term. This can be advantageously for correlated wave function calculations to obtain a numerically exact balance and compensation between Hartree and exchange (for instance for the upcoming auxiliary field Monte-Carlo module in VASP). For conventional Hartree-Fock or hybrid functional calculations, Normal or Accurate should be used.
 
In this table, G<sub>cut</sub> is determined by the relation
:<math>E_{\rm cut}=\frac{\hbar^2}{2m_e}G_{\rm cut}^2</math>
:<math>E_{\rm cut}=\frac{\hbar^2}{2m_e}G_{\rm cut}^2</math>
with E<sub>cut</sub>={{TAG|ENCUT}}.
with E<sub>cut</sub>={{TAG|ENCUT}}.  


Even {{TAG|PRECFOCK}}=Fast yields fairly low noise in the forces and virtually no egg-box effects (aliasing errors). In the forces, the noise is usually below 0.01 eV/&Aring;. For {{TAG|PRECFOCK}}=N and {{TAG|PRECFOCK}}=A, noise is usually not an issue, and the accuracy is sufficient even for phonon calculations in large supercells.
Even {{TAG|PRECFOCK}}=Fast yields fairly low noise in the forces and virtually no egg-box effects (aliasing errors). In the forces, the noise is usually below 0.01 eV/&Aring;. For {{TAG|PRECFOCK}}=N and {{TAG|PRECFOCK}}=A, noise is usually not an issue, and the accuracy is sufficient even for phonon calculations in large supercells.


== Related Tags and Sections ==
Any combination of {{TAG|PREC}} and {{TAG|PRECFOCK}} is allowed by the code. Useful settings of increasing precision are however:
 
PREC = Normal ; PRECFOCK = Fast      ! if your are in need for speed
PREC = Normal ; PRECFOCK = Normal    ! the default
PREC = Accurate ; PRECFOCK = Normal  ! increase the precision for DFT part; since exchange dominates the compute time, only slightly slower
PREC = Accurate ; PRECFOCK = Accurate ! highest accuracy, suggested for phonons
 
== Related tags and articles ==
{{TAG|PREC}},
{{TAG|PREC}},
{{TAG|ENCUT}},
{{TAG|ENCUT}},
[[Hartree-Fock_and_HF/DFT_hybrid_functionals|hybrid functionals]],
[[list_of_hybrid_functionals|List of hybrid functionals]],
[[specific_hybrid_functionals|settings for specific hybrid functionals]]
[[Hybrid_functionals:_formalism|Hybrid functionals: formalism]]


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


[[Category:INCAR]][[Category:Hybrids]]
[[Category:INCAR tag]][[Category:Exchange-correlation functionals]][[Category:Hybrid_functionals]]

Latest revision as of 09:12, 18 October 2023

PRECFOCK = Normal | Accurate | Fast | Medium | Single | Low 

Default: PRECFOCK = Fast for RPAR calculations
= Single if PREC=Single or SingleN
= Normal else

Description: PRECFOCK controls the FFT grids used in the exact exchange routines (Hartree-Fock and hybrid functionals).


The FFT grid used for the exact exchange contributions can be chose to be different from the one used for the Hartree and DFT potentials. Information on the FFT grid that is used in the exact Fock exchange routines is written to the OUTCAR file after the lines

FFT grid for exact exchange (Hartree Fock)

We recommend to set PRECFOCK=Normal for routine calculations. If speed is an issue, you can also use PRECFOCK=Fast (e.g. use this to pre-converge the orbitals). For very high precision, in particular for phonon calculations, PRECFOCK=Accurate is recommended. The two setting, PRECFOCK=Medium and PRECFOCK=Low are not recommended, but have been kept to maintain compatibility with older VASP versions.

Generally, as opposed to gradient corrected density functionals, the exact exchange energy is rather insensitive to the FFT grids, and in many cases a rather coarse grid can be used to calculate the overlap densities and the exact exchange (Fock) potential. Exact exchange requires one to evaluation the overlap density

between two orbitals. Strictly speaking, errors in the convolution (aliasing errors) are only avoided, if the FFT grid contains all Fourier components up to twice the plane wave with the largest wave vector, 2|Gcut|. As usual, |Gcut| is determined by the plane wave cutoff (ENCUT). A grid avoiding aliasing errors is chosen by setting PRECFOCK=Accurate. In this case, the FFT grid for the exact exchange is identical to the FFT grid used for the orbitals for PREC=Accurate in the DFT part. PRECFOCK=Accurate is the recommended setting for very accurate calculations.

For PRECFOCK=Low and Fast, the smallest possible FFT grid that just encloses the cutoff sphere (Gcut|) is used. This accelerates the calculations by roughly a factor two to three, but causes slight errors in the total energies and some noise in the calculated forces. To reduce the noise, the augmentation charges are made very soft for PRECFOCK=Fast (whereas PRECFOCK=Low uses the standard augmentation charges also used for DFT).

For PRECFOCK=Normal, the FFT grid for the exact exchange is identical to the FFT grid used for the orbitals for PREC=Normal in the DFT part. In this case, the grid density is between the ones for PRECFOCK=Accurate and PRECFOCK=Fast. This is often a very reasonable comprise and hence recommended for most routine calculations.

For PRECFOCK=Fast, Normal and Accurate, the augmentation charges (required to restore the norm and dipoles of the overlap density on the plane wave grid) are softened, such that an accurate presentation on the plane wave grid is possible even for relatively coarse FFT grids. The sphere size is printed out after

Radii for the augmentation spheres in the nonlocal exchange

Since VASP always uses one-center terms to correct for the difference between all-electron and pseudo orbitals, the precise shape of the augmentation charges matters little for exchange energies. Still it is recommended to keep PRECFOCK and PREC the same if relative energies are calculated (for instance adsorption energies, energies differences between different phases, etc.).

The following table summarizes the possible setting:

PRECFOCK FFT-grid Augmentation charge Quality Comment
Normal 3/2×Gcut identical to std. FFT for PREC=Normal soft augmentation chargea accurate forces and energy good compromise
Accurate 2×Gcut identical to std. FFT for PREC=Accurate soft augmentation chargea very accurate forces and energy for phonons
Fast Gcut d very soft augmentation chargeb some noise in forces/good energy need for speed
Medium strictly identical to std. FFT identical to standard DFT identical to standard DFT outdated
Singlec strictly identical to std. FFT identical to standard DFT identical to standard DFT if compatibility between Hartree and exchange is desired
Low Gcut identical to standard DFT large noise in forces/energy errors outdated
a radius for augmentation sphere is increased by factor 1.25 compared to default.

b radius is increased by factor 1.35 compared to default except for s -like charge; for the s -channel the radius of the augmentation sphere is increased by a factor 1.25.

c if user selects PREC = Single or PREC = SingleN, the default for PRECFOCK also becomes Single.

Medium and Single are synonyms. They are useful the select the same treatment for the Hartree and exchange term. This can be advantageously for correlated wave function calculations to obtain a numerically exact balance and compensation between Hartree and exchange (for instance for the upcoming auxiliary field Monte-Carlo module in VASP). For conventional Hartree-Fock or hybrid functional calculations, Normal or Accurate should be used.

In this table, Gcut is determined by the relation

with Ecut=ENCUT.

Even PRECFOCK=Fast yields fairly low noise in the forces and virtually no egg-box effects (aliasing errors). In the forces, the noise is usually below 0.01 eV/Å. For PRECFOCK=N and PRECFOCK=A, noise is usually not an issue, and the accuracy is sufficient even for phonon calculations in large supercells.

Any combination of PREC and PRECFOCK is allowed by the code. Useful settings of increasing precision are however:

PREC = Normal ; PRECFOCK = Fast       ! if your are in need for speed
PREC = Normal ; PRECFOCK = Normal     ! the default
PREC = Accurate ; PRECFOCK = Normal   ! increase the precision for DFT part; since exchange dominates the compute time, only slightly slower
PREC = Accurate ; PRECFOCK = Accurate ! highest accuracy, suggested for phonons

Related tags and articles

PREC, ENCUT, List of hybrid functionals, Hybrid functionals: formalism

Examples that use this tag