Abstract
In the molecular dynamics simulation, an important step is the establishment of neighbor list for each particle, which involves the distance calculation for each particle pair in the simulation space. However, the distance calculation will cause costly floating-point operations. In this paper, we propose a novel algorithm, called Fast Neighbor List, which establishes the neighbor lists mainly using the bitwise operations. Firstly, we design a data layout, which uses an integer value to represent the three-dimensional coordinates of a particle. Then, a bunch of bitwise operations and two subtraction operations are used to judge whether the distance between a pair of particles is within the cutoff radius. We demonstrate that our algorithm can deal with the periodic boundary seamlessly. We also use single instruction multiple data (SIMD) instructions to further improve the performance. We implement our algorithm on Intel Xeon E5-2670, ARM v8, and Sunway many-core processors, respectively. Compared with the traditional method, our algorithm achieves on average 1.79x speedup on Intel Xeon E5-2670 processor, 3.43x speedup on ARM v8 processor, and 4.03x speedup on Sunway many-core processor. After using SIMD instructions, our algorithm achieves on average 2.64x speedup and 14.43x speedup on Intel Xeon E5-2670 and ARM v8 processors, respectively.










Similar content being viewed by others
Change history
26 July 2019
The first main paragraph of the paper contains errors. The correct wording is given below.
References
Abraham MJ, Murtola T, Schulz R, Páll S, Smith JC, Hess B, Lindahl E (2015) Gromacs: high performance molecular simulations through multi-level parallelism from laptops to supercomputers. SoftwareX 1:19–25
Allen MP, Tildesley DJ (2017) Computer simulation of liquids. Oxford University Press, Oxford
Allen MP et al (2004) Introduction to molecular dynamics simulation. Comput Soft Matter Synth Polym proteins 23:1–28
Andersen HC (1983) Rattle: a velocity version of the shake algorithm for molecular dynamics calculations. J Comput Phys 52(1):24–34
Anderson JA, Glotzer SC (2013) The development and expansion of hoomd-blue through six years of gpu proliferation. arXiv:1308.5587
Anderson JA, Lorenz CD, Travesset A (2008) General purpose molecular dynamics simulations fully implemented on graphics processing units. J Comput Phys 227(10):5342–5359
ARM (2015) ARM Cortex-A Series: Programmer’s Guide for ARMv8-A
ARM (2017) ARM architecture reference manual. ARMv8, for ARMv8-A architecture profile
Blumenthal LM (1970) Theory and applications of distance geometry. Chelsea, New York
Brown WM, Wang P, Plimpton SJ, Tharrington AN (2011) Implementing molecular dynamics on hybrid high performance computers-short range forces. Comput Phys Commun 182(4):898–911. https://doi.org/10.1016/j.cpc.2010.12.021
Dagum L, Menon R (1998) OpenMP: an industry standard API for shared-memory programming. IEEE Comput Sci Eng 5(1):46–55
Flur S, Gray KE, Pulte C, Sarkar S, Sezgin A, Maranget L, Deacon W, Sewell P (2016) Modelling the ARMv8 architecture, operationally: concurrency and ISA. In: ACM SIGPLAN notices, vol 51. ACM, pp 608–621
Fog A (2008) Optimizing subroutines in assembly language: an optimization guide for x86 platforms. Copenhagen University College of Engineering
Frenkel D, Smit B (2001) Understanding molecular simulation: from algorithms to applications, vol 1. Elsevier, London
Fu H, Liao J, Yang J, Wang L, Song Z, Huang X, Yang C, Xue W, Liu F, Qiao F et al (2016) The sunway taihulight supercomputer: system and applications. Sci China Inf Sci 59(7):072001
Glaser J, Nguyen TD, Anderson JA, Lui P, Spiga F, Millan JA, Morse DC, Glotzer SC (2015) Strong scaling of general-purpose molecular dynamics simulations on gpus. Comput Phys Commun 192:97–107
Hockney RW, Eastwood JW (1988) Computer simulation using particles. CRC Press, London
Intel (2018) Intel® 64 and IA-32 architectures software developers manual. Volume 3B: System programming Guide, Part 2
Jiang W, Hardy DJ, Phillips JC, MacKerell AD Jr, Schulten K, Roux B (2010) High-performance scalable molecular dynamics simulations of a polarizable force field based on classical drude oscillators in namd. J Phys Chem Lett 2(2):87–92
Liu W, Schmidt B, Voss G, Müller-Wittig W (2007) Molecular dynamics simulations on commodity GPUs with CUDA. In: International Conference on High-Performance Computing. Springer, pp 185–196
Mattson W, Rice BM (1999) Near-neighbor calculations using a modified cell-linked list method. Comput Phys Commun 119(2–3):135–148
Niethammer C, Becker S, Bernreuther M, Buchholz M, Eckhardt W, Heinecke A, Werth S, Bungartz HJ, Glass CW, Hasse H et al (2014) ls1 mardyn: the massively parallel molecular dynamics code for large systems. J Chem Theory Computation 10(10):4455–4464
Plimpton S (1995) Fast parallel algorithms for short-range molecular dynamics. J Comput Phys 117(1):1–19. https://doi.org/10.1006/jcph.1995.1039
Plimpton S, Crozier P, Thompson A (2007) LAMMPS-large-scale atomic/molecular massively parallel simulator. Sandia Natl Lab 18:43–43
Potter D (1973) Computational physics. Wiley
Pronk S, Páll S, Schulz R, Larsson P, Bjelkmar P, Apostolov R, Shirts MR, Smith JC, Kasson PM, Van Der Spoel D et al (2013) Gromacs 4.5: a high-throughput and highly parallel open source molecular simulation toolkit. Bioinformatics 29(7):845–854
Rapaport DC, Rapaport DCR (2004) The art of molecular dynamics simulation. Cambridge University Press, Cambridge
Stone JE, Phillips JC, Freddolino PL, Hardy DJ, Trabuco LG, Schulten K (2007) Accelerating molecular modeling applications with graphics processors. J Comput Chem 28(16):2618–2640
Tang YH, Karniadakis GE (2014) Accelerating dissipative particle dynamics simulations on gpus: algorithms, numerics and applications. Comput Phys Commun 185(11):2809–2822. https://doi.org/10.1016/j.cpc.2014.06.015
Trott CR (2011) Lammpscuda—a new gpu accelerated molecular dynamics simulations package and its application to ion-conducting glasses. Ph.d. thesis, Universitätsbibliothek Ilmenau
Tuckerman M, Berne BJ, Martyna GJ (1992) Reversible multiple time scale molecular dynamics. J Chem Phys 97(3):1990–2001
Verlet L (1967) Computer “experiments” on classical fluids. I. Thermodynamical properties of Lennard–Jones molecules. Phys Rev 159(1):98
Wang X, Xue W, Liu W, Wu L (2018) swSpTRSV: a fast sparse triangular solve with sparse level tile layout on sunway architectures. In: Proceedings of the 23rd ACM SIGPLAN symposium on principles and practice of parallel programming. ACM, pp 338–353
Xing HJ, Khan MKR, Alnatsheh RH, Chirala RC, Bhattacharjee S (2012) Method and apparatus for neighbor list updates. US Patent 8,144,662
Yao Z, Wang JS, Liu GR, Cheng M (2004) Improved neighbor list algorithm in molecular simulations using cell decomposition and data sorting method. Comput Phys Commun 161(1–2):27–35
Acknowledgements
This work was supported by National Natural Science Foundation of China under Grant Nos. 61502450 and 61432018; National Key R&D Program of China under Grant Nos. 2017YFB0202302 and 2016YFB0200800; State Key Laboratory of Computer Architecture Foundation under Grant No. CARCH3504.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Li, K., Li, S., Huang, S. et al. FastNBL: fast neighbor lists establishment for molecular dynamics simulation based on bitwise operations. J Supercomput 76, 5501–5520 (2020). https://doi.org/10.1007/s11227-019-02860-3
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-019-02860-3