ALGORITHMS AND DATA STRUCTURES FOR NEAREST NEIGHBOUR SEARCH IN MOLECULAR DYNAMICS: EXACT METHODS IN REAL SPACE

Main Article Content

O. O. BOGATYREV

Abstract

Efficient nearest neighbour search is a decisive factor in the performance of computational molecular dynamics (MD), since the evaluation of local interactions within the potential cutoff radius accounts for the dominant share of the computational cost of a simulation, while the direct evaluation of all pairwise distances scales quadratically with the number of particles and becomes intractable for systems of realistic size. The aim of this article is to systematise and comparatively analyse the algorithms and data structures used for nearest neighbour search in MD and to assess the relationship between their computational efficiency and scalability. The study distinguishes two fundamentally different regimes of nearest neighbour search in contemporary MD. The first concerns the three-dimensional real space in which interatomic forces are computed; here the classical data structures are analysed in detail, namely cell (linked) lists, Verlet neighbour lists with a skin radius, and spatial trees such as KD-trees and octrees, which reduce the algorithmic complexity from quadratic to near-linear or O(N log N) order and are, in low dimensionality, close to optimal. The second regime has emerged with the proliferation of machine-learning interatomic potentials, in which each local atomic environment is encoded as a high-dimensional descriptor vector; in this regime nearest neighbour search underpins active-learning workflows, uncertainty quantification, farthest-point sampling of representative configurations, and the assessment of environment similarity, and exact tree-based structures lose efficiency owing to the curse of dimensionality, motivating approximate methods such as metric trees (Ball-Trees), locality-sensitive hashing based on p-stable distributions, and graph-based structures (HNSW). As the methodological contribution, a computational experiment on the canonical Lennard-Jones fluid is designed to quantitatively compare brute-force search, cell lists, Verlet lists, and a KD-tree as functions of system size, skin radius, and number density. The measured complexity exponents (2.01 for brute force and 0.96-1.05 for the scalable methods) closely reproduce the theoretical estimates, with a gap of nearly three orders of magnitude between brute force and cell lists at the largest system size (N about 10^6). The study concludes that, in the low-dimensional real-space regime, cell- and tree-based structures are close to optimal and provide a baseline against which the high-dimensional regime, the subject of a companion study on a real material, is to be assessed.

Article Details

How to Cite
BOGATYREV, O. O. (2025). ALGORITHMS AND DATA STRUCTURES FOR NEAREST NEIGHBOUR SEARCH IN MOLECULAR DYNAMICS: EXACT METHODS IN REAL SPACE . Cherkasy University Bulletin: Physical and Mathematical Sciences, 1(1), 199–210. https://doi.org/10.31651/2076-5851-2025-199-210
Section
Computer Modelling in Physics
Author Biography

O. O. BOGATYREV, Bohdan Khmelnytsky National University at Cherkasy, Cherkasy, Ukraine

Candidate of Physical and Mathematical Sciences, Associate Professor

References

Allen, M. P., & Tildesley, D. J. (2017). Computer Simulation of Liquids (2nd ed.). Oxford University Press. Retrieved from https://doi.org/10.1093/oso/9780198803195.001.0001

Frenkel, D., & Smit, B. (2002). Understanding Molecular Simulation: From Algorithms to Applications (2nd ed.). Academic Press. Retrieved from https://shop.elsevier.com/books/understanding-molecular-simulation/frenkel/978-0-12-267351-1

Verlet, L. (1967). Computer “experiments” on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules. Physical Review, 159(1), 98–103. Retrieved from https://doi.org/10.1103/PhysRev.159.98

Hockney, R. W., & Eastwood, J. W. (1988). Computer Simulation Using Particles. Adam Hilger. Retrieved from https://doi.org/10.1201/9780367806934

Bentley, J. L. (1975). Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9), 509–517. Retrieved from https://doi.org/10.1145/361002.361007

Friedman, J. H., Bentley, J. L., & Finkel, R. A. (1977). An algorithm for finding best matches in logarithmic expected time. ACM Transactions on Mathematical Software, 3(3), 209–226. Retrieved from https://doi.org/10.1145/355744.355745

Weber, R., Schek, H.-J., & Blott, S. (1998). A quantitative analysis and performance study for similarity-search methods in high-dimensional spaces. Proceedings of the 24th VLDB Conference, 194–205. Retrieved from https://dblp.org/rec/conf/vldb/WeberSB98.html

Datar, M., Immorlica, N., Indyk, P., & Mirrokni, V. S. (2004). Locality-sensitive hashing scheme based on p-stable distributions. Proceedings of the 20th Annual Symposium on Computational Geometry, 253–262. Retrieved from https://doi.org/10.1145/997817.997857

Behler, J., & Parrinello, M. (2007). Generalized neural-network representation of high-dimensional potential-energy surfaces. Physical Review Letters, 98(14), 146401. Retrieved from https://doi.org/10.1103/PhysRevLett.98.146401

Bartók, A. P., Payne, M. C., Kondor, R., & Csányi, G. (2010). Gaussian approximation potentials: The accuracy of quantum mechanics, without the electrons. Physical Review Letters, 104(13), 136403. Retrieved from https://doi.org/10.1103/PhysRevLett.104.136403

Thompson, A. P., et al. (2022). LAMMPS – a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales. Computer Physics Communications, 271, 108171. Retrieved from https://doi.org/10.1016/j.cpc.2021.108171

Winkler, D., Rezavand, M., & Rauch, W. (2018). Neighbour lists for smoothed particle hydrodynamics on GPUs. Computer Physics Communications, 225, 140–148. Retrieved from https://doi.org/10.1016/j.cpc.2017.12.014

Malkov, Yu. A., & Yashunin, D. A. (2020). Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42(4), 824–836. Retrieved from https://doi.org/10.1109/TPAMI.2018.2889473

Podryabinkin, E. V., & Shapeev, A. V. (2017). Active learning of linearly parametrized interatomic potentials. Computational Materials Science, 140, 171–180. Retrieved from https://doi.org/10.1016/j.commatsci.2017.08.031

Musil, F., Grisafi, A., Bartók, A. P., Ortner, C., Csányi, G., & Ceriotti, M. (2021). Physics-inspired structural representations for molecules and materials. Chemical Reviews, 121(16), 9759–9815. Retrieved from https://doi.org/10.1021/acs.chemrev.1c00021