Abstract
In this chapter, we describe the acceleration and parallelization in classical molecular dynamics simulations. As electrostatic interactions are computationally intensive, the importance of the particle mesh Ewald (PME) method and the fast multipole method (FMM) will increase. These methods will be described here. In addition, general techniques for hierarchical parallelization on the latest general-purpose supercomputers (especially connected by a three-dimensional torus network), together with the critical importance of the data array structure, are explained. We show the optimization and benchmark results in the parallel environments of the molecular dynamics calculation programs, MODYLAS and GENESIS.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
W.D. Cornell, P. Cieplak, C.I. Bayly, I.R. Gould, K.M. Merz Jr., D.M. Ferguson, D.C. Spellmeyer, T. Fox, J.W. Caldwell, P.A. Kollman, J. Am. Chem. Soc. 117, 51795197 (1995)
A.D. MacKerell Jr., M. Feig, C.L. Brooks III, J. Comput. Chem. 25, 14001415 (2004)
W.L. Jorgensen, D.S. Maxwell, J. Tirado-Rives, J. Am. Chem. Soc. 118, 1122511236 (1996)
H.J.C. Berendsen, D. van der Spoel, R. van Drunen, Comput. Phys. Commun. 91, 43–56 (1995)
J.C. Phillips, R. Braun, W. Wang, J. Gumbart, E. Tajkhorshid, E. Villa, C. Chipot, R.D. Skeel, L. Kale, K. Schulten, J. Comput. Chem. 26, 1781–1802 (2005)
S. Plimpton, J. Comput. Phys. 117, 1–19 (1995)
Y. Andoh et al., J. Chem. Theory Comput. 9, 3201 (2013)
J. Jung, T. Mori, C. Kobayashi, Y. Matsunaga, T. Yoda, M. Feig, Y. Sugita, WIREs Comput. Mol. Sci. 5, 310 (2015)
D. Frenkel, B. Smit, Understanding Molecular Simulation (Academic Press, San Diego, 1996)
M.E. Tuckerman, Statistical Mechanics: Theory and Molecular Simulation (Oxford University Press, New York, 2010)
M.P. Allen, D.J. Tildesley, Computer Simulation of Liquids (Oxford University Press, 1989)
J. Wong-ekkabut, M. Karttunen, Biochim. Biophys. Acta 1858, 2529 (2016)
T. Darden, D. York, L. Pedersen, J. Chem. Phys. 98, 10089 (1993)
U. Essmann, L. Perera, M.L. Berkowitz, T. Darden, H. Lee, L.G. Pedersen, J. Chem. Phys. 103, 8577 (1995)
L. Greengard, V. Rokhlin, J. Comput. Phys. 73, 325 (1987)
D.J. Hardy, Z. Wu, J.C. Phillips, J.E. Stone, R.D. Skeel, K. Schulten, J. Chem. Theory Comput. 11, 766 (2015)
J.J. Biesiadecki, R.D. Skeel, J. Comput. Phys. 109, 318–328 (1993)
P. Minary, M.E. Tuckerman, G.J. Martyna, Phys. Rev. Lett. 93, 150201 (2004)
J.P. Ryckaert, G. Ciccotti, H.J.C. Berendsen, J. Comput. Phys. 23, 327341 (1977)
P. Gonnet, J. Comput. Phys. 220, 740 (2007)
H.C. Andersen, J. Comput. Phys. 52, 2434 (1983)
B. Hess, H. Bekker, H.J.C. Berendsen, J.G.E.M. Fraaije, J. Comput. Chem. 18, 14631472 (1997)
S. Miyamoto, P.A. Kollman, J. Comput. Chem. 13, 952962 (1992)
H. Okumura, S.G. Itoh, Y. Okamoto, J. Chem. Phys. 126, 084103 (2007)
K.J. Bowers et al., in ACM/IEEE Conference on Supercomputing (SC06) (IEEE, Tampa, Florida, 2006)
K.J. Bowers, R.O. Dror, D.E. Shaw, J. Chem. Phys. 124, 184109 (2006)
B.G. Fitch, A. Rayshubskiy, M. Eleftheriou, T.J.C. Ward, M. Giampapa, M.C. Pitman, J. Pitera, W.C. Swope, R.S. Germain, Comput. Model. Membr. Bilayers 60, 159 (2008)
J. Jung, C. Kobayashi, T. Imamura, Y. Sugita, Comput. Phys. Commun. 200, 57 (2016)
A.P. Hynninen, M.F. Crowley, J. Comput. Chem. 35, 406 (2014)
B. Hess, C. Kutzner, D. van der Spoel, E. Lindahl, J. Chem. Theory Comput. 4, 435 (2008)
T. Narumi et al., in Proceedings of the 2006 ACM/IEEE Conference on Supercomputing (ACM, 2006), p. 49
D.E. Shaw et al., in 34th Annual International Symposium on Computer Architecture (ISCA ’07) (ACM, 2007), p. 910
D.E. Shaw et al., in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (IEEE Press, 2014), p. 41
R. Salomon-Ferrer, A.W. Gotz, D. Poole, S. Le Grand, R.C. Walker, J. Chem. Theory Comput. 9, 3878 (2013)
M.J. Harvey, G. Giupponi, G. De Fabritiis, J. Chem. Theory Comput. 5, 1632 (2009)
P. Eastman et al., J. Chem. Theory Comput. 9, 461 (2013)
A.P. Ruymgaart, A.E. Cardenas, R. Elber, J. Chem. Theory Comput. 7, 3072 (2011)
J.C. Phillips, Y. Sun, N. Jain, E.J. Bohm, L.V. Kal, in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (IEEE Press, 2014), p. 81
M.J. Abraham, T. Murtola, R. Schulz, S. Pali, J.C. Smith, B. Hess, E. Lindahl, Softw. X 1–2, 19 (2015)
Jung et al., J. Chem. Theory Comput. 12, 4947 (2016)
W.J. Harrod, A journey to exascale computing, in The International Conference for High Performance Computing, Networking, Storage and Analysis, SC12 (2012), https://science.energy.gov/~/media/ascr/ascac/pdf/reports/2013/SC12_Harrod.pdf
https://software.intel.com/en-us/articles/explicit-vector-programming-in-fortran
https://software.intel.com/sites/landingpage/IntrinsicsGuide/
Y. Andoh, S. Suzuki, S. Ohshima, T. Sakashita, M. Ogino, T. Katagiri, N. Yoshii, S. Okazaki, J. Supercomput. 74, 2449 (2018)
J. Jung, T. Mori, Y. Sugita, J. Comput. Chem. 34, 2412 (2013)
T. Amisaki, J. Comput. Chem. 21, 10751087 (2000)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix: FMM
Appendix: FMM
The principle of the fast multipole method (FMM) is briefly explained in this Appendix. See Ref. [15] for exact mathematical treatment of the transformation of multipole moment and local expansion coefficients, such as M2M, M2L, and L2L.
5.1.1 Fundamentals of Multipole Expansion
As shown in Fig. 5.15, the atom i of the charge \(q_i\) in a certain area forms the potential at a distant point Q. The reciprocal \(1/r_i\) of the distance between two points is calculated using the distance \(\Delta { r_i}\) from the origin O to the atom i in the region, the distance r from the origin O to the point Q, and the angle \(\gamma _i\) formed by the points \(\Delta {r_i}\) and r with the point O. This can be expressed as
from the cosine theorem. When this equation is rewritten by Taylor expansion, it becomes
where \(P_n(\cos \gamma _i)\) is a Legendre polynomial. This Eq. (5.15) is called multipole expansion. \(P_n(\cos \gamma _i)\) is written as
using the spherical harmonics, \(Y_n^m(\theta ,\phi )\) for spherical coordinates \((\Delta r_i, \theta _i,\phi _i)\) and \((r, \theta , \phi )\) of the two vectors \(\Delta r_i\) and r. In Eq. (5.16), the coordinate variables of atom i and point Q are completely separated into two factors. Therefore, the sum with respect to the charges in a region can be represented independently of the position of the point Q. The sum
is the multipole moment formed by the charge in the region. The electrostatic field formed by all charges in the region can be expressed as
5.1.2 Division of Unit Cells
In FMM, unit cells are divided into small spaces (subcells). As described in the next section, the interaction calculation is performed using these subcells. There are several ways to divide unit cells into subcells; however, an octree structure is commonly used, in which each side of the unit cell is divided into two equal parts and the whole is divided into eight subcells (Fig. 5.16). This division is repeated until the subcell reaches the desired size of small subcells, i.e., level 0 for the unit cell and level 1 after dividing once. The number of subcells of level n is \(8^n\). In practical use, tens of atoms are assigned to the smallest subcell. This smallest subcell is a unit of regional division. We assign subcells to compute nodes and cores to perform parallel calculations.
5.1.3 Interaction Calculation by FMM
We assume that the unit cell is divided to level 4, as shown in Fig. 5.17. We now calculate the potential of an atom in region A. First, we evaluate the electrostatic interaction directly up to the second nearest neighbor (B) of region A of level 4. For subcells beyond region B, the interaction calculation is performed using multipole moments.
Region C is within the second nearest neighbor of the subcell of level 3, but excluding region B. The interaction calculation with region C is performed using the multipole moment of level 4. Region D is within the second nearest neighbor of the subcell of level 2, but excluding region C. The interaction calculation with region B is performed using the multipole moment of level 3. Hereinafter, regions E and F are determined in the same manner. Subcells beyond region F (image cell of third or further nearest neighbor of the unit cell) are treated as those of level 0. Thus, the interactions can be calculated for each region without excess or deficiency. By using small subcells for interactions with neighboring regions and large subcells for interactions with distant regions, it is possible to efficiently perform interaction calculations without decreasing accuracy.
5.1.4 Multipole Expansion and Local Expansion
The procedure for determining the potential acting on the i atom in region A is shown (Fig. 5.18). First, the contributions from regions A and B is obtained by direct calculation. This procedure is called particle to particle (P2P) in FMM. For region C, the multipole moment is calculated in level 4 subcells according to Eq. (5.17). This operation is called particle to multipole (P2M). Next, the center of the multipole moment is moved to the center of subcell A. The expression obtained by this transformation is the form of Taylor expansion at the center of subcell A, which is called local expansion. This shift operation of the expansion center is called multipole to local (M2L) . By using the local expansion coefficient and the relative position from the center subcell of atom i, its potential, force, and virial can be calculated, which is called local to particle (L2P). For the further subcell D, the multipole moment of the level 4 subcell is obtained by P2M similarly to C. The expansion center of the multipole moment is shifted to the center position of the level 3 subcell (i.e., multipole to multipole (M2M)). Similarly, with respect to the other seven subcells, the center of expansion is shifted by M2M. The obtained multipole moments are summed to obtain a multipole moment of level 3, which is transformed to the local expansion coefficient of the level 3 subcell, including subcell A, by M2L operation. The local expansion coefficient is shifted to the center of the subcell of level A (i.e., local to local (L2L)). The contributions from the previously obtained subcell C and the subcells D are summed and then the interaction is evaluated by L2P. The contribution from image cells more distant than region F in Fig. 5.17 can be included by applying Ewald’s method to the multipole moment of image cells [46].
5.1.5 Accuracy of FMM
FMM is a strictly formulated analytical method that includes error evaluation. The error depends on the expansion order of the multipole moment; i.e., as the order increases, the calculation accuracy monotonically increases. Table 5.1 shows the benchmark results of potential and force in a system consisting of 10,125,000 atoms using MODYLAS software. The accuracy of FMM was evaluated by comparison with the result of the PME method with parameters giving a sufficiently high accuracy. The values obtained at the 4th to 8th expansion order coincide with the exact value in the range of 4–9 digits. There is also an accuracy of 4–7 digits for force; i.e., enough accuracy can be obtained for MD calculations even in expansions up to the 4thorder.
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this chapter
Cite this chapter
Andoh, Y., Yoshii, N., Jung, J., Sugita, Y. (2019). Acceleration of Classical Molecular Dynamics Simulations. In: Geshi, M. (eds) The Art of High Performance Computing for Computational Science, Vol. 2. Springer, Singapore. https://doi.org/10.1007/978-981-13-9802-5_5
Download citation
DOI: https://doi.org/10.1007/978-981-13-9802-5_5
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-9801-8
Online ISBN: 978-981-13-9802-5
eBook Packages: Computer ScienceComputer Science (R0)