Requests for technical support from the VASP group should be posted in the VASP-forum.

# Wrap-around errors

In this section we will discuss wrap around errors. Wrap around errors arise if the FFT meshes are not sufficiently large. It can be shown that no errors exist if the FFT meshes contain all ${\mathbf {G} }$ vectors up to $2G_{\rm {cut}}$ . Fig. 1: Sphere intersections for $G_{\mathrm {cut} }$ It can be shown that the charge density contains components up to $2G_{\mathrm {cut} }$ , where $2G_{\mathrm {cut} }$ is the "longest" plane wave in the basis set:

The wavefunction is defined as

$|\phi _{n{\mathbf {k}}}\rangle =\sum _{\mathbf {G}}C_{{\mathbf {G}}n{\mathbf {k}}}|{\mathbf {k}}+{\mathbf {G}}\rangle ,$ and in real space it is given by

$\langle {\mathbf {r}}|\phi _{n{\mathbf {k}}}\rangle =\sum _{\mathbf {G}}\langle {\mathbf {r}}|{\mathbf {k}}+{\mathbf {G}}\rangle \langle {\mathbf {k}}+{\mathbf {G}}|\phi _{n{\mathbf {k}}}\rangle ={\frac {1}{\Omega ^{1/2}}}\sum _{\mathbf {G}}e^{i({\mathbf {k}}+{\mathbf {G}}){\mathbf {r}}}C_{{\mathbf {G}}n{\mathbf {k}}}.$ Using Fast Fourier transformations one can define

$C_{{\mathbf {r}}n{\mathbf {k}}}=\sum _{\mathbf {G}}C_{{\mathbf {G}}n{\mathbf {k}}}e^{i{\mathbf {G}}{\mathbf {r}}}\qquad \qquad \qquad C_{{\mathbf {G}}n{\mathbf {k}}}={\frac {1}{N_{\mathrm {FFT} }}}\sum _{\mathbf {r}}C_{{\mathbf {r}}n{\mathbf {k}}}e^{-i{\mathbf {G}}{\mathbf {r}}}.$ Therefore the wavefunction can be written in real space as

$\langle {\mathbf {r}}|\phi _{n{\mathbf {k}}}\rangle =\phi _{n{\mathbf {k}}}(r)={\frac {1}{\Omega ^{1/2}}}C_{{\mathbf {r}}n{\mathbf {k}}}e^{i{\mathbf {k}}{\mathbf {r}}}.$ The charge density is simply given by

$\rho _{\mathbf {r}}^{\mathrm {ps} }\equiv \langle {\mathbf {r}}|\rho ^{\mathrm {ps} }|{\mathbf {r}}\rangle =\sum _{\mathbf {k}}w_{\mathbf {k}}\sum _{n}f_{n{\mathbf {k}}}\phi _{n{\mathbf {k}}}(r)\phi _{n{\mathbf {k}}}^{*}(r),$ and in the reciprocal mesh it can be written as

$\rho _{\mathbf {G}}^{\mathrm {ps} }\equiv {\frac {1}{\Omega }}\int \langle {\mathbf {r}}|\rho ^{\mathrm {ps} }|{\mathbf {r}}\rangle e^{-i{\mathbf {G}}{\mathbf {r}}}\,d{\mathbf {r}}\to {\frac {1}{N_{\mathrm {FFT} }}}\sum _{\mathbf {r}}\rho _{\mathbf {r}}^{\mathrm {ps} }e^{-i{\mathbf {G}}{\mathbf {r}}}.$ Using the above equations for $\rho _{\mathbf {r}}^{\mathrm {ps} }$ and $C_{{\mathbf {r}}n{\mathbf {k}}}$ it is very easy to show that $\rho _{\mathbf {r}}^{\mathrm {ps} }$ contains Fourier-components up to $2G_{\mathrm {cut} }$ .

Generally it can be shown that a the convolution $f_{r}=f_{r}^{1}f_{r}^{2}$ of two functions $f_{r}^{1}$ with Fourier-components up to $G_{1}$ and $f_{r}^{2}$ with Fourier-components up to $G_{2}$ contains Fourier-components up to $G_{1}+G_{2}$ .

The property of the convolution comes once again into play, when the action of the Hamiltonian onto a wavefunction is calculated. The action of the local-potential is given by

$a_{\mathbf {r}}=V_{\mathbf {r}}C_{{\mathbf {r}}n{\mathbf {k}}}.$ Only the components $a_{\mathbf {G}}$ with $|{\mathbf {G}}| are taken into account (see section ALGO: $a_{\mathbf {G}}$ is added to the wavefunction during the iterative refinement of the wavefunctions $C_{{\mathbf {G}}n{\mathbf {k}}}$ , and $C_{{\mathbf {G}}n{\mathbf {k}}}$ contains only components up to $G_{\mathrm {cut} }$ ). From the previous theorem we see that $a_{\mathbf {r}}$ contains components up to $3G_{\mathrm {cut} }$ ($V_{\mathbf {r}}$ contains components up to $2G_{\mathrm {cut} }$ ).

If the FFT-mesh contains all components up to $2G_{\mathrm {c} ut}$ the resulting wrap-around error is once again 0. This can be easily seen in Fig. 1. Here we see that the small sphere contains all plane waves included in the basis set $G . The charge density contains components up to $2G_{\mathrm {cut} }$ (second sphere), and the acceleration $a$ components up to $3G_{\mathrm {cut} }$ , which are reflected in (third sphere) because of the finite size of the FFT-mesh. Nevertheless the components $a_{\mathbf {G}}$ with $|{\mathbf {G}}| are correct i.e. the small sphere does not intersect with the third large sphere}