Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Becker O.M., MacKerell A.D., Roux B., Watanabe M. (eds.) Computational biochemistry and biophysic.pdf
Скачиваний:
73
Добавлен:
15.08.2013
Размер:
5.59 Mб
Скачать

104 Darden

˜

 

 

 

 

 

 

exact and Fi the approximate atomic force at atom i. Another commonly used measure

˜

Fi|

2

2

)

1/2

. For

of accuracy is the root-mean-square force error, given by (∑i|Fi

 

/∑i|Fi|

 

systems of 104–105 atoms, which are typical for proteins in solvent, the RMS force error should be less than 0.1% to ensure that all atomic forces are accurate to within a few percent. Another measure of accuracy is the extent of energy conservation in molecular dynamics. Unfortunately, the multipole expansion algorithms are not particularly good at energy conservation [32]. The reason is that as atoms move during the simulation, some leave the subcell they are in and enter a new subcell. As they do, the multipole expansions for the new and old subcells are changed discontinuously. Furthermore, some interactions involving those atoms, which were calculated exactly, are now calculated approximately. Thus the energy and forces are not continuous functions of the particle positions, and atomic movement causes small discontinuous jumps in the energy, degrading energy conservation. If the multipole expansion were exact, the energy and forces would be continuous and energy would be conserved. The more accurate the approximation, the better the energy conservation. On this basis, Bishop et al. [32] recommend RMS force errors of 10 6. Furthermore, the expansions must be calculated frequently, e.g., every few femtoseconds, which further increases the expense.

IV. PERIODIC BOUNDARY CONDITIONS

Early simulations treated systems with only short-range interactions, e.g., liquid argon, using a Lennard-Jones potential to model exchange repulsion and dispersion interactions. System sizes were severely limited by the available computer power, and thus careful consideration was given to the choice of boundary conditions. The early simulations all employed periodic boundary conditions to minimize surface effects. Periodic boundary conditions are depicted in two dimensions in Figure 2. The system of atoms is contained in the central cell, which is then replicated infinitely in both dimensions, although only the neighboring replica cells are shown in the figure. In three dimensions the atoms of the simulation system are contained within a unit cell analogous to the unit cell familiar to X-ray crystallographers. For simplicity let us assume that the unit cell is a cube of side L, centered on the origin. However, note that all of the following discussion generalizes to arbitrary unit cells. This unit cell is then replicated infinitely in all directions, meaning that each atom i having position ri (xi, yi, zi) in the central cell has an infinite number of image atoms with positions ri nL (xi n1L, yi n2L, zi n3L) for all possible integer triples n (n1, n2, n3). Under periodic boundary conditions, the distance rij between atoms i and j is taken to be the minimum image distance, rij minn|rj nL ri |, i.e., the distance between atom i and the closest image of atom j.

If the interactions between atoms were short-ranged, such as Lennard-Jones interactions, the interactions could be restricted to neighboring pairs. For example, for the atom depicted as solid in the central cell in Figure 2, we could restrict consideration to the shaded atoms within the cutoff circle. However, as noted above we cannot truncate electrostatic interactions in this way. Historically a number of modified truncation approaches have been developed. Truncation based on charge groups was used because the potential due to a neutral group decays faster and abrupt atom-based truncation of the Coulomb interaction leads to instabilities when standard molecular dynamics schemes are used. Energy conservation is also poor under abrupt group-based truncation schemes. Steinbach and Brooks [33] showed that this was due to free rotation of polar groups just outside the

Long-Range Forces and Potential

105

Figure 2 Periodic boundary conditions in two dimensions. The central simulation cell is replicated infinitely in both directions.

cutoff distance, leading to discontinuous change in energy when the groups reentered the cutoff distance. A variety of shifting or switching functions that modify the Coulomb potential to smoothly truncate it have been proposed. An optimal atom-based force-shifted cutoff was proposed by Steinbach and Brooks [33]. This leads to stable dynamics, even for highly polar or charged systems. However, the relationship of these modified potentials to basic electrostatics is not clear. Furthermore, it was shown later by Feller et al. [34] that these methods lead to significant artifacts in some simulations. The reaction field methods [35] attempt to correct for interactions between an atom such as the solid atom in Figure 2 and atoms outside the cutoff by replacing the latter with a dielectric continuum. The atoms inside the cutoff induce a reaction field in the continuum that is added to the explicit Coulomb interactions between the central atoms and those within the cutoff. Although this method has been very successful for simulations of liquids, it is inappropriate for macro-molecules, because the atoms outside a typical cutoff include a mix of solute and solvent for which different dielectric constants are appropriate.

Ewald summation has been applied successfully for many years to liquid simulations [35] and is now becoming a standard for macromolecular simulations [36]. For this reason we focus on Ewald summation for the remainder of this section.

Under periodic boundary conditions, the electrostatic potential of a point r in the central cell, which does not coincide with any atomic position ri, i 1, . . . , N, is given by summing the direct Coulomb potential over all atoms and all their images:

106

 

 

Darden

N

 

φ(r)

qi

(19)

|ri nL r|

 

n i 1

 

where the outer sum is over all integer triples n (n1, n2, n3) and nL (n1L, n2L, n3L). This potential φ(r) is infinite if the central cell is not neutral, i.e., the sum of qi is not zero, and otherwise is an example of a conditionally convergent infinite series, as

discussed above, so a careful treatment is necessary. The potential depends on the order of summation, that is, the order in which partial sums over n are computed. For example, for positive integers K, define φK(r) as

N

 

φK(r)

qi

(20)

|ri nL r|

 

|n| K i 1

 

and consider the limit of φK(r) as K → ∞. This limiting process is depicted in Figure 3. For large K, φK(r) is the potential at a point r in the central cell of a spherical macroscopic crystal. DeLeeuw et al. [37] discuss the limit of this potential as well as the potential for more general macroscopic shapes. In addition they discuss the case where the macroscopic crystal is immersed in a dielectric continuum. As discussed in Section II, the crystal induces a reaction field in the continuum that in turn affects the potential at points r in the central cell. DeLeeuw et al. show that when the continuum has an infinite dielectric constant (conducting boundary conditions) the potential is independent of the macroscopic shape of the crystal and is equal to the well-known Ewald potential. Otherwise, the potential is given by the Ewald potential plus a term that depends on the dielectric constant of

Figure 3 Periodic boundary conditions realized as the limit of finite clusters of replicated simulation cells. The limit depends in general on the asymptotic shape of the clusters; here it is spherical. Cations are presented as shaded circles; anions as open circles.

Long-Range Forces and Potential

107

the continuum, the macroscopic shape of the crystal, and the dipole moment of the replicated unit cell. For some shapes, such as the spherical crystal depicted in Figure 3, they obtain a simple expression for this added term.

Although the work of DeLeeuw et al. is too complex to discuss further here, we can outline the derivation of the Ewald potential. The key is to imagine that each charge in the crystal is surrounded by a pair of continuous charge densities. One is a Gaussianshaped density centered at ri and having total charge qi and is called the counterion density. The other density, called the co-ion density, is also centered at ri and has identical shape but opposite charge to the counterion density. The potential at r due to qi must be equal to the potential due to qi together with the two canceling Gaussian densities. This is true for all atoms i and all their periodic images. We split the total potential φ(r) into the potential φ1(r) due to the density ρ1 given by the charges together with their counterion densities, depicted in Figure 4a, and the potential φ2(r) due to the density ρ2 given by the co-ion densities about the charges, depicted in Figure 4b. If we express Poisson’s equation, Eq. (10), in spherical polar coordinates, we can solve for the potential due to qi and its counterion density, obtaining qi erfc (β|ri r|)/|ri r|, where erfc ( ) is the complementary error function and β is a parameter characterizing the width of the Gaussian density. This potential is summed over all i and all n to obtain φ1(r).

To obtain the potential φ2(r), we note that φ2(r mL) φ2(r) for any integer triple m, because this is simply a shifted sum over images. Thus φ2(r) is a periodic function of r. Similarly, the source density ρ2, given by the sum of the co-ion densities over atoms

Figure 4 (a) Density ρ1, the sum of point charges represented by vertical lines, plus Gaussian counterion density. This gives rise to short-range direct sum potential. (b) Density ρ2, the Gaussian co-ion density. This gives rise to long-range reciprocal sum potential.

108

Darden

and their periodic images, is a periodic function. Thus we can expand φ2 and ρ2 as threedimensional Fourier series. The Fourier series expansion of a periodic function g on a cube of side L is given by

m

 

 

 

 

g(r) gˆ(m) exp 2πi

m r

(21)

L

 

where the sum is over all integer triples m and the Fourier coefficient (m) is given by

(m)

1

g(r) exp 2πi

m r

dr

(22)

L3

L

where the integral is over a cube of side L.

Now let g(r) be given by the Gaussian co-ion density at a charge qi, added to the co-ion density of all its periodic images. In this case the Fourier coefficient gˆ(m) can be obtained in closed form by a clever trick. In Eq. (22), the integral over the cube of the complex exponential times the infinite sum of shifted Gaussians can be reexpressed as a single infinite integral that is the Fourier transform of the original co-ion density. The Fourier transform of a Gaussian density can be obtained in closed form in terms of another Gaussian. This result is added to that for the co-ion densities about the other charges and all their images to get ρˆ 2(m).

The Laplacian operator , or 2, has a simple form in the Fourier domain:2g(m) 4π2m2gˆ(m). This can be seen by differentiating the Fourier expansion, Eq.

(21), and matching up coefficients. Thus, expanding φ2 and ρ2 in Fourier series, from Poisson’s equation, Eq. (10), we get 4π2m2φˆ 2(m) 4πρˆ 2(m), or φˆ2(m) ρˆ 2(m)/πm2,

for m2 0. We set φˆ 2(0, 0, 0) 0. This last choice requires that ρˆ 2(0, 0, 0) 0 (neutral unit cell) and involves the treatment of the limit process discussed by DeLeeuw at al. [37].

Putting these observations together, we can solve for the potential φ2, obtaining

 

1

 

 

exp[ π2 m2/β2

L2]

N

 

m

(r

ri)

 

 

 

 

 

φ2(r)

 

 

 

 

 

 

qi exp 2πi

 

 

 

 

 

π L

m2

 

 

 

 

L

 

 

 

 

m≠0

 

 

 

i 1

 

 

 

 

 

 

 

1

 

 

exp[ π2 m2/β2

L2]

 

m r

 

 

 

 

 

 

 

 

 

S(m) exp 2πi

 

 

 

 

(23)

π L

m2

 

 

 

L

 

 

 

 

m≠0

 

 

 

 

 

 

 

 

 

 

where the structure factor S(m) is the sum of qi exp( 2πm ri/L) over the N charges in the cube. For a fleshed-out version of this derivation of the Ewald potential, see Kittel [38].

Thus, for a point r in the central cell that does not coincide with any atomic position ri, i 1, . . . , N, the electrostatic potential φ(r) in Eq. (19) can be rewritten in the Ewald formulation as φ1(r) φ2(r). The electrostatic potential at atom i is the potential due to all other atoms j together with their images as well as all nontrivial periodic images of atom i itself. This is like the potential φ(r) except that the (infinite) potential due to i itself is missing. Thus the potential at i can be obtained by removing the potential qi/|ri r|

Long-Range Forces and Potential

109

from φ1(r) φ2(r) and then taking the limit as r ri. The result is the electrostatic potential φEw(ri) in the Ewald formulation and is given by

 

 

erfc(β|rj ri n|)

 

2β

 

 

 

φEw(ri) qj

qi

 

 

 

|rj ri n|

 

 

 

 

 

 

 

 

 

 

√π

 

 

 

n

 

j

 

 

 

 

 

 

 

 

 

1

 

exp[ π2 m2/β2L2]

S(m) exp 2πi

m ri

 

(24)

πL

m2

 

L

 

 

m≠0

 

 

 

 

 

 

 

 

 

 

 

where the prime over the first sum means that j i when n 0. The energy UEw of the central unit cell is obtained by summing (1/2)qiφEw(ri) over the atoms:

 

 

 

 

erfc(β|rj ri |)

 

 

 

 

 

 

UEw qiqj

 

 

 

 

 

 

|rj ri |

 

 

 

 

 

 

 

 

n

i

j

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

exp[ π2 m2/β2L2]

 

 

 

N

β

 

 

 

 

 

 

2

2

 

 

 

 

 

 

 

 

|S(m)|

 

qi

 

 

 

(25)

2πL

 

m2

 

 

 

 

 

 

√π

 

 

 

m≠0

 

 

 

 

 

 

i 1

 

where, as above, the prime over the first sum means that j i when n 0. The forces on atoms can be obtained by differentiating UEw with respect to their positions. In expression [25], the first term on the right-hand side is referred to as the direct sum, the second term as the reciprocal sum, and the third as the self-term.

Before discussing the computational cost of Ewald summation and the recent fast methods for calculating it, we discuss a variation on the above expressions, where the energy UEw is given in terms of the Ewald pair potential ψEw(r) together with the Wigner self-energy. At the same time we discuss the standard method for dealing with unit cells that have a net charge. Imagine that the unit cell contains a single unit charge at its center, the origin. Because the unit cell is not neutral, in addition to the Gaussian counterion and co-ion densities we add a uniform density over the cell, with total charge 1. These densities are then replicated along with the charge in all the image cells as above. To derive the potential in this case, we approximate the uniform density by gridding the cube with a K K K grid. At each grid point we place a charge of 1/K3. Because the unit cell is now neutral, the potential at a point r not at the origin and not on the grid is given by φ1(r) φ2(r). We obtain ψEw(r) for r not at the origin by passing to the limit as K → ∞. The result is

ψEw(r)

erfc(β|r n|)

 

 

 

 

 

 

 

|r n|

 

 

 

 

 

 

n

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

exp[ π2m2/β2L2]

 

m r

π

 

 

 

 

 

 

exp 2πi

 

 

 

 

πL

m2

L

L3β2

 

 

 

 

m≠0

 

 

 

 

 

 

 

 

The Wigner self-energy ζ is given by the limit of ψEw(r) 1/r as r 0:

ζ

erfc(β|n|)

 

1

 

 

exp[ π2m2/β2L2]

 

π

 

2β

 

 

 

 

 

 

 

 

 

|n|

πL

m2

L3β2

 

 

 

√π

n 0

 

 

 

 

m≠0

 

 

 

 

 

 

(26)

(27)

110

Darden

For cubes of size L, ζ 2.837297/L. Using the Ewald expression sometimes used for the energy of the unit cell,

 

 

qiqjψEw(ri rj) ζ2

N

UEw

1

qi2

2

 

 

ij

i 1

pair potential we get another

(28)

This expression agrees with the previous expression Eq. (25), for neutral unit cells. If the unit cell is not neutral, the energy expression in Eq. (25) should be modified by adding the term πQ/2L3β2 to the right-hand side, where Q is the total charge in the system. The energy expressions (25) and (28) will then agree.

The energy of the unit cell as well as the atomic forces obtained by differentiation are invariant to the choice of the parameter β. This parameter can then be chosen for computational convenience. For example, since erfc (βr)/r decays exponentially, β can be chosen so that erfc(βr)/r becomes negligible for r L/2, and the direct sum can be restricted to minimum image pairs. In this case the number of structure factors S(m) needed to converge the reciprocal sum does not grow with system size, and since each structure factor is an order N calculation, the reciprocal sum is also of order N. However, the computational cost of the direct sum will increase as N2, because all charge pairs are calculated. On the other hand, β can be chosen such that the direct sum can be truncated

˚

at a fixed cutoff, e.g., 10 A. In this case the direct sum becomes an order N calculation. Unfortunately, however, the number of structure factors needed to converge the reciprocal sum increases linearly with system size, making the reciprocal sum an order N2 calculation. An optimal choice of β with system size makes both the direct and reciprocal sums order N3/2 calculations [39].

Since the fast multipole algorithms (FMAs) outlined above are order N algorithms, extensions of them to periodic boundary conditions should be faster than Ewald summation for large systems. One interesting approach to a periodic FMA is that of Lambert et al. [40]. They numerically implement the limit process of DeLeeuw et al. [37] depicted in Figure 3. The unit cell is replicated a number of times to form a finite crystal. The FMA is applied to this crystal in such a way that the computational cost is only proportional to the size of the original cell. In this method the correction term of DeLeeuw et al. must be removed to arrive at the Ewald unit cell energy. Another approach to extending FMAs to periodic boundary conditions is that of Figuerido et al. [41]. They derive Ewald sums for the multipole expansion of the unit cell charges. This expression is then used to calculate the interactions due to nonadjacent cells in the infinite periodic array of unit cells. The rest of the fast multipole algorithm proceeds as before.

An entirely different approach to fast Ewald sums is based on the following observation. If the charges of the unit cell happened to be laid out on a regular K K K grid, then the structure factors S(m) for reciprocal vectors within the K K K array could be calculated very quickly using the fast Fourier transform (FFT) algorithm. In fact, in the case that β is chosen such that the direct sum can be truncated at a regular cutoff, the order N number of structure factors necessary to converge the reciprocal sum can be calculated in order N log N using the FFT, making the whole Ewald sum an order N log N calculation. The particle mesh approaches to Ewald summation are based on reducing the usual case of irregularly positioned charges to that of regularly gridded charges.

The original particle mesh (P3M) approach of Hockney and Eastwood [42] treats the reciprocal space problem from the standpoint of numerically solving the Poisson equation under periodic boundary conditions with the Gaussian co-ion densities as the source density ρ on the right-hand side of Eq. (10). Although a straightforward approach is to

Long-Range Forces and Potential

111

sample the Gaussians on the grid, this is too expensive. Grid densities are typically about

˚ ˚

1 A, and the Gaussian is significant over a sphere of radius equal to the cutoff, e.g. 9 A, so the number of grid points sampled is more than 1000 in this case, which is too expensive. They propose a narrower sampling density that is smooth and needs be sampled over only a much smaller number of grid points, together with a compensation factor in reciprocal space by which the original factor 1/m2 in the reciprocal Ewald sum is multiplied.

The particle mesh Ewald (PME) algorithm [43,44] instead approximates the structure factors S(m) by interpolating the complex exponentials appearing in Eq. (23). Thus exp(2πm ri/L) is rewritten as a linear combination of its values at nearby grid points, and so qi times the complex exponential is rewritten as a sum of weighting factors times qi times the complex exponential at the grid points. Thus, to approximate S(m), first grid the charges using the weighting factors and then apply the FFT. Note that implicitly we are assuming that the weighting factors are independent of m. In the original PME [43], which used a local Lagrangian interpolation, this was true. In the smooth PME [44], which uses B-spline interpolation, there is an additional constant λ(m) that multiplies the FFTbased structure factors. A later modification [45] uses least squares B-spline approximation, which slightly modifies the constant. In the smooth PME, reciprocal space forces are obtained by analytically differentiating the approximate reciprocal space energy, using the smoothness of the B-splines. Alternatively, one could compute the Ewald reciprocal sum forces by differentiating the energy equation, Eq. (23), and approximating the forces using the above interpolation. This force-interpolated PME is more accurate than the smooth PME and rigorously conserves momentum but is more expensive, requiring a total of four FFT evaluations compared to two for the smooth PME. A fuller description of the mechanics of the PME algorithm together with a review of applications is given by Darden et al. [36].

The issue of which approach to Ewald sums is most efficient for a given system size has been plagued by controversy. Probably the best comparison is that by Pollock and Glosli [46]. They implement optimized versions of Ewald summation, FMA and P3M. They conclude that for system sizes of any conceivable interest, the P3M algorithm is most efficient. Interestingly, they also show that P3M can be used to efficiently calculate energies and forces for finite boundary conditions, using a box containing the cluster and a clever filter function in reciprocal space. The particle-mesh-based algorithms are excellent at energy conservation, which is an additional advantage. On the other hand, the FMA may scale better in highly parallel implementations because of the high communication needs of the FFT. In addition, since the expensive part of the FMA is due to long-range interactions, the FMA may be more appropriate for multiple time step implementations [41]. The algorithms for P3M and the force-interpolated PME are essentially identical, differing only in the form of the modification to the reciprocal space weighting factors exp[ π2m2/β2L2]/m2. The sampling density for the P3M turns out to be a shifted B-spline, so the weighting factors are very similar. Thus for the same grid density and order of interpolation, the computational costs of the P3M and force-interpolated PME are the same. In the case that contributions to the Ewald sum from high frequency reciprocal vectors m outside the K K K array can be neglected, the expressions for P3M and force-interpolated PME become equivalent, and the accuracy and efficiency are thus equivalent [45]. Under all reasonable simulation parameters it was found that the errors due to neglect of high frequency reciprocal vectors were small compared to remaining errors, so the above two algorithms are equivalent for practical purposes. For typical simulation

˚

4

) the smooth PME is more efficient than

parameters (9 A cutoff, RMS force error 10

 

either P3M or force-interpolated PME, because its accuracy is only marginally less than

112

Darden

that of P3M and it requires fewer FFTs. However, for small cutoffs or higher accuracy the latter are more accurate and the smooth PME must compensate with higher order interpolation or denser grids, and it becomes less clear which is more efficient.

Regardless of which algorithm is used for fast calculation of Ewald sums, the computational cost is now competitive with the cost of cutoff calculations, and there is no longer a need to employ cutoffs for purposes of efficiency. Since Ewald summation is the natural expression of Coulomb’s law in periodic boundary conditions, it is the recommended approach if periodic boundary conditions are to be used in a simulation.

V.STRENGTHS AND WEAKNESSES OF VARIOUS APPROACHES

In this final section, we recapitulate the relationship between long-range electrostatics and boundary conditions while attempting to assess the strengths and weaknesses of the three choices we have outlined.

As noted above, the continuum methods are treated fully elsewhere in the book, so we restrict ourselves to a few comments. The main advantage of the continuum approach over the other choices is its greater efficiency. The effect of solvent on the electrostatic free energy of the solute, which is considerable, is calculated by a model theory rather than through explicit time averaging over the many degrees of freedom involved. The main disadvantage of continuum methods is that explicit atomic level interactions of interest between solute and solvent such as the ‘‘spine of hydration’’ of water molecules and/ or sodium ions in the minor groove of B-DNA [47] cannot be treated. For our purposes in this chapter, however, we are interested in the qualitative insights afforded by continuum methods, particularly with respect to long-range electrostatic effects.

The continuum treatment is widely believed to give the correct long-range behavior for electrostatic interactions in solution. For this reason it can be used as a guide to the discussion of long-range effects in explicit solvent simulations. Recently Poisson’s equation, Eq. (12), was used to estimate the effect of finite system size on solvation free energies calculated under periodic boundary conditions [48]. For example, in the finite difference approach to solving the Poisson equation (12), one could implement periodic boundary conditions in place of the usual estimate of the electrostatic potential at the boundary of the cell [49]. The difference between the continuum solvation free energy calculated using periodic boundary conditions and that calculated using the standard method will depend in general on the conformation of the solute. This conformational free energy difference, which will vanish in the limit of large cell size, can be used as an estimate of the system-size-dependent artifacts due to the use of periodic boundary conditions.

In principle, finite boundary conditions share much of the advantages of continuum models while adding explicit atomic level solvent–solute interactions. The amount of solvent used is typically smaller than in systems simulated under periodic boundary conditions, leading to greater efficiency. In addition, the long-range effects due to solvent can be modeled correctly using Poisson’s equation, whereas, as mentioned above, there are finite system size artifacts due to long-range electrostatics under periodic boundary conditions. On the other hand, there are artifacts in calculated free energies due to the presence of the vacuum/solvent boundary [9]. There is a cost to transport charge across this interface, called the surface potential of water. This potential is substantial in current water models, although it seems to be small in real water. For spherically symmetrical systems the surface potential is easy to calculate and free energies are easily adjusted. It is not