Long Ranged Electrostatic (coulombic) Potentials¶
DL_POLY_4 incorporates several techniques for dealing with long-ranged electrostatic potentials [1]. These are as follows:
Direct Coulomb sum
Force-shifted Coulomb sum
Coulomb sum with distance dependent dielectric
Reaction field
Smoothed Particle Mesh Ewald (SPME)
All of these can be used in conjunction with the shell model technique used to account for ions polarisation.
The SPME technique is restricted to periodic systems only. (Users must exercise care when using pseudo-periodic boundary conditions.) The other techniques can be used with either periodic or non-periodic systems safely, although in the case of the direct Coulomb sum there are likely to be problems with convergence.
DL_POLY_4 will correctly handle the electrostatics of both molecular and atomic species. However, it is assumed that the system is electrically neutral. A warning message is printed if the system is found to be charged, but otherwise the simulation proceeds as normal.
Note
DL_POLY_4 does not use the basic Ewald method, which is an option in , on account of it being too slow for large scale systems. The SPME method is the standard Ewald method in .
Default (Point Charges) Electrostatics¶
Direct Coulomb Sum¶
Use of the direct Coulomb sum is sometimes necessary for accurate simulation of isolated (non-periodic) systems. It is not recommended for periodic systems.
The interaction potential for two charged ions is
with \(q_{\ell}\) the charge on an atom labelled \(\ell\), and \(r_{ij}\) the magnitude of the separation vector \(\underline{r}_{ij}=\underline{r}_{j}-\underline{r}_{i}\) .
The force on an atom \(j\) derived from this force is
with the force on atom \(i\) the negative of this.
The contribution to the atomic virial is
which is simply the negative of the potential term.
The contribution to be added to the atomic stress tensor is
where \(\alpha,\beta\) are \(x,y,z\) components. The atomic stress tensor is symmetric.
In DL_POLY_4 these forces are handled by the subroutine coul_cp_forces.
Force-Shifted Coulomb Sum¶
This form of the Coulomb sum has the advantage that it drastically reduces the range of electrostatic interactions, without giving rise to a violent step in the potential energy at the cutoff. Its main use is for preliminary preparation of systems and it is not recommended for realistic models.
The form of the simple truncated and shifted potential function is
with \(q_{\ell}\) the charge on an atom labelled \(\ell\), \(r_{\rm cut}\) the cutoff radius and \(r_{ij}\) the magnitude of the separation vector \(\underline{r}_{ij}=\underline{r}_{j}-\underline{r}_{i}\) .
A further refinement of this approach is to truncate the \(1/r\) potential at \(r_{\rm cut}\) and add a linear term to the potential in order to make both the energy and the force zero at the cutoff. This removes the heating effects that arise from the discontinuity in the forces at the cutoff in the simple truncated and shifted potential (the formula above). (The physics of this potential, however, is little better. It is only recommended for very crude structure optimizations.)
The force-shifted potential is thus
with the force on an atom \(j\) given by
with the force on atom \(i\) the negative of this.
The force-shifted Coulomb potential can be elegantly extended to emulate long-range ordering by including distance depending damping function \({\rm erfc}(\alpha~r_{ij})\) (identical to that seen in the real-space portion of the Ewald sum) and thus mirror the effective charge screening 31 as shown below
with the force on an atom \(j\) given by
with the force on atom \(i\) the negative of this.
It is worth noting that, as discussed in 31 and references therein, this is only an approximation of the Ewald sum and its accuracy and effectiveness become better when the cutoff is large (\(>\) 10 preferably 12 Å).
The contribution to the atomic virial is
which is not the negative of the potential term in this case.
The contribution to be added to the atomic stress tensor is given by
where \(\alpha,\beta\) are \(x,y,z\) components. The atomic stress tensor is symmetric.
In DL_POLY_4 these forces are handled by the routine coul_fscp_forces.
Coulomb Sum with Distance Dependent Dielectric¶
This potential attempts to address the difficulties of applying the direct Coulomb sum, without the brutal truncation of the previous case. It hinges on the assumption that the electrostatic forces are effectively ‘screened’ in real systems - an effect which is approximated by introducing a dielectric term that increases with distance.
The interatomic potential for two charged ions is
with \(q_{\ell}\) the charge on an atom labelled \(\ell\), and \(r_{ij}\) the magnitude of the separation vector \(\underline{r}_{ij}=\underline{r}_{j}-\underline{r}_{i}\) . \(\epsilon(r)\) is the distance dependent dielectric function. In DL_POLY_4 it is assumed that this function has the form
where \(\epsilon\) is a constant. Inclusion of this term effectively accelerates the rate of convergence of the Coulomb sum.
The force on an atom \(j\) derived from this potential is
with the force on atom \(i\) the negative of this.
The contribution to the atomic virial is
which is \(-2\) times the potential term.
The contribution to be added to the atomic stress tensor is given by
where \(\alpha,\beta\) are \(x,y,z\) components. The atomic stress tensor is symmetric.
In DL_POLY_4 these forces are handled by the routine coul_dddp_forces.
Reaction Field¶
In the reaction field method it is assumed that any given molecule is surrounded by a spherical cavity of finite radius within which the electrostatic interactions are calculated explicitly. Outside the cavity the system is treated as a dielectric continuum. The occurrence of any net dipole within the cavity induces a polarisation in the dielectric, which in turn interacts with the given molecule. The model allows the replacement of the infinite Coulomb sum by a finite sum plus the reaction field.
The reaction field model coded into DL_POLY_4 is the implementation of Neumann based on charge-charge interactions 68. In this model, the total coulombic potential is given by
where the second term on the right is the reaction field correction to the explicit sum, with \(R_{c}\) the radius of the cavity. The constant \(B_{0}\) is defined as
with \(\epsilon_{1}\) the dielectric constant outside the cavity. The effective pair potential is therefore
This expression unfortunately leads to large fluctuations in the system coulombic energy, due to the large ‘step’ in the function at the cavity boundary. In DL_POLY_4 this is countered by subtracting the value of the potential at the cavity boundary from each pair contribution. The term subtracted is
The effective pair force on an atom \(j\) arising from another atom \(n\) within the cavity is given by
In DL_POLY_4 the reaction field is optionally extended to emulate long-range ordering in a force-shifted manner by countering the reaction term and using a distance depending damping function \({\rm erfc}(\alpha~r_{ij})\) (identical to that seen in the real-space portion of the Ewald sum) and thus mirror the effective charge screening 31:
with the force on an atom \(j\) given by
with the force on atom \(i\) the negative of this.
It is worth noting that, as discussed in 31 and references therein, this is only an approximation of the Ewald sum and its accuracy and effectiveness become better when the cutoff is large (\(>\) 10 preferably 12 Å).
The contribution of each effective pair interaction to the atomic virial is
and the contribution to the atomic stress tensor is
where \(\alpha,\beta\) are \(x,y,z\) components. The atomic stress tensor is symmetric.
In DL_POLY_4 the reaction field is handled by the subroutine
coul_rfp_forces.
Smoothed Particle Mesh Ewald¶
The Ewald sum 4 is the best technique for calculating electrostatic interactions in a periodic (or pseudo-periodic) system.
The basic model for a neutral periodic system is a system of charged point ions mutually interacting via the Coulomb potential. The Ewald method makes two amendments to this simple model. Firstly, each ion is effectively neutralised (at long-ranged) by the superposition of a spherical Gaussian cloud of opposite charge centred on the ion. The combined assembly of point ions and Gaussian charges becomes the Real Space part of the Ewald sum, which is now short ranged and treatable by the methods described above (Chapter Force Fields) [2]. The second modification is to superimpose a second set of Gaussian charges, this time with the same charges as the original point ions and again centred on the point ions (so nullifying the effect of the first set of Gaussians). The potential due to these Gaussian sum requires an additional correction, known as the self energy correction, which arises from a Gaussian acting on its own site, and is constant. Ewald’s method, therefore, replaces a potentially infinite sum in real space by two finite sums: one in real space and one in reciprocal space; and the self energy correction.
For molecular systems, as opposed to systems comprised simply of point ions, additional modifications are necessary to correct for the excluded (intra-molecular) coulombic interactions. In the real space sum these are simply omitted. In reciprocal space however, the effects of individual Gaussian charges cannot easily be extracted, and the correction is made in real space. It amounts to removing terms corresponding to the potential energy of an ion \(\ell\) due to the Gaussian charge on a neighbouring charge \(m\) (or vice versa). This correction appears in the term noting a summation over \(molecules\) in the full Ewald formula below.
The same considerations and modifications ewald_frzn_forces are taken into account for frozen atoms, which mutual coulombic interaction must also be excluded. This correction appears in the term noting a summation over \(F^{*}\) (all frozen-frozen pairs in the MD cell) in the full Ewald formula below.
Note the distinction between the error function erf and the more usual complementary error function erfc found in the real space sums below.
The total electrostatic energy is given by the following formula:
where \(N\) is the number of ions in the system and \(N^{*}\) the same number discounting any excluded (intramolecular and frozen) interactions. \(M^{*}\) represents the number of excluded atoms in a given molecule. \(F^{*}\) represents the number of frozen atoms in the MD cell. \(V_{o}\) is the simulation cell volume and \(\underline{k}\) is a reciprocal lattice vector defined by
where \(\ell,m,n\) are integers and \(\underline{u},\underline{v},\underline{w}\) are the reciprocal space basis vectors. Both \(V_{o}\) and \(\underline{u},\underline{v},\underline{w}\) are derived from the vectors (\(\underline{a},\underline{b},\underline{c}\)) defining the simulation cell. Thus
and
With these definitions, the Ewald formula above is applicable to general periodic systems. The last term in the Ewald formula above is the Fuchs correction 36 for electrically non-neutral MD cells which prevents the build-up of a charged background and the introduction of extra pressure due to it.
In practice the convergence of the Ewald sum is controlled by three variables: the real space cutoff \(r_{\rm cut}\); the convergence parameter \(\alpha\) and the largest reciprocal space vector \(\underline{k}_{max}\) used in the reciprocal space sum. These are discussed more fully in Section Choosing Ewald Sum Variables. DL_POLY_4 can provide estimates if requested (see CONTROL file description The CONTROL File).
As its name implies the Smoothed Particle Mesh Ewald (SPME) method is a modification of the standard Ewald method. DL_POLY_4 implements the SPME method of Essmann et al. 29. Formally, this method is capable of treating van der Waals forces also, but in DL_POLY_4 it is confined to electrostatic forces only. The main difference from the standard Ewald method is in its treatment of the reciprocal space terms. By means of an interpolation procedure involving (complex) B-splines, the sum in reciprocal space is represented on a three dimensional rectangular grid. In this form the Fast Fourier Transform (FFT) may be used to perform the primary mathematical operation, which is a 3D convolution. The efficiency of these procedures greatly reduces the cost of the reciprocal space sum when the range of \(\underline{k}\) vectors is large. The method (briefly) is as follows (for full details see 29):
Interpolation of the \(\exp(-i~\underline{k}\cdot\underline{r}_{j})\) terms (given here for one dimension):
\[\exp(2\pi i~u_{j} k/L) \approx b(k) \sum_{\ell=-\infty}^{\infty} M_{n}(u_{j}-\ell)~\exp(2\pi i~k\ell/K)~~,\]in which \(k\) is the integer index of the \(\underline{k}\) vector in a principal direction, \(K\) is the total number of grid points in the same direction and \(u_{j}\) is the fractional coordinate of ion \(j\) scaled by a factor \(K\) (i.e. \(u_{j}=K s_{j}^{x}\)) . Note that the definition of the B-splines implies a dependence on the integer \(K\), which limits the formally infinite sum over \(\ell\). The coefficients \(M_{n}(u)\) are B-splines of order \(n\) and the factor \(b(k)\) is a constant computable from the formula:
\[b(k) = \exp(2\pi i~(n-1)k/K) \left[ \sum_{\ell=0}^{n-2} M_{n}(\ell+1)~\exp(2\pi i~k\ell/K) \right]^{-1}~.\]Approximation of the structure factor \(S(\underline{k})\):
\[S(\underline{k}) \approx b_{1}(k_{1})~b_{2}(k_{2})~b_{3}(k_{3})~Q^{\dagger}(k_{1},k_{2},k_{3})~~,\]where \(Q^{\dagger}(k_{1},k_{2},k_{3})\) is the discrete Fourier transform of the charge array \(Q(\ell_{1},\ell_{2},\ell_{3})\) defined as
\[\begin{split}\begin{aligned} Q(\ell_{1},\ell_{2},\ell_{3})=& \sum_{j=1}^{N}q_{j} \sum_{n_{1},n_{2},n_{3}} M_{n}(u_{1j}-\ell_{1}-n_{1}L_{1})~\times~ M_{n}(u_{2j}-\ell_{2}-n_{2}L_{2}) \phantom{xxxx} \nonumber \\ & \phantom{xxxxxxxxxx}~\times~ M_{n}(u_{3j}-\ell_{3}-n_{3}L_{3})~~,\end{aligned}\end{split}\]in which the sums over \(n_{1,2,3}\) etc are required to capture contributions from all relevant periodic cell images (which in practice means the nearest images).
Approximating the reciprocal space energy \(U_{recip}\):
\[U_{recip} = \frac{1}{2V_{o} \epsilon_{0}\epsilon} \sum_{k_{1},k_{2},k_{3}} G^{\dagger}(k_{1},k_{2},k_{3})~Q(k_{1},k_{2},k_{3})~~,\]where \(G^{\dagger}\) is the discrete Fourier transform of the function
\[G(k_{1},k_{2},k_{3}) = \frac{\exp(-k^{2}/4\alpha^{2})}{k^{2}}~ B(k_{1},k_{2},k_{3})~(Q^{\dagger}(k_{1},k_{2},k_{3}))^{*}~~,\]in which \((Q^{\dagger}(k_{1},k_{2},k_{3}))^{*}\) is the complex conjugate of \(Q^{\dagger}(k_{1},k_{2},k_{3})\) and
\[B(k_{1},k_{2},k_{3}) = |b_{1}(k_{1})|^{2}~|b_{2}(k_{2})|^{2}~|b_{3}(k_{3})|^{2}~~.\]The function \(G(k_{1},k_{2},k_{3})\) is thus a relatively simple product of the Gaussian screening term appearing in the conventional Ewald sum, the function \(B(k_{1},k_{2},k_{3})\) and the discrete Fourier transform of \(Q(k_{1},k_{2},k_{3})\).
Calculating the atomic forces, which are given formally by:
\[f_{j}^{\alpha} = -\frac{\partial U_{recip}}{\partial r_{j}^{\alpha}} = -\frac{1}{V_{o} \epsilon_{0}\epsilon} \sum_{k_{1},k_{2},k_{3}} G^{\dagger}(k_{1},k_{2},k_{3}) ~\frac{\partial Q(k_{1},k_{2},k_{3})}{\partial r_{j}^{\alpha}}~~.\]
Fortunately, due to the recursive properties of the B-splines, these formulae are easily evaluated.
The virial and the stress tensor are calculated in the same manner as for the conventional Ewald sum.
The DL_POLY_4 subroutines required to calculate the SPME contributions are:
spme_container containing
bspgen, which calculates the B-splines
bspcoe, which calculates B-spline coefficients
spl_cexp, which calculates the FFT and B-spline complex exponentials
parallel_fft and gpfa_module (native DL_POLY_4 subroutines that respect the domain decomposition concept) which calculate the 3D complex fast Fourier transforms
ewald_spme_forces, which calculates the reciprocal space contributions (uncorrected)
ewald_real_forces, which calculates the real space contributions (corrected)
ewald_excl_forces, which calculates the reciprocal space corrections due to the coulombic exclusions in intramolecular interactions
ewald_frzn_forces, which calculates the reciprocal space corrections due to the exclusion interactions between frozen atoms
two_body_forces, in which all of the above subroutines are called sequentially and also the Fuchs correction 36 for electrically non-neutral MD cells is applied if needed.
Multipolar Electrostatics¶
DL_POLY_4 offers advanced potential energy calculations through multipolar electrostatics. This is an extension to the point-charge model where the charge density of chemical species are described by higher order point multipoles. The generic algorithms in DL_POLY_4 are designed to allow for arbitrary order 11 multipoles but for practical reasons the functionality is limited to hexadecapoles only.
Multipoles¶
Define the multipolar operator, \(\hat{L}_i\) as
where \(q_i\), \({\mathbf{p}}_i\), \({\mathbf{Q}}_i\), \({\mathbf{O}}_i\), and \({\mathbf{H}}_i\) are the point charge, dipole, quadrupole, octupole, and hexadecapole tensors, respectively of atom i, \(\nabla_i\) refers to the three-dimensional gradient with respect to the position of atom i and the “dot” products stand for tensor contraction. By defining a unidimensional vector of independent (non-degenerate) multipole moments, \(\mathcal{M}_i\), for atom i, the corresponding multipolar operator to an arbitrary order \(p\) can be written in a more compact form as
Here, \(\mathbf{s}= (s_1,s_2,s_3)\) is the triplet that runs over all independent multipoles, \(||\mathbf{s}||= s_1 + s_2 + s_3\), \(\mathcal{M}_{i}^{\mathbf{s}}=\mathcal{M}_{i}^{s_1 s_2 s_3}\) and \(\partial_{i}^{\mathbf{s}} = {\partial}_{z_i}^{s_3}{\partial}_{y_i}^{s_2}{\partial}_{x_i}^{s_1}\) is the multidimensional derivative with respect to the position \(\langle x_i, y_i, z_i \rangle\) of atom i with orders \(s_1\), \(s_2\) and \(s_3\) in the \(x\), \(y\) and \(z\) directions respectively. Individual components of \(\mathcal{M}\) contain the sum of all degenerate original multipole components. As an example, the octupole \(\mathcal{M}^{111}\), is a sum of all six degenerate original octupole components formed from the permutation of the triplet \(\{x,y,z\}\) . If the original octupole vector with degnerate components is labelled as \(O'\), then \(\mathcal{M}^{111}= O_{xyz}' + O_{xzy}' + O_{yxz}' + O_{yzx}' + O_{zxy}' + O_{zyx}' = 6~O_{xyz}'\) . For pair potentials it is often convenient to redefine the multipolar operator for atom j in terms of the derivatives with respect to the position of atom i to arrive at
Application to Pair Potentials¶
In DL_POLY_4 for \(N\) point-multipoles interacting via a pair potential function \(\psi\), the multipolar electrostatic potential at position \(\mathbf{r_i}\) is computed as
the electrostatic field at \(\mathbf{r_i}\) is
where \(\mathbf{e}_1=\langle1,0, 0\rangle\), \(\mathbf{e}_2=\langle0,1,0\rangle\), and \(\mathbf{e}_3=\langle0,0,1\rangle\) and the torque 86 on particle \(i\) in the \(\alpha\)-direction, \(\tau_{i,\alpha}\), is obtained as
where \(\mathcal{M}_{i,\alpha}\) is the infinitesimal counter-clockwise rotation of multipole vector \(\mathcal{M}_i\) about the \(\alpha\)-axis. The total electrostatic potential energy is given by
where \(\mathbf{s}+ \mathbf{k}= (s_1+k_1,s_2+k_2,s_3+k_3)\) and the force on atom \(i\) is
To implement equations (88)-(91) for the variety of potentials in DL_POLY_4 a number of recurrence relations are used to compute the multi-dimensional derivatives of the kernels corresponding to the potentials. These kernels are
with
The recurrence relations used in DL_POLY_4 are
and
Direct Coulomb Sum¶
For two interacting ions \(i\) and \(j\), the potential energy is given as
and the relevant kernel is \(\psi(r_{ij}) = \frac{1}{r_{ij}}\) . The derivatives for this kernel are obtained by using equation (92) with \(\nu = 1\) . Thus,
In DL_POLY_4 the multipolar direct Coulomb sum is handled by the routine
coul_cp_mforces.
Force-Shifted Coulomb Sum¶
DL_POLY_4 employs two forms of the force-shifted Coulomb sum. In the first form, the potential energy due to two interacting ions \(i\) and \(j\) is
where \(r_{\textrm{cut}}\) is the cutoff radius. The kernel is \(\psi(r_{ij}) = \frac{1}{r_{ij}}+\frac{r_{ij}}{r_{\textrm{cut}}^2}-\frac{2}{r_{\textrm{cut}}}\) . The last term, \(\frac{2}{r_{\textrm{cut}}}\), is a constant which has a zero derivative, hence the derivatives of the kernel are obtained as a sum of the derivatives of the first term and second terms. Thus,
The potential energy due to two point-multipoles \(i\) and \(j\) interacting via the second form of the force-shifted Coulomb sum is
The kernel, \(\psi(r_{ij})\) is the terms in the square bracket but the only terms which contribute to the derivatives are the first and second terms which are functions of \(r_{ij}\) . The derivative of the first term is obtained from equations (94) and the derivative for \(r_{ij}\) in the second term is given by \(d_{\mathbf{s}}(-1)\) . Thus,
In DL_POLY_4 the multipolar force-shifted Coulomb sum is handled by the
routine coul_fscp_mforces.
Coulomb Sum with Distance Dependent Dielectric¶
The potential energy between two interacting ions \(i\) and \(j\) is
and the kernel is \(\psi(r_{ij}) = \frac{1}{r_{ij}^2}\) . The derivatives for this kernel are obtained by using equation (92) with \(\nu = 2\) . Hence,
In DL_POLY_4 the multipolar Coulomb sum with distance dependent dielectric is handled by the routine coul_dddp_mforces.
Reaction Field¶
DL_POLY_4 provides two forms of a multipolar reaction field potential. In the first form, the effective pair potential energy due to two interacting point multipoles \(i\) and \(j\) is given as
where
\(R_c\) is the radius of the spherical cavity and \(\epsilon_1\) is the dielectric constant outside the cavity. Again the kernel \(\psi(r_{ij})\) is the terms in the square bracket and only the first and second terms contribute to its derivatives. The derivatives of the first and second terms are given by equation (92) with \(\nu = 1\) and \(\nu = -2\) respectively. Thus,
The second form of the reaction field method is similar to that of the force-shifted Coulomb sum. The potential energy due to interacting ions \(i\) and \(j\) is
The kernel, \(\psi(r_{ij})\) is the terms in the square bracket and the only terms which contribute to the derivatives are the first, second and last terms which are functions of \(r_{ij}\) . The derivative of the first term is obtained from equation (94) and the derivative for \(r_{ij}\) in the second term is given by \(a_{\mathbf{s}}(-1)\) and the derivative for \(r_{ij}^2\) in the last term is given by \(d_{\mathbf{s}}(-2)\) . Thus,
In DL_POLY_4 the multipolar reaction field is handled by the routine coul_rfp_mforces.
Smoothed Particle Mesh Ewald¶
DL_POLY_4 provides two different smooth particle Mesh Ewald implementations for multipolar electrostatics. The first implementation is for systems with charges, dipoles and quadrupoles and does not use recurrence relations. The second implementation, which uses recurrence relations, is more general and allows for specification of an arbitrary order up to hexadecapoles.
When the multipolar form of SPME is employed, the total electrostatic energy for a system on \(N\) point ions is given as
where
and
with
In the expressions above, \(M^*\) is the set of all excluded interactions due to intramolecular bonds in the simulation cell, \(F^*\) the set of frozen-frozen interactions in the simulation cell, \(N^* = N - M^* - F^*\), \(V_o\) is the volume of the simulation cell and \(S(\mathbf{k})\) is the structure factor.
Real Space Sum¶
The relevant kernel for the real space from equation (97) is \(\displaystyle \psi(r_{ij}) = \frac{\textrm{erfc}(\alpha |\mathbf{r_{ij}}+ \mathbf{n}|)}{|\mathbf{r_{ij}}+ \mathbf{n}|}\) . DL_POLY_4 uses the recurrence giving in equation (94) to generate the multidimensional derivatives of the kernel. Thus, the derivatives of the kernel are computed as
In DL_POLY_4 the routine ewald_real_mforces_d computes the real space interactions explicitly for simulations with multipoles of order 2 without using the recurrence relation. The routine ewald_real_mforces handles the general version of up to order 4 using recurrence relations.
Excluded Sum¶
The relevant kernel for the real space from equation (98) is \(\displaystyle \psi(r_{ij}) = \frac{\textrm{erf}(\alpha \cdot r_{ij})}{r_{ij}}\) . DL_POLY_4 uses the recurrence giving in equation (95) to generate the multidimensional derivatives of the kernel. Thus, the derivatives of the kernel are computed as
In DL_POLY_4 the routine ewald_excl_mforces_d computes the reciprocal space corrections due to the exclusions between intramolecularly related atoms explicitly for simulations with multipoles of order 2 without using the recurrence relation. The routine ewald_excl_mforces handles the general version of up to order 4 using recurrence relations.
Frozen Sum¶
The relevant kernel for the real space from equation (99) is \(\displaystyle \psi(r_{ij}) = \frac{\textrm{erf}(\alpha \cdot r_{ij})}{r_{ij}}\) . DL_POLY_4 uses the recurrence giving in equation (95) to generate the multidimensional derivatives of the kernel. Thus, the derivatives of the kernel are computed as
In DL_POLY_4 the routine ewald_frzn_mforces computes computes the reciprocal space corrections due to the exclusions between frozen atoms generically for simulations with multipoles up to order 4 using recurrence relations.
Self-Interaction¶
DL_POLY_4 computes \(U_{self}\) directly for interactions involving multipoles up to order 4 using the series representation of the kernel \(\displaystyle \psi(r_{ij}) = \frac{\textrm{erf}(\alpha \cdot r_i)}{r_i}\) . The self interaction is computed in ewald_real_mforces_d for simulations with multipoles of maximum order 2. For simulations of arbitrary order, the self-interaction is computed in the reciprocal space.
Reciprocal Space Sum¶
The key idea of SPME is in approximating the structure factor, in a uniform grid, with \(K_1 \times K_2 \times K_3\) dimensions, that fills the simulation cell. Define the fractional coordinates of an ion \(i\) as \(\langle s_{i_{1}}, s_{i_{2}}, s_{i_{3}} \rangle = \langle \mathbf{a}_1^*\cdot \mathbf{r_i}, \mathbf{a}_2^*\cdot \mathbf{r_i}, \mathbf{a}_3^*\cdot \mathbf{r_i}\rangle\), \(u_{\alpha_i} = K_{\alpha} \cdot s_i^{\alpha}\) and \(M_n\) is a B-spline of order \(n\) then the approximation of the structure factor is given as
where \(\mathbf{k}= \langle k_1, k_2, k_3 \rangle\) is a reciprocal space vector,
\(Q\) is the multipolar array defined on the uniform grid and \(Q^{\mathcal{F}}\) its discrete Fourier transform. At position \((l_1,l_2,l_3)\) on the grid, the multipolar array is defined by
where, \(u_{\alpha_i}-l_{\alpha}-n_{\alpha}K_{\alpha}\) are evaluation points of the B-spline on the grid that spans the fundamental cell and the periodic images. Then from equation (86) and considering only the fundamental cell, the multipolar array can be written explicitly as
To compute the arbitrary order multidimensional derivatives of the product of three b-splines in equation (105), DL_POLY_4 uses the closed form formula:
where \(\mathbf{a}_{1}^{*} = \langle a_{11}^{*},a_{12}^{*},a_{13}^{*}\rangle\), \(\mathbf{a}_{2}^{*} = \langle a_{21}^{*},a_{22}^{*},a_{23}^{*}\rangle\), and \(\mathbf{a}_{3}^{*} = \langle a_{31}^{*},a_{32}^{*},a_{33}^{*}\rangle\) are the reciprocal space basis vectors and \(K_1\), \(K_2\), and \(K_3\), the maximum number of grid points in the fundamental cell in the \(x\), \(y\), and \(z\) directions respectively. For an orthogonal box, where
DL_POLY_4 uses the simplification of equationv (106) to
The formulas in equations (106) and (107) require derivatives of a b-spline. To compute an arbitrary \(p_\textrm{th}\) order derivative of a b-spline of order \(n\), \(M_n\), at an arbitrary grid point \(j\), DL_POLY_4 uses the closed form formula
In DL_POLY_4 the stress tensor due to the reciprocal space, for an arbitrary \(p_\textrm{th}\) order multipolar electrostatic interaction is computed by the formula
where
and \(\textbf{ \ell}= (\ell_1,\ell_2,\ell_3)\) .
In DL_POLY_4 the routine ewald_spme_mforces_d computes the reciprocal space interactions explicitly for simulations with multipoles of maximum order 2. The routine ewald_spme_mforces handles the general version with multipoles up to order 4.
The DL_POLY_4 subroutines required to calculate the contributions from the reciprocal space, in addition to the routines used for the point charges, are: