PRECFOCK: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 3: Line 3:
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. 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. [[Hartree-Fock_and_HF/DFT_hybrid_functionals#ExFock|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, which is between the grids for
{{TAG|PRECFOCK}}=Accurate and {{TAG|PRECFOCK}}=Fast. This is often a very reasonable comprise, and thus 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


Line 22: Line 31:


:{| 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
| Low || G<sub>cut</sub> || identical to standard DFT || large noise in forces/energy errors || outdated
|-
|-
| Medium || identical to std. FFT || identical to standard DFT || some noise in forces/good energy
| Medium || strictly identical to std. FFT || identical to standard DFT || some noise in forces/good energy || outdated
|-
|-
| 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>a</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
| Normal || 3/2&times;G<sub>cut</sub> identical to std. FFT || soft augmentation charge<sup>b</sup> || accurate forces and energy || good compromise
|-
|-
| Accurate || 2&times;G<sub>cut</sub> || soft augmentation charge<sup>b</sup> || very accurate forces and energy
| Accurate || 2&times;G<sub>cut</sub> || soft augmentation charge<sup>b</sup> || very accurate forces and energy || for phonons
|-
|-
|colspan="4"|<sup>a</sup > radius for augmentation sphere is increased by factor 1.25 compared to default.
|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>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.
|}
|}
Line 43: Line 52:


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.
Note that 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 Sections ==
== Related Tags and Sections ==

Revision as of 08:55, 30 September 2020

PRECFOCK = Low | Medium | Fast | Normal | Accurate
Default: PRECFOCK = Normal 

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. 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, which is between the grids for PRECFOCK=Accurate and PRECFOCK=Fast. This is often a very reasonable comprise, and thus 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 non-local exchange

The following table summarizes the possible setting:

PRECFOCK FFT-grid Augmentation charge Quality Comment
Low Gcut identical to standard DFT large noise in forces/energy errors outdated
Medium strictly identical to std. FFT identical to standard DFT some noise in forces/good energy outdated
Fast Gcut d very soft augmentation chargea some noise in forces/good energy need for speed
Normal 3/2×Gcut identical to std. FFT soft augmentation chargeb accurate forces and energy good compromise
Accurate 2×Gcut soft augmentation chargeb very accurate forces and energy for phonons
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.

where

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.

Note that 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 Sections

PREC, ENCUT, hybrid functionals, settings for specific hybrid functionals

Examples that use this tag