In the recent literature, a variety of techniques are available to handle the problem of long range interactions in computer simulations of charged particles at different level of approximation [30,31,12]. In this section, we shall focus on the Ewald summation method for the treatment of long range interactions in periodic systems [32,33,101]. The Ewald method gives the exact result for the electrostatic energy of a periodic system consisting of an infinitely replicated neutral box of charged particles. The method is the natural choice in MD simulations of complex molecular system with PBC.
The Ewald potential [33] is given by
in Eq. (4.24) can be looked at as a discrete Fourier transform (FT) of a set of charges placed irregularly within the unit cell. Techniques have been devised in the past to approximate with expressions involving Fourier transforms on a regular grid of points. Such approximations of the weighted structure factor are computationally advantageous because they can be evaluated by fast Fourier transforms (FFT). All these FFT-based approaches involve, in some sense, a smearing of the charges over nearby grid points to produce a regularly gridded charge distribution. The PME method accomplishes this task by interpolation. Thus, the complex exponential , computed at the position of the -th charge in Eq. (4.24), are rewritten as a sum of interpolation coefficients multiplied by their values at the nearby grid points. In the smooth version of PME (SPME) [35], which uses cardinal B-splines in place of the Lagrangian coefficients adopted by PME, the sum is further multiplied by an appropriate factor, namely:
(4.31) | |||
(4.32) | |||
(4.33) |
In practice, the calculation is carried out according to the following scheme: i) At each simulation step one computes the grid scaled fractional coordinates and fills an array with according to Eq. (4.28). At this stage, the derivative of the functions are also computed and stored in memory. ii) The array containing is then overwritten by , i.e. 's 3-D Fourier transform. iii) Subsequently, the electrostatic energy is computed via Eq. (4.30). At the same time, the array containing is overwritten by the product of itself with the array containing (computed at the very beginning of the run). iv) The resulting array is then Fourier transformed to obtain the convolution . v) Finally, the forces are computed via Eq. (4.36) using the previously stored derivatives of the functions to recast .
The memory requirements of the SPME method are limited. double precision real numbers are needed for the grid charge array , while the calculation of the functions and their derivatives requires only double precision real numbers. The integers determines the fineness of the grid along the -th lattice vector of the unit cell. The output accuracy of the energy and forces depends on the SPME parameters: The convergence parameter, the grid spacing and the order of the B-spline interpolation. For a typical Å a relative accuracy between for the electrostatic energy are obtained when the grid spacing is around 1 Å along each axis, and the order of the -spline interpolation is 4 or 5. A rigorous error analysis and a comparison with standard Ewald summation can be found in Refs. [35] and [102]. For further readings on the PME and SPME techniques we refer to the original papers [34,102,29,35].
The power of the SPME algorithm, compared to the straightforward implementation of the standard Ewald method, is indeed astonishing. In Fig. (4.3) we report CPU timing obtained on a low end 43P/160MH IBM workstation for the evaluation of the reciprocal lattice energy and forces via SPME for cyanobiphenil as a function of the number of atoms in the system. Public domain 3-D FFT routines were used. The algorithm is practically linear and for 12,000 particles SPME takes only 2 CPU seconds to perform the calculation. A standard Ewald simulation for a box Å (i.e. with a grid spacing in space of ) for the same sample and at the same level of accuracy would have taken several minutes. procacci 2021-12-29