Medium-range interactions occur in a wide range of systems, including charged-particle systems with varying screening lengths. We generalize the Ewald method to charged systems described by interactions involving an arbitrary dielectric response function . We provide an error estimate and optimize the generalization to find the break-even parameters that separate a neighbor list-only algorithm from the particle-particle particle-mesh algorithm. We examine the implications of different choices of the screening length for the computational cost of computing the dynamic structure factor. We then use our new method in molecular dynamics simulations to compute the dynamic structure factor for a model plasma system and examine the wave-dispersion properties of this system.
I. INTRODUCTION
The interactions employed in molecular dynamics (MD) simulations are typically considered to be either short- or long-range. In d dimensions, interactions of the form 1/rn are considered short range if . Short-range interactions are typically treated with a fast neighbor search within a cutoff radius rc; the interaction is truncated thereafter, and a tail correction can be added.1,2 Conversely, if , then the interactions are considered long range; such interactions are considerably more difficult to treat. In periodic systems, most methods for handling long-range interactions are based on the Ewald sum,3,4 which decomposes the Coulomb potential into two sums that are rapidly convergent. This decomposition can be implemented through a wide variety of algorithms, of which a naive implementation yields scaling; a simple optimization reduces this scaling to .5 Faster, grid-based methods have been developed that allow the fast Fourier transform (FFT) to be used,6 resulting in scaling; among these methods are the particle-mesh Ewald (PME),7 smoothed particle-mesh Ewald (SPME),8 and particle-particle particle-mesh (PPPM) methods.6,9–12 Alternatively, non-Ewald methods13 have also been developed, such as the Wolf summation method14 and fast multipole methods,15 and hybrid methods16,17 have been developed, as well.
However, this categorization of interactions as either short range or long range reflects the mathematical issue of force-sum convergence. In fact, many interactions can be considered to be medium range when their convergence is guaranteed yet either that there are a prohibitive number of particles in the neighbor radius or there are unacceptable truncation errors. For example, power-law potentials of the form (charge-dipole), (dipole-dipole), and 1/r6 (dispersion) fall into this category,18,19 as well as Sutton-Chen20 potentials relevant for metallic glasses.21 Isele-Holder et al.22 have extended the PPPM algorithm to interactions other than 1/r in their work on 1/r6 dispersion interactions. Similarly, prior work on screened Coulomb interactions includes extending the Ewald summation to Yukawa (exponentially screened) interactions.23,24
Here, we examine a particular class of medium-range interactions that form with linearly screened Coulomb potentials, where the screening is specified through an arbitrary dielectric response function (DRF) . The Ewald sum is formulated for this screened interaction and implemented with both a direct force approach (linked-cell list (LCL)26 alone) and the PPPM method. An error analysis is carried out to examine the crossover between the direct force calculation and the PPPM implementation as a function of the range of the interaction and the particle number.
This paper is organized as follows. In Sec. II, we describe a class of interactions for screened charged systems obtained through the Fourier representation of the dielectric properties of background species. Several choices for the screening function are given in terms of the dielectric response function , and their ranges are discussed. In Sec. III, the Ewald decomposition is developed for charged particle systems interacting through an effective interaction involving .
Sec. IV includes error estimates and timing studies for the Yukawa dielectric response function.
Finally, we apply our results to compute the dynamic structure factor for a screened Coulomb system and discuss the implications of the choice of and the computational costs that result from the temperature and density dependence of the effective interaction.
II. LINEARLY SCREENED COULOMB SYSTEMS
Consider N point particles with charges {Qi} (e.g., ions), which can be partial, in the presence of a background charge density −enb (e.g., electrons). The electrostatic forces in such a system can be calculated from the Poisson equation
where is the total electrostatic potential, is the delta function, and {ri(t)} are the particle coordinates at time t. Once this equation is solved, the corresponding force on the particle is calculated to be . Expression (1) can be equivalently represented in Fourier space as
By assuming that the background density evolves instantaneously with the point particles, which is a valid assumption for a very light species, such as electrons, and approximating the structure of the background density as a linear response to the potential fluctuations induced by the presence of the point particles, we can express the background density in terms of a response function as
We can write the electrostatic potential as
where the reciprocal of the DRF can be expressed in terms of the response function as
Finally, the force on the particle can be represented in terms of the pair interactions as
where the effective interaction uij(r) is given in Fourier space as
When the background does not respond, in (3). Such a completely uniform background corresponds to a dielectric response of unity in (5), and inverting (7) recovers the usual Coulomb interaction uij(r) = QiQj/r. Clearly, in the limit , Ewald-class methods are needed. To continue further, we must make a specific choice of the DRF; we begin with the most widely used form
where is the screening length associated with the background fluctuations. The associated pair interaction is given in real space by
This interaction decays exponentially and is therefore “short” range. However, as , the number of particles in a neighbor-sphere diverges. It is therefore convenient to characterize the strength of the screening in terms of the dimensionless quantity
where is the ion-sphere radius, which is a measure of the interparticle distance. The case is the pure Coulomb (one-component plasma) limit; thus, despite the exponential decay for finite κ, (9) has a long-range interaction as one of its limits. This suggests that there may be a finite range of κ for which the interaction (9) is medium range in the sense that there is no clear, optimal choice of algorithm.
To provide a concrete example, we can examine this choice in the context of the well-known Thomas-Fermi (TF) model,27,28 for which
where T is the background temperature in energy units, EF is the Fermi energy of the electron background in energy units, e is the elementary charge, and nb is the background number density. Let us suppose that, for example, an acceptable error is given by a choice of cutoff radius , which yields the factor in (9). Allowing physical conditions (T and nb) to vary, we can examine the number of particles in the neighbor cell. This is shown in Fig. 1, where contours show the logarithm of the number of particles in such a sphere as a function of temperature and density. Condensed systems (e.g., ionic liquids, liquid metals, and electrolytic solutions) tend to lie near the lower right region of the graph. Laser-produced plasmas originate as cold solids, in that same region, but can be rapidly heated to the very high temperatures of the upper right region. Roughly speaking, the lower right half of the diagram corresponds to particles in the neighbor cell for this choice of error. In Fig. 2, we show the phase diagram. The coupling parameter Γ is given by
where Z is the degree of ionization and Ti is the ionic temperature. This diagram reflects the regimes of different charged particle systems of interest such as liquid metals,29 ultracold neutral plasmas,30 dusty plasmas,31 warm dense matter,32 and conditions at the National Ignition Facility (NIF).33 We also show the regions corresponding to different liquid-like properties based on the properties of their velocity autocorrelation function.27 Note that these disparate systems cover a wide range of values.
The logarithm (base 10) of the number of particles in a cutoff sphere with radius determined by is shown. Because charged particle systems occur over very large ranges of temperature and density, the use of a simple neighbor-list algorithm may not be optimal.
The logarithm (base 10) of the number of particles in a cutoff sphere with radius determined by is shown. Because charged particle systems occur over very large ranges of temperature and density, the use of a simple neighbor-list algorithm may not be optimal.
The liquid portion of the phase diagram for a Yukawa system is shown. Three regions—caged, modulated decay, and exponential decay—are shown according to the properties of the velocity autocorrelation function.27 Five different types of charged particle systems are shown: liquid metals,29 ultracold neutral plasmas,30 dusty plasmas,31 warm dense matter,32 and conditions associated with heated capsules at the National Ignition Facility (NIF).33 This diagram shows the various types of behavior these disparate systems exhibit and their span of the plane.
The liquid portion of the phase diagram for a Yukawa system is shown. Three regions—caged, modulated decay, and exponential decay—are shown according to the properties of the velocity autocorrelation function.27 Five different types of charged particle systems are shown: liquid metals,29 ultracold neutral plasmas,30 dusty plasmas,31 warm dense matter,32 and conditions associated with heated capsules at the National Ignition Facility (NIF).33 This diagram shows the various types of behavior these disparate systems exhibit and their span of the plane.
Of course, the long-wavelength form of (8) is not unique, and interactions other than (9) are possible.34 Moreover, the method is applicable to a system of partial charges as well. For this reason, we will retain the generality of an arbitrary throughout the Ewald development in Sec. III. In fact, medium range interactions of different nature occur in biological and chemical systems where the linear screening approach is not applicable.35–37
III. EWALD DECOMPOSITION FOR ARBITRARY DIELECTRIC RESPONSE FUNCTIONS
To proceed with the development of the Ewald composition of (4), we note that the central quantity is the potential-like quantity
As is common, we implement the Ewald decomposition by adding and subtracting a screening-charge distribution of the form , where is a constant to be determined, and is chosen to have the Gaussian form
where is the Ewald splitting parameter. Fourier-space representation of the decomposition takes the form
where the real-space contribution
can be highly short range (because there are effectively two sources of cutoff). Analogously,
is short range in Fourier-space and hence can also be computed efficiently; this is the subject of Sec. IV. In the absence of screening, , and we recover the Ewald decomposition for the standard Coulomb interaction.4
The real-space representation of is given by the inverse Fourier transform
where an isotropic dielectric function is assumed in the second line. We evaluate this first with the long-wavelength () form of given by
where ks is the magnitude of the inverse screening vector given by , where is the long-wavelength screening length associated with properties of the background (i.e., classical, quantum, and multispecies). This form yields what is generically referred to as the Yukawa interaction. In what follows, we will be using in place of . Substituting in (20) yields
Gradient corrections to the Yukawa result can be captured by the form
where leading-order corrections to the Yukawa form appear as k4 terms. An example of this type of DRF is the exact gradient-corrected screening (EGS) potential,34 in which k4 terms arise from either electronic correlations or Heisenberg uncertainty (see Appendix A). Interestingly, the form of the potential is qualitatively different for and , with the latter corresponding to an oscillatory decay.34 Hence, the Ewald decomposition for the two cases will be different; in this paper, we will restrict our discussion to the case. Substituting in (20) yields
where
Because (for ), the optimal choice is . We have given the detailed derivation in Appendix A.
The real-space part of the Ewald decomposition of the screened Coulomb interaction between two point charges for an arbitrary DRF is, therefore, given by
This completes the formulation of the real-space contribution, which will be common to all Ewald-based methods. In Sec. IV, we first turn to the Fourier-space contribution, which we will treat with the PPPM algorithm for the particle-mesh contribution. Next, we provide an error analysis and a time-per-time-step comparison of the force calculations using PPPM and LCL algorithms for the Yukawa interaction. For the remainder of this paper, when we discuss LCL for a Yukawa interaction, this should be understood to refer to a force calculation using the LCL algorithm for a plain Yukawa interaction that is not subject to Ewald decomposition.
IV. ERROR ANALYSIS AND TIMING STUDIES
In this section, we begin with a brief explanation of the PPPM algorithm, followed by an error analysis for the computed force for the Yukawa DRF, with errors due to the truncation and discretization that are inherent to the algorithm. Then, we compare the execution times of the PPPM and LCL algorithms for the Yukawa potential to distinguish between the two algorithms in terms of computational efficiency for a certain level of error in the force calculation. The results of this section and Sec. V were obtained using the codes we implemented.38
The particle-particle (PP) part of the PPPM algorithm refers to the real-space part of the Ewald decomposition, which can be highly short range; therefore, interactions beyond a certain cutoff radius can be neglected. If the number of particles within a cutoff sphere Nc is small compared to the total number of particles N in a simulation box, then the total number of interactions tends to as Nc becomes much smaller than N (). Such an scaling is achieved by the LCL algorithm,6 in which the simulation box is divided into a number of cells with dimensions proportional to the cutoff radius. The particle-mesh (PM) portion of the PPPM algorithm refers to the Fourier-space part of the interaction that is computed on a grid using one of the two algorithms in Ref. 9; these algorithms differ in the manner in which forces are computed on a grid. Both versions of the PPPM algorithm employ the highly efficient FFT, which scales as , where M is the number of mesh points in the Fourier-space grid.
Errors are associated with computing the energy and forces in real-space and Fourier-space. Because we are interested in MD simulations in which the trajectories of a system of particles evolve primarily because of the forces acting on the particles, we restrict our error analysis to the errors in the forces. We chose to quantify the error in a force using the root-mean-square (RMS) error.9,10 The RMS errors in the real-space and Fourier-space components of the forces, which are acting on particles in a simulation box, have a common form given by
where refers to real-space or Fourier-space, is the approximate force acting on particle i, is the actual force (or numerically exact force) acting on particle i, and is used to distinguish between computed RMS errors and analytical estimates of RMS errors. Moreover, because the computational costs associated with real-space and Fourier-space force calculations are determined by the levels of error that are allowed, it is essential to understand how the errors vary with respect to the parameters. For this purpose, we have derived analytical estimates for the errors in the real-space and Fourier-space components of the forces for a system of randomly distributed particles. The error estimates were verified by comparing with the RMS errors computed for a system of particles placed at random positions within a simulation box. For the remainder of this paper, we use ai as the unit of distance and the elementary charge e as the unit of charge; thus, the RMS force error is in units of .
The error in the real-space component of the force is due to the truncation of particle interactions beyond a certain cutoff radius. For a system of N charged point particles interacting pair-wise with an arbitrary short-range interaction expressed as , the estimate of the RMS force error due to a cutoff radius rc can be derived by adapting the error analysis in Ref. 39, which considers the real-space portion of the Ewald decomposition for the Coulomb potential. With the assumption that beyond rc particles are randomly distributed, the estimate of the RMS force error due to us(r) is given by
where , , and V is the volume enclosing the particles.
Substituting in (29) and making several approximations, we get the following estimate of the RMS force error for the real-space portion of the Ewald decomposition for the Yukawa potential:
(see Appendix B for details). Note that as (Coulomb limit), we recover the corresponding error estimate for the Coulomb case.39 Figs. 3(a)–3(c) show very good agreement between the error estimates and the computed RMS error in the real-space force component for a system of unit charges with = 0.1, 1, and 2 and varying values of . The choice of these values is consistent with the range of interest as shown in Fig. 2. The particles were randomly distributed in a cube of edge length L given by in units of ai.
The RMS force error is shown for the real-space (top row) and the Fourier-space (bottom row) for three values of (the columns). For different values of α, the computed RMS errors (dots) agree well with the estimates (curves) for the real-space part of the Ewald decomposition for (a) , (b) , and (c) , and for the Fourier-space part of the Ewald decomposition with B-splines of order p = 2–7 for (d) , (e) , and (f) . The computed RMS errors correspond to a system of unit charges placed at random positions in a cube.
The RMS force error is shown for the real-space (top row) and the Fourier-space (bottom row) for three values of (the columns). For different values of α, the computed RMS errors (dots) agree well with the estimates (curves) for the real-space part of the Ewald decomposition for (a) , (b) , and (c) , and for the Fourier-space part of the Ewald decomposition with B-splines of order p = 2–7 for (d) , (e) , and (f) . The computed RMS errors correspond to a system of unit charges placed at random positions in a cube.
In the Fourier-space part of the PPPM algorithm, the force calculation for a system of charged point particles with arbitrary spatial distribution is mapped to a real-space grid by assigning particle positions to the real-space grid points using B-splines of some order p. Calculations are then performed in Fourier-space starting with the FFT of the charge density. This is followed by computing the potential energy and forces on the Fourier-space grid following the steps described in Ref. 9. Forces on the Fourier-space grid are then transformed to real-space by an inverse FFT. Next, the forces are interpolated from the real-space grid to the actual particle positions using B-splines of the same order, in a manner similar to the earlier step of assigning particle positions to the real-space grid. FFT involves an inherent truncation in the maximum allowable length of Fourier-space vectors, which is one cause for error in the Fourier-space component of the forces. In addition, errors occur because of aliasing, which arises because calculations are being made on a grid, and because of the interpolation of particle positions to the real-space grid and of forces computed on the real-space grid to actual particle positions. Critically, the PPPM algorithm employs an optimal Green function6 that is derived by minimizing the error in the forces for a random distribution of particles. The optimal Green function can be interpreted as a weighted average of Fourier modes of the actual Green function.
For the version of the PPPM algorithm in which forces are computed on a grid,9 the optimal Green function corresponding to an arbitrary Green function is given by9
where n refers to the grid vector denoted by the triplet of grid indices (nx, ny, nz), is the actual Green function evaluated at the Fourier-space vector kn corresponding to grid vector n, m refers to the triplet of grid indices (mx, my, mz) that contribute to aliasing, and is the Fourier transform of the B-spline of order p. is given by
where Mx, My, and Mz refer to the number of grid points along the respective directions in Fourier-space. The triplet of grid sizes (hx, hy, hz) are then given by (Lx/Mx, Ly/My, Lz/Mz). The estimate of the optimal RMS error in the Fourier-space force is given by9
where
Figs. 3(d)–3(f) show very good agreement between the RMS error estimates for the Fourier-space force with order of B-splines ranging from 2 to 7 and the corresponding RMS error computed using the same system of unit charges that was employed for the real-space error analysis. Because the simulation volume is a cube, the numbers of grid points M along each direction in Fourier-space is equal.
Eq. (33) is not of a form that explicitly reveals the influence of the parameters h, α and p on the error incurred in the Fourier-space force calculation. Therefore, (33) requires further simplification, which is possible if the arbitrary Green function decays sufficiently rapidly in Fourier-space that the alias contributions can be neglected. Following the approach in Ref. 10, (33) is approximated to
where is given by
where denotes an integral given by
and are coefficients listed in Table I of Ref. 10 (see Appendix B for further detail about the simplification of (33)). For the Yukawa interaction, substituting results in a modified form for given by
where denotes an integral of the form
Finally, a simplified form of the RMS error estimate for the Fourier-space component of the force for the Yukawa interaction is given by
where
Fig. 4 shows a good agreement between and the full error estimate for = 0.1 and 1 for a system of 103 unit charges. For as decreases below unity, deviates from . Further, we found that for , is not a good approximation of for the values of interest. Nevertheless, the simplified form of is useful because it reveals that the error approximately varies as the product of the grid size and the Ewald splitting parameter () raised to the power given by the order of B-spline (p). Further, finding an optimal set of parameters requires considerable effort using (33), whereas using a simplified estimator can expedite the process of finding the optimal parameters. An alternative approach for estimating the errors is described in Ref. 54.
Comparison of approximate RMS error estimates (curves) and full RMS error estimates (dots) of the Fourier-space forces for (a) and (b) for a system of 103 unit charges. There is a good agreement between the simplified (approximated) error estimates and the full error estimates for . For ; the simplified estimates deviate from the full estimates as decreases below unity.
Comparison of approximate RMS error estimates (curves) and full RMS error estimates (dots) of the Fourier-space forces for (a) and (b) for a system of 103 unit charges. There is a good agreement between the simplified (approximated) error estimates and the full error estimates for . For ; the simplified estimates deviate from the full estimates as decreases below unity.
The total RMS error in the force computed using the PPPM algorithm is defined as
To compare the computational costs of the PPPM and LCL algorithms, the execution times for the two algorithms must be compared for the same RMS force errors. To this end, an estimate of the RMS force error for Yukawa interaction is needed. Substituting in (29), where , results in the following estimate of the RMS force error for Yukawa interaction:
This equation, in turn, implies that
(see Appendix B for further detail). As shown in Fig. 5, the RMS error estimate in (43) has been verified by comparison with the RMS error computed using 105 unit charges placed at random positions in a box.
RMS force errors versus the cutoff radius rc is shown. RMS force errors (dots) computed using 105 unit charges placed at random positions, with , show very good agreement with the corresponding error estimate (dashed curve) given by (43).
RMS force errors versus the cutoff radius rc is shown. RMS force errors (dots) computed using 105 unit charges placed at random positions, with , show very good agreement with the corresponding error estimate (dashed curve) given by (43).
Based on the error analysis for the Yukawa interaction, Fig. 6 shows that for and an RMS force error of 10−8 (), the minimum image convention is not satisfied below a system size of 107 unit charges. Therefore, for a value and particle numbers for which LCL would be less efficient, PPPM serves as an excellent alternative. As increasesfor approximately the same error of 10−8 (), the threshold above which the particle number satisfies the minimum image convention decreases; for example, for , the minimum image convention is satisfied beyond 105 unit charges, as shown in Fig. 6. Importantly, for some conditions where the LCL algorithm is applicable, we find the PPPM algorithm to be computationally advantageous. This observation is based on the comparison of the time per time step of PPPM and LCL algorithms for a fixed RMS force error.The timing results for a range of and N (with unit charges) are provided in Table I. For example, with 106 unit charges and an RMS force error of approximately 10−5 (), we find that the PPPM algorithm was approximately 25 and 130 times faster than the LCL algorithm for and 0.3, respectively (as shown in Table I). As approaches unity, we find the LCL and PPPM algorithms to be comparable in performance, as summarized by the entries in Table I for . As increases beyond unity, we find that the PPPM algorithm loses its computational advantage over the LCL algorithm, as can be seen in the entries in Table I for . We should point out, however, that execution times are architecture dependent and our conclusions are based on that fact. All calculations used a 3.5 GHz Intel Xeon(R) processor and 32 GB RAM.
Ratio of the cutoff radius to half the edge length of simulation cube for a fixed RMS force error over a range of particle numbers. For = 0.1, the ratios for an error of 10−8 and 10−6 are given by the red line and the red dashed line, respectively. For = 0.5, the ratios for an error of 10−8 and 10−6 are given by the blue line and the blue dashed line, respectively. Also shown is the light gray region corresponding to beyond the minimum image convention which implies that for = 0.1 and an error of 10−8 , LCL would be less efficient if the system has less than about 107 unit charges, while for = 0.5, LCL would be less efficient for a system with less than about 105 unit charges.
Ratio of the cutoff radius to half the edge length of simulation cube for a fixed RMS force error over a range of particle numbers. For = 0.1, the ratios for an error of 10−8 and 10−6 are given by the red line and the red dashed line, respectively. For = 0.5, the ratios for an error of 10−8 and 10−6 are given by the blue line and the blue dashed line, respectively. Also shown is the light gray region corresponding to beyond the minimum image convention which implies that for = 0.1 and an error of 10−8 , LCL would be less efficient if the system has less than about 107 unit charges, while for = 0.5, LCL would be less efficient for a system with less than about 105 unit charges.
Comparison of times per time step for force calculations using the PPPM and LCL algorithms for Yukawa interaction, for a range of and the number of unit charges (N). The entries correspond to an error of approximately 10−5 . All times are in seconds. is the Ewald splitting parameter, rc is the cutoff radius for the real-space calculation, M is the number of grid points along each direction in Fourier-space, and is the cutoff radius for LCL. For all Fourier-space calculations, B-spline of order p = 6 was found to be optimal. and are the times per time step of real-space and Fourier-space calculations, respectively. refers to the total time per time step for PPPM and is given by . is the time per time step for LCL.
. | N . | . | rc (ai) . | M . | (ai) . | (s) . | (s) . | (s) . | (s) . | . |
---|---|---|---|---|---|---|---|---|---|---|
0.3 | 1 × 105 | 0.625 | 5.2 | 128 | 35.48 | 2.61 | 1.92 | 4.53 | 324.2 | 71.56 |
1 × 106 | 0.579 | 5.6 | 256 | 35.62 | 25.65 | 26.81 | 52.46 | 7138.24 | 136 | |
0.5 | 1 × 105 | 0.614 | 5.3 | 128 | 22.24 | 1.97 | 1.36 | 3.33 | 133.6 | 40.1 |
1 × 106 | 0.569 | 5.7 | 256 | 22.33 | 24.79 | 23.16 | 47.95 | 1173.05 | 24.5 | |
1 | 1 × 105 | 0.61 | 5.33 | 128 | 12.08 | 1.89 | 1.35 | 3.24 | 11.7 | 3.6 |
1 × 106 | 0.57 | 5.8 | 256 | 12.34 | 26.1 | 21.2 | 47.3 | 119.9 | 2.53 | |
1.5 | 1 × 105 | 0.684 | 4.6 | 128 | 7.99 | 1.28 | 1.22 | 2.5 | 3.07 | 1.23 |
1 × 106 | 0.635 | 5.2 | 256 | 8.38 | 18.66 | 26.34 | 45 | 34.76 | 0.77 | |
2 | 1 × 105 | 0.684 | 4.5 | 128 | 6.4 | 1.2 | 2.17 | 3.37 | 1.83 | 0.54 |
1 × 106 | 0.683 | 4.7 | 256 | 6.47 | 13.2 | 22.8 | 36 | 16.3 | 0.45 |
. | N . | . | rc (ai) . | M . | (ai) . | (s) . | (s) . | (s) . | (s) . | . |
---|---|---|---|---|---|---|---|---|---|---|
0.3 | 1 × 105 | 0.625 | 5.2 | 128 | 35.48 | 2.61 | 1.92 | 4.53 | 324.2 | 71.56 |
1 × 106 | 0.579 | 5.6 | 256 | 35.62 | 25.65 | 26.81 | 52.46 | 7138.24 | 136 | |
0.5 | 1 × 105 | 0.614 | 5.3 | 128 | 22.24 | 1.97 | 1.36 | 3.33 | 133.6 | 40.1 |
1 × 106 | 0.569 | 5.7 | 256 | 22.33 | 24.79 | 23.16 | 47.95 | 1173.05 | 24.5 | |
1 | 1 × 105 | 0.61 | 5.33 | 128 | 12.08 | 1.89 | 1.35 | 3.24 | 11.7 | 3.6 |
1 × 106 | 0.57 | 5.8 | 256 | 12.34 | 26.1 | 21.2 | 47.3 | 119.9 | 2.53 | |
1.5 | 1 × 105 | 0.684 | 4.6 | 128 | 7.99 | 1.28 | 1.22 | 2.5 | 3.07 | 1.23 |
1 × 106 | 0.635 | 5.2 | 256 | 8.38 | 18.66 | 26.34 | 45 | 34.76 | 0.77 | |
2 | 1 × 105 | 0.684 | 4.5 | 128 | 6.4 | 1.2 | 2.17 | 3.37 | 1.83 | 0.54 |
1 × 106 | 0.683 | 4.7 | 256 | 6.47 | 13.2 | 22.8 | 36 | 16.3 | 0.45 |
V. APPLICATION: DYNAMIC STRUCTURE FACTOR
In this section, we apply our results to the computation of the dynamic structure factor . Our interest in falls into two categories. Theoretically, contains all of the many-body processes associated with thermal density fluctuations, including collective modes and transport.29,40–42 All of these processes are obviously impacted by the choice of , and we wish to use MD for model validation. The ionic is also connected directly with neutron scattering43 and, indirectly, to X-ray Thomson Scattering (XRTS).44 In the context of warm dense matter physics, for example, recent XRTS studies have developed a modified Navier-Stokes equation (MNSE) to model the ionic .29
Within the framework of the Yukawa model, we are interested in density and temperature conditions for which MD is required to validate approximate theoretical models and where LCL would be computationally less efficient than PPPM for force calculations. Consider the case and , for 104 unit charges the PPPM algorithm can have a force error of approximately 10−6 () for an optimal choice of , rc, h, and p. For the same error and particle number, LCL would be less efficient because the minimum-image convention is not satisfied. This case corresponds to an effective coupling of , which is of an order that is relevant to systems of recent interest, such as warm dense matter.44
A. Numerical computation of the dynamic structure factor from MD
The dynamic structure factor for an N-particle system is defined as
Here, the brackets refer to the stationary time average
where T is the length of the run. We note that for a system in equilibrium the stationary time average is equivalent to the ensemble average as . The Fourier-transformed densities n(k,t) are obtained from the definition of the density,
to yield
which, through the change of variables , can be written as
We use the usual definition of the temporal Fourier transform
For numerical purposes, the infinite domain must be approximated as finite, and as we are calculating stationary processes, we can take this domain to be [0, T] without loss of generality for sufficiently large T. This yields the approximate transform
Therefore, the final form for is given by
as = . The Fourier-transformed density is given by
Particle positions from MD are available only at certain times in [0, T]; hence, is computed using
where Nt is the number of steps after the equilibration phase of MD, and is the step size for time integration. Particle positions are stored at intervals corresponding to this step size. Long runs are preferred because the noise in decreases as T increases. The temporal Fourier transform is computed by FFT. computed from MD data tends to be noisy, and the extent of the noise increases as k increases. To determine the location of the peak of and its width, the noisy curves are usually smoothed by averaging over data from different MD runs that differ in their initial conditions. In Sec. V B, we present a potentially more efficient smoothing approach that employs kernel smoothing.49,50
B. Kernel smoothing
Kernel smoothing refers to weighted averaging of noisy observations to obtain a smooth function.49,50 To smooth our data using kernel smoothing, we use a kernel regression technique50 defined by
where y(xi) is the observation of y at xi, B is the number of observations, and is the smoothing kernel. This yields a weighted average to give a smooth function evaluated at . We use the Gaussian kernel
where is the kernel width. For and , Figs. 7 and 8 show the smooth dynamic structure factor curves (red curves) obtained by kernel smoothing of noisy dynamic structure factor curves obtained from MD simulations (grey curves) with σ = 0.01 and σ = 0.005, respectively. MD simulations of 103 unit charges were performed using the PPPM algorithm, with an RMS force error of approximately 10−4 (). The parameters used were =1, rc=3, M=64, and p = 2.
obtained from PPPM-MD for a Yukawa system with and is shown for a range of values of q. Each panel shows for one value of q, for q = kai = 0.39, 0.78, 1.17, 1.56, 1.95, 2.31, which are the first six multiples of , where L is the edge length of the simulation cube containing 103 unit charges. The grey curves are the noisy computed using the particle positions in the MD simulation. The red curves are obtained by kernel-smoothing the noisy with a Gaussian kernel of width . The blue band surrounding the smooth curves shows the standard deviation in the smooth with respect to kernel smoothing.
obtained from PPPM-MD for a Yukawa system with and is shown for a range of values of q. Each panel shows for one value of q, for q = kai = 0.39, 0.78, 1.17, 1.56, 1.95, 2.31, which are the first six multiples of , where L is the edge length of the simulation cube containing 103 unit charges. The grey curves are the noisy computed using the particle positions in the MD simulation. The red curves are obtained by kernel-smoothing the noisy with a Gaussian kernel of width . The blue band surrounding the smooth curves shows the standard deviation in the smooth with respect to kernel smoothing.
obtained from PPPM-MD for a Yukawa system with and is shown for a range of values of q. Each panel shows for one value of q, for q = kai = 0.39, 0.78, 1.17, 1.56, 1.95, 2.31, which are the first six multiples of , where L is the edge length of a simulation cube containing 103 unit charges. The grey curves are the noisy computed using the particle positions in the PPPM MD simulation. The red curves are obtained by kernel-smoothing the noisy with a Gaussian kernel of width . The blue band surrounding the smooth curves shows the standard deviation in the smooth with respect to kernel smoothing.
obtained from PPPM-MD for a Yukawa system with and is shown for a range of values of q. Each panel shows for one value of q, for q = kai = 0.39, 0.78, 1.17, 1.56, 1.95, 2.31, which are the first six multiples of , where L is the edge length of a simulation cube containing 103 unit charges. The grey curves are the noisy computed using the particle positions in the PPPM MD simulation. The red curves are obtained by kernel-smoothing the noisy with a Gaussian kernel of width . The blue band surrounding the smooth curves shows the standard deviation in the smooth with respect to kernel smoothing.
We have defined a simple way of quantifying the smoothing error as follows:
where is defined as
More rigorous ways of quantifying the error in smoothing can be found in Refs. 49 and 50. Figs. 7 and 8 show the error in smoothing (blue band) about the smooth curves (red curves). Because the kernel width influences the extent of smoothing and the corresponding error in the smoothing, the width must be chosen carefully such that the smoothed data are consistent with the physically expected result.
C. Comparison of the theoretical and MD dispersion relations
In this section, we compare dispersion relations obtained using PPPM-MD with those obtained using different theoretical models. For convenience, k and ω are expressed as dimensionless quantities q = kai and , where is the ion plasma frequency for ionic mass M and ionic number density ni.
One simple dispersion relation obtained from a static structure factor S(q)29 is given by
In the random-phase approximation (RPA) for a Yukawa system, S(q) takes the approximate form
More accurate theoretical forms of S(q) are discussed in Refs. 29 and 46. Fig. 9(a) shows the comparison of a dispersion relation obtained using PPPM-MD and dispersion relations obtained using different theoretical approximations. The purpose of this comparison is to show that the MD result agrees well with the theoretical dispersion relations in the low-q limit, where the theory is considered to work well.29 As q increases, the MD curve begins to deviate from the theoretical curves; this occurs because of the lack of required many-body effects in those theoretical models. A very accurate S(q) can be obtained from hypernetted chain (HNC) equations with a bridge function48 (denoted by SHNC(q)). Although particle correlations are captured in by SHNC(q) (solid blue curve), this model does not incorporate viscoelastic effects,46 and hence it underestimates compared to MD. Fig. 9(b) shows the full-width-half-maximum (FWHM) of a smooth constructed by kernel smoothing of obtained from MD data using a Gaussian kernel of widths 0.01 (blue dots) and 0.005 (green dots). A smaller width of 0.005 results in a curve that approaches zero (as expected from theory) more accurately than does a curve constructed using a width of 0.01.
Theoretical dispersion relations are compared with dispersion relation from dynamic structure factor of MD. In the left panel (a), dispersion relation from of MD smoothed with Gaussian kernels of widths (black dots) and (green dots). The green band corresponds to the full-width-half-maximum (FWHM) of smooth obtained using (the band for the other case with is similar to the band for , hence, is not shown). Also shown are obtained using Eq. (60) with S(q) from RPA (solid red), with (dashed red) and with full SHNC(q) (solid blue) where SHNC(q) refers to S(q) computed using the hypernetted chain (HNC) equations with a bridge function. In the right panel (b), full-width-half-maximum of smooth denoted by with (green dots) and (blue dots). Both (a) and (b) correspond to the MD results described in Figs. 7 and 8.
Theoretical dispersion relations are compared with dispersion relation from dynamic structure factor of MD. In the left panel (a), dispersion relation from of MD smoothed with Gaussian kernels of widths (black dots) and (green dots). The green band corresponds to the full-width-half-maximum (FWHM) of smooth obtained using (the band for the other case with is similar to the band for , hence, is not shown). Also shown are obtained using Eq. (60) with S(q) from RPA (solid red), with (dashed red) and with full SHNC(q) (solid blue) where SHNC(q) refers to S(q) computed using the hypernetted chain (HNC) equations with a bridge function. In the right panel (b), full-width-half-maximum of smooth denoted by with (green dots) and (blue dots). Both (a) and (b) correspond to the MD results described in Figs. 7 and 8.
More rigorous theoretical models for computing the dispersion relation are the quasilocalized charge approximation (QLCA),45 modified Navier-Stokes (MNSE), 29 andviscoelastic-dynamic density functional theory (VE-DDFT).46 Using QLCA, the dispersion relation takes the form
where is given by
The dispersion relation from the Navier-Stokes equation modified to incorporate low-frequency corrections results in the dispersion relation for MNSE is given by
where is the Einstein frequency, and is the dimensionless viscosity given by , where is the shear viscosity. Values of can be found in Ref. 47. VE-DDFT incorporates viscoelastic effects that are not incorporated in QLCA and MNSE formulations. The dispersion relation calculated using VE-DDFT is given by
where is given by
where is the adiabatic index, is the compressibility, is the correlation energy in units of temperature, and is the normalized viscosity given by , where is the bulk viscosity.
curves from MD were obtained by averaging over data from 20 different PPPM-MD simulations for and using 104 unit charges and an RMS force error of 10−6 (). The parameters used were = 0.46, rc = 7.8, M = 64, and p = 6. Each MD run was 800 long with a time step and frequency resolution . curves shown in Fig. 10(a) were obtained by smoothing the noisy curves from MD simulations using Gaussian kernels of width . Figs. 10(b) and 10(c) show the corresponding dispersion relations obtained using the smoothed curves and comparisons with the theoretical dispersion relations obtained for QLCA, MNSE and VE-DDFT, with S(q) given by SHNC(q). We can see that for values of q greater than approximately 0.3, the MD result increasingly deviates from the theoretical curves, while the VE-DDFT curve deviates from the MNSE and QLCA curves for q greater than approximately 0.4. Further, the QLCA and MNSE curves also deviate from each other for q greater than approximately 0.7. Hence, the differences between the dispersion relations for the theoretical models and their differences from MD results clearly demonstrate the need for model validation with accurate and computationally efficient MD simulations, which can be performed using the PPPM algorithm as discussed in this paper.
Dynamic structure factor and dispersion relation for and . In the left panel (a), for the first six integral multiples of by averaging over data from 20 different MD simulations using 104 unit charges in a cube and force calculation using PPPM corresponding to an RMS force error of 10−6 (). For this error, LCL would be less efficient since the minimum image convention is not satisfied. The 20 different MD simulations differed in their initial conditions for particle positions and velocities. Each MD run was 800 long with a time step and frequency resolution of . curves were obtained by smoothing from MD using Gaussian kernel smoothing with kernel width . In the right upper panel (b), dispersion relation from peaks of kernel smoothed (red dots), QLCA (blue dots), Murillo’s MNSE formulation (green dots), and VE-DDFT formulation (orange dots). In the right lower panel (c), for a wider range of q, we can see significant deviation of the theoretical dispersion relations from the MD dispersion relation for q greater than about 0.4. Lines connecting the dots in (b) and (c) are for guiding the eye.
Dynamic structure factor and dispersion relation for and . In the left panel (a), for the first six integral multiples of by averaging over data from 20 different MD simulations using 104 unit charges in a cube and force calculation using PPPM corresponding to an RMS force error of 10−6 (). For this error, LCL would be less efficient since the minimum image convention is not satisfied. The 20 different MD simulations differed in their initial conditions for particle positions and velocities. Each MD run was 800 long with a time step and frequency resolution of . curves were obtained by smoothing from MD using Gaussian kernel smoothing with kernel width . In the right upper panel (b), dispersion relation from peaks of kernel smoothed (red dots), QLCA (blue dots), Murillo’s MNSE formulation (green dots), and VE-DDFT formulation (orange dots). In the right lower panel (c), for a wider range of q, we can see significant deviation of the theoretical dispersion relations from the MD dispersion relation for q greater than about 0.4. Lines connecting the dots in (b) and (c) are for guiding the eye.
VI. CONCLUSIONS
We have generalized the Ewald decomposition to screened Coulomb interactions with arbitrary DRFs. The resulting effective interactions span from short to long range, depending on the physics contained in the DRF. This extension allows us to identify parameters for which the decomposition offers a computational advantage over efficient neighbor-list-only algorithms (e.g., LCL-only), thereby providing an operational definition of “medium range.”
We have demonstrated an elegant way of performing the Ewald decomposition in Fourier-space and applied the decomposition to two choices of the DRF, Yukawa and EGS interactions, that span a wide range of temperatures and densities of interest. However, this Ewald decomposition is quite general and can be applied to non-Coulomb interactions, such as those that employ electron-ion pseudopotentials.51
For the Yukawa interaction, we implemented a standard PPPM6,9 algorithm. We verified our implementation with an extensive analysis of force errors that are inherent to the PPPM algorithm. The analysis involved deriving, for a random distribution of particles, analytical error estimates that agreed very well with the computed error. The error estimates provide insight into the effects of truncation and discretization on the errors in the computed forces, and this information is needed when choosing optimal parameters for calculating forces efficiently. The error analysis was also extended to the plain Yukawa interaction, which allows for a cutoff radius because of its exponentially decaying form and, hence, can be implemented using the LCL algorithm. For the same force errors computed using the PPPM and LCL algorithms, we compared the time required for one step of a force calculation for a range of values and particle numbers.
We found that the PPPM algorithm offers a significant computational advantage over the LCL algorithm for a medium-range Yukawa potential, which corresponds to screening lengths exceeding the ion-sphere radius (). For screening lengths less than the ion-sphere radius (), the computational advantage of PPPM over LCL was found to diminish (see Table I). As screening lengths decreased further to values less than half of the ion-sphere radius (), the LCL algorithm became more advantageous than the PPPM algorithm.
We then applied our method to the computation of the dynamic structure factor for a Yukawa system. By varying the screening length and the system size, we found cases for which the PPPM algorithm is computationally advantageous over the LCL algorithm. One such case is and 104 unit charges, corresponding to an RMS force error of approximately 10−6 (), which precludes the use of the LCL algorithm because the minimum image convention is not satisfied. The computed dynamic structure factor tends to be noisy and, therefore, must be smoothed, which is usually accomplished by averaging over the results of MD runs that vary in their initial conditions. We have presented an alternative and potentially more efficient way of smoothing data using kernel smoothing. With Gaussian smoothing kernels, the dispersion relation obtained from the smoothed dynamic structure factor curves was compared with theoretical dispersion relations obtained using the QLCA, MNSE, and VE-DDFT models, as shown in Fig. 10. The differences between the dispersion relations obtained using MD and those obtained using theoretical models, as shown in Fig. 10, highlight the need for model validation with accurate and computationally efficient MD simulations, which are possible using the PPPM algorithm for a wide range of temperatures and densities of interest.
We note that a number of techniques, such as analytical differentiation,52 interlacing,53 oversampling,54 and others, could be used to design PPPM algorithms. The particular choice of the technique has consequences for the form of the optimal Green function, the errors, and the computational costs. Any of these techniques could be applied in a straightforward way to arbitrary dielectric response functions.
ACKNOWLEDGMENTS
We would like to thank John Verboncoeur of Michigan State University for his support and useful discussions. The work of Dharuman and Murillo was supported by the Air Force Office of Scientific Research (Grant No. FA9550-12-1-0344); Stanton and Glosli were supported under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory Contract No. DE-AC52-07NA27344.
APPENDIX A: EWALD DECOMPOSITION FOR YUKAWA AND EGS POTENTIALS
In this section, we provide the details of Ewald decomposition for Coulomb interactions screened with Yukawa and EGS DRFs.
In general, the Ewald decomposition of a Coulomb interaction linearly screened through an isotropic response takes the form
where . The long-range component can be evaluated in Fourier-space; however, the remaining short-range component must be inverted to real-space as
1. Yukawa dielectric function
We first consider the Yukawa dielectric function of the form
where is the magnitude of the inverse screening vector associated with the background charge distribution. Using the known result
and being the usual complimentary error function, we can evaluate the above expression as
Lastly, the charge fraction can be tuned to make this result as short range as possible. Noting that
the large-r behavior of (A7) is given by
Thus, is the optimal choice for the charge fraction, which results in the final form of the real-space interaction
2. EGS dielectric function
We next turn to the next-order gradient correction to the Yukawa interaction using the EGS dielectric function
where expressions for ν and further generalizations can be found in Ref. 34; however, the analysis is applicable to any dielectric function that can be expressed in this form. To simplify the problem, this dielectric function can be written in terms of partial fractions as
where we have introduced the coefficients and new inverse lengths
We have now reduced the calculation to evaluating two Yukawa-type dielectric functions to yield
Note that this result is generic even for the case in which , where the coefficients are complex. The large-r behavior for this interaction is given by
and there is no longer a choice in that eliminates the leading-order term. However, given that (for ), the optimal choice is .
3. Optimizing the charge fraction
In general, there will not be an analytic expression for the optimal in terms of and the physical parameters, and a numerical investigation will be necessary. An approximate expression can be obtained by noting that the large-r limit of will be dominated by the low-k behavior of the integrand. By temporarily inserting the approximate dielectric function
the resulting optimal choice of charge fraction becomes . For example, k0 = ks for the EGS dielectric function; this becomes increasingly valid for small ν, when the system is relatively hot and/or dense.
In the particular case of the EGS dielectric function, there is an alternative approach to accelerate the convergence of the real-space interaction. By introducing two screening clouds in the Ewald decomposition, the real- and Fourier-space interactions, respectively, become
The above analysis can then be repeated to obtain
which now has the limiting behavior
This leading-order term can hence be eliminated by solving the system of equations
to obtain the optimal charge fractions
Note that this approach results in two Ewald parameters to optimize, which could prove to be advantageous.
APPENDIX B: ERROR ANALYSIS
In this section, we provide details of the derivation of the RMS error estimate for forces computed using the PPPM algorithm. We begin with the analysis for the real-space portion of the algorithm. As introduced in Section IV, for a system of point charges with an arbitrary pair-wise short-range interaction, the estimate of the RMS force error is given by (29). For the real-space part of the Ewald decomposition for Yukawa interaction, (29) takes the form
where is given by
because of the radial nature of . To simplify the analysis, we make use of the symmetry in with respect to and express as a sum of two terms,
where
This implies that
where
For a sufficiently large distance (), the complementary error function can be approximated by the first term of the asymptotic expansion39 given by
Using this approximation in (B6) gives
For , the second and third terms on the right-hand side can be neglected compared to the first term, resulting in
which implies that . This, in turn, yields
Using the first term of the asymptotic expansion,39 the integral on the right-hand side is approximated as
resulting in the simplified expression for given by
We note that the approximation, which involves truncation of the asymptotic expansion that led to the above error estimate, is not valid for as . Hence, this error estimate will not tend to the error estimate for the plain Yukawa interaction that is derived below.
Similar error estimates can be derived for the plain Yukawa interaction because it decays exponentially. For the plain Yukawa interaction
we have
Using (29), the error estimate for the Yukawa interaction is given by
and the integral in this equation can be approximated using the first term of an asymptotic expansion39 to yield
For , we could further approximate (B17) to obtain
We now proceed to simplifying the estimate of the RMS error in the Fourier-space force computed using the PPPM algorithm. As introduced in Section IV, the RMS error estimate for the Fourier-space force is given by
where
If the arbitrary Green function (denoted by ) rapidly decays in Fourier-space such that alias contributions to the Green function can be neglected (m denotes the alias indices), then (B20) can be simplified further, beginning with the approximation given by
This implies that
which can be rewritten as
with the assumption that the maximum length of n (denoted by ) is sufficiently large such that for . For an isotropic system, following the derivation in Ref. 10, we find that
where the coefficients are listed in Table I of Ref. 10. Therefore, (B23) is approximated to a form given by
When the box dimensions are large (, for a cube of edge length L),
which implies that
If the Green function is symmetric, then the integral I can be reduced further to the following 1D integral:
where
The integral I can then be expressed as
where
Therefore, for an arbitrary Green function,
which yields the following approximated estimate of the RMS error for an arbitrary Green function:
The Green function for the Ewald decomposition for Yukawa interaction is given by
The integral for this case takes the form
which results in (38).
REFERENCES
A slightly more accurate fit for is discussed in Ref. 27.
The codes are written in high performance Python using the optimizing compiler Numba which compiles Python code to machine code giving similar performance to C and Fortran. More details about Numba can be found here: http://numba.pydata.org. In the future the code will be publicly available under the name Sarkas.