Technical background
Calculating the electrostatic potential for periodic boundary conditions is often seen as one of the bottlenecks in molecular dynamics simulations. Formally it is easier, for example the electrostatic potential energy is if periodic boundary conditions are not considered:
If periodic boundary conditions are considered, then the electrostatic potential energy becomes:
Not to mention the superposition of an infinite number of boxes, even a single\(O(N^2)\)of computational complexity, which is the reason for the difficulty in solving. In molecular dynamics, three ideas are used to simplify this computational effort: the Fourier Transform, Ewald Summation, and the Particle Mesh approach, and this paper deals with the part of the Fourier Transform that is computed with Ewald Summation.
periodic potential
First we understand the meaning of the electrostatic potential energy term in terms of physical concepts: a single charge\(q_i\)would create an electric potential in space\(V_i\)When another charge\(q_j\)be situated at\(V_i\)When in the corresponding electric field, one is subjected to electrostatic interactions with an energy of\(E_{ij}\). Since the electrostatic potential energy at infinity is 0, this also assumes that if we need to convert the\(q_j\)Pushing beyond infinity from the original position would require the\(E_{ij}\)of energy. This idea tells us that we can first calculate the potential\(V_i\)and then calculate the potential energy\(E_{ij}\), which is the same thing:
If one considers the upper periodic boundary condition that is:
Because there is no way to calculate this infinitely many summation directly, it is only clear that the potential is periodic:\(V_i(\mathbf{r})=V_i(\mathbf{r}+\mathbf{n}\mathbf{L})\)。
Poisson's equation for an electrostatic field
Charge in space\(i\)exist\(\mathbf{r}\)The potential at is given by the Poisson equation:
included among these\(\Delta\)is the Laplace operator.\(\rho_i\)denotes the charge density. If the case of a point charge is considered, then there is:\(\rho_i(\mathbf{r})=q_i\delta(\mathbf{r}-\mathbf{r}_i)\). In turn, write the Poisson equation in Euclidean space:
included among these\(\nabla^2V_i(\mathbf{r})=\frac{\partial^2V_i(\mathbf{r})}{\partial x^2}+\frac{\partial^2V_i(\mathbf{r})}{\partial y^2}+\frac{\partial^2V_i(\mathbf{r})}{\partial z^2}\). Consider again the periodic boundary conditions, with a point charge in each box\(q_i\), so the equation should be written as:
Poisson equation in Fourier space
Simultaneous Fourier transforms are applied to both sides of the Poisson equation in the above single-point form (for an understanding of Fourier transforms, seePreface Article 1respond in singingPreface Article 2, there is a more detailed introduction to the principle and related code implementation) there:
Start by calculating one of the items on the left using the division integral:
It is important to note that here\(\frac{\partial V_i(\mathbf{r})}{\partial x}=F_i(\mathbf{r})\)the physical meaning of the action, then we can take the first type of boundary conditions:
Such that by definition of differentiation there is:
This limit above substitutes for the\(V_i(\mathbf{r})\)The significance of the single-point form, which is located in the\(\mathbf{r}_i\)point charge at\(q_i\), the electric field generated at infinity is 0 for the charge at infinity\(q_{\infty}\)The force is also 0. The periodic boundary conditions are not considered here. Then there are:
Similarly, the left-hand side of the Poisson equation can be obtained in the form:
And the right-hand side form requires the sampling properties of the Dirac function:
To wit:
The single-point Poisson equation in Fourier space is obtained:
reciprocal space
When it comes to Fourier space, it is natural to think of using the inverse eigenspace transformation of solid state physics, that is, treating a periodic box as a protocell. According to the inverse easy space (also called\(\mathbf{k}\)The (spatial) lattice vector (inverted lattice vector) definition has:
Among them:
Follow our usual rectangular periodic boundary conditions:
It can be calculated:
included among these\(\Omega\)denotes the volume of the periodic box, similarly:
as well as
After the inverse easy space transformation, the protocell volume increases from\(\Omega=L_xL_yL_z\)Becoming:\(\Omega^*=\frac{(2\pi)^3}{L_xL_yL_z}\). Because in the previous step of the Poisson equation in Fourier space we note that\(\mathbf{k}\)The front always carries a\(2\pi\), it may be useful here to use the definition of the inverse easy lattice vector for the\(\mathbf{k}\)to do a simplification of the form of the
In this way the Poisson equation in Fourier space can be abbreviated as:
included among these\(k^2=|\mathbf{k}|^2=\frac{4\pi^2m_1^2}{L_x^2}+\frac{4\pi^2m_2^2}{L_y^2}+\frac{4\pi^2m_3^2}{L_z^2}\)The transformation from real space to inverse easy space can be realized.
Decay function construction
For the form of the single-point potential after the Fourier transform described above, even if we have the entire\(\mathbf{k}\)space for integration, which is also a divergence result. So a very special idea is used here, proposed by Edwald, to divide the electrostatic energy term into a long-range interaction term and a short-range interaction term, which converge in inverse and real space, respectively, so that the electrostatic energy can be calculated exactly. In practice, there are different derivations, so we quote a more "mathematical" one (see link 1).
First we construct a decay function\(e^{-k^2t}\), a property of this decay function is:
This allows us to replace the Fourier-Poisson equation in the Fourier-Poisson equation with this form of integration\(\frac{1}{k^2}\)Item:
Since an integral form from 0 to infinity is used here, then we can implement a truncation that divides it into the sum of two integrals, if we are in the\(\eta\)Doing a truncation at the place, then there is:
The Short Term (ST) interaction is taken here:
as well as Long Term (LTP) interactions for:
Calculation of short-range action terms
As expected, after dividing the short-range action term and the long-range action term, a real-space convergent short-range interaction should be obtained, and we do an inverse Fourier transform of the short-range action:
It is clear that the summation term within the integral is a discrete Fourier transform of an exponential square function. And we can know that the normal distribution function\(f(\xi)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{\xi^2}{2\sigma^2}}\)The Fourier and inverse Fourier transforms do not change the form of the distribution:
Since the integral term is just an integral in real space, it is still essentially an integral of a normal distribution function, and we know that the result of its integration is a constant, so there:
is also a normal distribution, except that its mean square deviation varies from\(\sigma\)It's turned into\(\frac{1}{\sigma}\), that is, its integral results in:
In the same way we can calculate that the inverse Fourier transform of a normal distribution function is still a normal distribution function with the mean square deviation of\(\frac{1}{\sigma}\)。
So back to the short-range static potential, let's start with a variable substitution\(t=\frac{\sigma^2}{2},\sigma\geq0\)then there are\(dt=\sigma d\sigma,\sigma_{t=\eta}=\sqrt{2\eta},\sigma_{t=0}=0\). At this point the short-range interaction potential is:
here are\(N_{coe}\)is a constant used to normalize the normal distribution:
So there:
Replace it with a variable here:\(y=-\frac{|\mathbf{r}-\mathbf{r}_i|}{\sqrt{2}\sigma}\)Then there is:\(\sigma=-\frac{|\mathbf{r}-\mathbf{r}_i|}{\sqrt{2}y}\), whose differential transformations take the form:\(d\sigma=\frac{|\mathbf{r}-\mathbf{r}_i|}{\sqrt{2}y^2}dy\), whose boundaries are:\(y_{\sigma=\sqrt{2\eta}}=-\frac{|\mathbf{r}-\mathbf{r}_i|}{2\sqrt{\eta}},y_{\sigma=0}=-\infty\), substituting to get:
At this point an error function is used\(Erfc(y)=\frac{2}{\sqrt{\pi}}\int_{y}^{\infty}e^{-x^2}dx\)Substitute to make the substitution:
on account of\(\eta\)is a constant covariate that we introduce manually, and if we consider the\(\eta=\frac{\sigma^2}{2}\), then the form becomes:
This form of short-range interaction potential represents a single charged particle inside a single box\(q_i\)exist\(\mathbf{r}\)The potential at, if periodic boundary conditions are considered, the form needs to be changed to:
This form of interaction potential compared to the original form\(V_i(\mathbf{r})=\frac{1}{4\pi\epsilon_0}\sum_{\mathbf{n}}\frac{q_i}{\left|\mathbf{r}-\mathbf{r}_i+\mathbf{n}\mathbf{L}\right|}\)for example, an error function is used to make a truncation of the real space:
Thus, only a finite number of computational\(\mathbf{n'}\)of the periodic box is sufficient. Since the truncation here is at a distance of\(d_{\mathbf{n}}=|\mathbf{r}-\mathbf{r}_i+\mathbf{n}\mathbf{L}|\), one can prove the convergence of the short-range interaction potentials in real space by the D'Alembert discriminant (by generalizing the method of taking first a\(\delta>0\)):\(\lim_{l_{\mathbf{n}}\rightarrow\infty}\frac{Erfc(\frac{l_{\mathbf{n}}+\delta}{\sqrt{2}\sigma})l_{\mathbf{n}}}{(l_{\mathbf{n}}+\delta)Erfc(\frac{l_{\mathbf{n}}}{\sqrt{2}\sigma})}=\lim_{l_{\mathbf{n}}\rightarrow\infty}\frac{Erfc\left(\frac{l_{\mathbf{n}+\delta}}{\sqrt{2}\sigma}\right)}{Erfc\left(\frac{l_{\mathbf{n}}}{\sqrt{2}\sigma}\right)}=e^{-\frac{\delta^2}{2\sigma^2}}\lim_{l_{\mathbf{n}}\rightarrow\infty}e^{-\frac{l_{\mathbf{n}}\delta}{\sigma^2}}=e^{-\frac{\delta^2}{2\sigma^2}}<1\). That is, the short-range interaction of potentials converges in real space. After obtaining the form of the short-range interaction potential, the potential energy of the short-range interaction can be further calculated:
Calculation of long-range action terms
The long-range interaction potential form is obtained earlier as:
Also use the values in the short-range action term\(\eta=\frac{\sigma^2}{2}\).. Do an inverse Fourier transform back to real space:
Similarly one can prove the convergence of the formula according to the D'Alembert discriminant method. And with reference to the previous inverse easy space\(\mathbf{k}\)The definition has:
That is, the long-range interaction term can be omitted from the summation term of the periodic box, so the long-range interaction potential energy takes the form:
The content of these last two summations takes the form of the inner product of two plane wave functions, the physical meaning of which is that by distributing a fixed charge in real space according to the probability amplitude to different lattice points in the inverse easy space, a charge distribution function in the inverse easy space can be defined:
Then the writing of the long-range interaction potential can be further simplified:
One point to note is that although the long-range interaction potential is convergent here, it contains the point charge\(i\)treat (sb a certain way)\(\mathbf{r}_i\)The potential energy generated at (needs to be removed). And the long-range interaction form of the error function form that was previously available when calculating the short-range interaction:
Although not astringent, it would have been better to take a\(\mathbf{r}=\mathbf{r}_i,\mathbf{nL}=0\), which is also the charge self-interaction mentioned earlier, the long-range interaction form becomes:
The self-interaction term to be subtracted from the long-range interaction term in the inverse easy space can then be obtained as:
total potential energy
After the previous calculations, we have obtained the short-range interaction term for real-space convergence, the long-range interaction term for inverse-easy-space convergence, and a self-interaction term that needs to be subtracted from the long-range interaction term, respectively, then the potential energy can be summarized as:
Summary outline
This paper describes the Ewald summation method for calculating the electrostatic potential energy under periodic boundary conditions. The periodic electrostatic potential function is not a spatially convergent function, and by Ewald summation the electrostatic potential can be cut into short-range interactions and long-range interactions, and the two terms converge in the real space and the inverse easy space (or Fourier space, k-space, etc.), respectively. Further truncation can then be performed to obtain more accurate potential energy calculations with less cost.
copyright statement
This article was first linked to:/dechinphy/p/
Author ID: DechinPhy
More original articles:/dechinphy/
Buy the blogger coffee:/dechinphy/gallery/image/
reference link
- /mediawiki/images/4/46/Ewald_notes.pdf