Wrap-around errors: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 48: Line 48:
</math>
</math>


{{NumBlk|:|<math>x^2 + y^2 + z^2 = 1</math>|{{EquationRef|1}}}}  
Using the above equations for <math>\rho^{\mathrm{ps}}_{\bold{r}}</math> and <math>C_{\bold{r}n\bold{k}}</math> it
 
is very  easy to show that <math>\rho^{\mathrm{ps}}_{\bold{r}}</math> contains Fourier-components up
Inserting <math>\rhops</math> from equation (\ref{rps}) and $ C_\rnk$ from (\ref{pl2}) it
to <math>2 G_{\mathrm{cut}}</math>.
is very  easy to show that $\rhops_\br $ contains Fourier-components up
to $2 G_{\rm cut}$.


Generally it can be shown that
Generally it can be shown that
a the convolution $f_r=f^1_r f^2_r$
a the convolution <math>f_r=f^1_r f^2_r</math>
of two 'functions' $f^1_r$ with  Fourier-components
of two functions <math>f^1_r</math> with  Fourier-components
up to $G_1$ and $f^2_r$ with Fourier-components
up to <math>G_1</math> and <math>f^2_r</math> with Fourier-components
up to $G_2$ contains Fourier-components up to  $G_1+G_2$.
up to <math>G_2</math> contains Fourier-components up to  <math>G_1+G_2</math>.


The property of the convolution comes once again into play,
The property of the convolution comes once again into play,
when the action of the Hamiltonian onto a wavefunction is
when the action of the Hamiltonian onto a wavefunction is
calculated. The action of the local-potential is given by
calculated. The action of the local-potential is given by
\[
a_\br =  V_\br  C_\rnk
\]
Only the components $a_\bG$ with $|\bG| < G_{\rm cut}$ are taken into
account (see section \ref{algo}: $a_\bG$ is added to the wavefunction
during the iterative refinement of the wavefunctions $C_\Gnk$,
and  $C_\Gnk$ contains only components up to  $G_{\rm cut}$).
From the previous theorem we see that $a_\br$ contains
components up to $3 G_{\rm cut}$ ($V_\br$ contains components up to


$2 G_{\rm cut}$).
<math>
a_\br =  V_\br  C_\rnk.
</math>
 
Only the components <math>a_{\bold{G}}</math> with <math>|\bold{G}| < G_{\mathrm{cut}}</math> are taken into
account (see section {{TAG|ALGO}}: <math>a_{\bold{G}}</math> is added to the wavefunction
during the iterative refinement of the wavefunctions <math>C_{\bold{G}n\bold{k}}</math>,
and  <math>C_{\bold{G}n\bold{k}}</math> contains only components up to <math>G_{\mathrm{cut}}</math>).
From the previous theorem we see that <math>a_{\bold{r}}</math> contains
components up to <math>3 G_{\mathrm{cut}}</math> (<math>V_{\bold{r}}</math> contains components up to
<math>2 G_{\mathrm{cut}}</math>).
 
\begin{figure}  \unitlength1cm
\begin{figure}  \unitlength1cm
\epsffile{algo1.eps}
\epsffile{algo1.eps}
\caption{ \label{algo-fig1}
\caption{ \label{algo-fig1}
The small sphere contains all plane waves included in the basis set  $G<G_{\rm cut}$.
The small sphere contains all plane waves included in the basis set  <math>G<G_{\mathrm{cut}}</math>.
The charge density contains components up to  $2 G_{\rm cut}$ (second sphere), and
The charge density contains components up to  <math>2 G_{\mathrm{cut}}</math> (second sphere), and
the acceleration $a$ components up to $3 G_{\rm cut}$, which are reflected
the acceleration <math>a</math> components up to <math>3 G_{\mathrm{cut}}</math>, which are reflected
in (third sphere) because of the finite size of the FFT-mesh. Nevertheless
in (third sphere) because of the finite size of the FFT-mesh. Nevertheless
the components $a_\bG$ with $| \bG| < G_{\rm cut}$ are correct i.e.
the components <math>a_{\bold{G}}</math> with <math>| \bold{G}| < G_{\mathrm{cut}}</math> are correct i.e.
the small sphere does not intersect with the third large sphere
the small sphere does not intersect with the third large sphere}
}
\end{figure}
\end{figure}
If the FFT-mesh contains all components up to  $2 G_{\rm cut}$
If the FFT-mesh contains all components up to  <math>2 G_{\mathrm cut}</math>
the resulting wrap-around error is once again 0. This can
the resulting wrap-around error is once again 0. This can
be easily seen in Fig. \ref{algo-fig1}.
be easily seen in Fig. \ref{algo-fig1}.

Revision as of 15:00, 18 March 2019

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 $G$ vectors up to .

It can be shown that the charge density contains components up to , where is the "longest" plane wave in the basis set:

The wavefunction is defined as

and in real space it is given by

Using Fast Fourier transformations one can define

Therefore the wavefunction can be written in real space as

The charge density is simply given by

and in the reciprocal mesh it can be written as

Using the above equations for and it is very easy to show that contains Fourier-components up to .

Generally it can be shown that a the convolution of two functions with Fourier-components up to and with Fourier-components up to contains Fourier-components up to .

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

Failed to parse (Conversion error. Server ("cli") reported: "[INVALID]"): {\displaystyle a_\br = V_\br C_\rnk. }

Only the components with are taken into account (see section ALGO: is added to the wavefunction during the iterative refinement of the wavefunctions , and contains only components up to ). From the previous theorem we see that contains components up to ( contains components up to ).

\begin{figure} \unitlength1cm \epsffile{algo1.eps} \caption{ \label{algo-fig1} The small sphere contains all plane waves included in the basis set . The charge density contains components up to (second sphere), and the acceleration components up to , which are reflected in (third sphere) because of the finite size of the FFT-mesh. Nevertheless the components with are correct i.e. the small sphere does not intersect with the third large sphere} \end{figure} If the FFT-mesh contains all components up to the resulting wrap-around error is once again 0. This can be easily seen in Fig. \ref{algo-fig1}.