Skip to main content
Log in

FastNBL: fast neighbor lists establishment for molecular dynamics simulation based on bitwise operations

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

A Correction to this article was published on 26 July 2019

This article has been updated

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

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

  1. 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

    Google Scholar 

  2. Allen MP, Tildesley DJ (2017) Computer simulation of liquids. Oxford University Press, Oxford

    MATH  Google Scholar 

  3. Allen MP et al (2004) Introduction to molecular dynamics simulation. Comput Soft Matter Synth Polym proteins 23:1–28

    Google Scholar 

  4. Andersen HC (1983) Rattle: a velocity version of the shake algorithm for molecular dynamics calculations. J Comput Phys 52(1):24–34

    MATH  Google Scholar 

  5. Anderson JA, Glotzer SC (2013) The development and expansion of hoomd-blue through six years of gpu proliferation. arXiv:1308.5587

  6. 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

    MATH  Google Scholar 

  7. ARM (2015) ARM Cortex-A Series: Programmer’s Guide for ARMv8-A

  8. ARM (2017) ARM architecture reference manual. ARMv8, for ARMv8-A architecture profile

  9. Blumenthal LM (1970) Theory and applications of distance geometry. Chelsea, New York

    MATH  Google Scholar 

  10. 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

    MATH  Google Scholar 

  11. Dagum L, Menon R (1998) OpenMP: an industry standard API for shared-memory programming. IEEE Comput Sci Eng 5(1):46–55

    Google Scholar 

  12. 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

  13. Fog A (2008) Optimizing subroutines in assembly language: an optimization guide for x86 platforms. Copenhagen University College of Engineering

  14. Frenkel D, Smit B (2001) Understanding molecular simulation: from algorithms to applications, vol 1. Elsevier, London

    MATH  Google Scholar 

  15. 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

    Google Scholar 

  16. 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

    Google Scholar 

  17. Hockney RW, Eastwood JW (1988) Computer simulation using particles. CRC Press, London

    MATH  Google Scholar 

  18. Intel (2018) Intel® 64 and IA-32 architectures software developers manual. Volume 3B: System programming Guide, Part 2

  19. 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

    Google Scholar 

  20. 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

  21. Mattson W, Rice BM (1999) Near-neighbor calculations using a modified cell-linked list method. Comput Phys Commun 119(2–3):135–148

    Google Scholar 

  22. 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

    Google Scholar 

  23. 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

    MATH  Google Scholar 

  24. Plimpton S, Crozier P, Thompson A (2007) LAMMPS-large-scale atomic/molecular massively parallel simulator. Sandia Natl Lab 18:43–43

    Google Scholar 

  25. Potter D (1973) Computational physics. Wiley

  26. 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

    Google Scholar 

  27. Rapaport DC, Rapaport DCR (2004) The art of molecular dynamics simulation. Cambridge University Press, Cambridge

    MATH  Google Scholar 

  28. 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

    Google Scholar 

  29. 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

    MathSciNet  Google Scholar 

  30. 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

  31. Tuckerman M, Berne BJ, Martyna GJ (1992) Reversible multiple time scale molecular dynamics. J Chem Phys 97(3):1990–2001

    Google Scholar 

  32. Verlet L (1967) Computer “experiments” on classical fluids. I. Thermodynamical properties of Lennard–Jones molecules. Phys Rev 159(1):98

    Google Scholar 

  33. 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

  34. Xing HJ, Khan MKR, Alnatsheh RH, Chirala RC, Bhattacharjee S (2012) Method and apparatus for neighbor list updates. US Patent 8,144,662

  35. 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

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Shigang Li.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-019-02860-3

Keywords

Navigation