Force Error
The Force error is the error incurred when we cut the potential interaction after a certain distance. Following the works
of [Dharuman et al., 2017, Kolafa and Perram, 1992, Stern and Calkins, 2008] we define the total force error for our P3M algorithm as
where is the error obtained in the PP part of the force calculation and
is the error obtained in the PM part, the subscripts stand for
real space and Fourier space respectively. is calculated as follows
where is the short-range part of the chosen potential. In our example case of a
Yukawa potential we have
where are the dimensionless screening parameter and Ewald parameter respectively and, for the
sake of clarity, we have a charge with an ionization state of . Integrating this potential,
and neglecting fast decaying terms, we find
On the other hand is calculated from the following formulas
This is a lot to take in, so let’s unpack it. The first term is the RMS of the force field in Fourier space
obtained from solving Poisson’s equation in Fourier
space. In a raw Ewald algorithm this term would be the PM part of the force. However, the P3M variant
solves Poisson’s equation on a Mesh, hence, the second term which is non other than the RMS of the force obtained on the mesh.
is the optimal Green’s function which for the Yukawa potential is
where
is the Fourier transform of the B-spline of order
where is the number of mesh points along each direction. Finally the refers to the
triplet of grid indices that contribute to aliasing. Note that in the above equations
as (Coulomb limit), we recover the corresponding error estimate for the Coulomb potential.
The reason for this discussion is that by inverting the above equations we can find optimal parameters
given some desired errors . While
the equation for can be easily inverted for , such task seems impossible for
without having to calculate a Green’s function for each chosen . As you can
see in the second part of the output the time it takes to calculate is in the order of seconds,
thus, a loop over several values would be very time consuming. Fortunately researchers
have calculated an analytical approximation allowing for the exploration of the whole parameter
space [Dharuman et al., 2017]. The equations of this approximation are
where and the coefficients are listed in Table I of [Deserno and Holm, 1998].
Finally, by calculating
we are able to investigate which parameters are optimal for our simulation.