ALGORITHMS AND DATA STRUCTURES FOR NEAREST NEIGHBOUR SEARCH IN MOLECULAR DYNAMICS: APPROXIMATE METHODS IN THE SPACE OF ATOMIC-ENVIRONMENT DESCRIPTORS

Main Article Content

О. О. BOGATYREV

Abstract

This article continues a cycle of studies on nearest-neighbour search in molecular dynamics, addressing approximate search methods in the high-dimensional space of atomic-environment descriptors. Whereas the first article of the cycle established a baseline for exact methods in three-dimensional real space (cell lists, Verlet lists, KD-trees), the present work examines the regime in which these structures degrade owing to the curse of dimensionality. It is shown that nearest-neighbour search in descriptor space is a key computational operation of machine-learned interatomic potentials, in particular of active learning (novelty assessment of configurations, selection of training environments) and of the classification of local atomic environments. Three families of approximate algorithms are analysed – metric trees (Ball-Trees, VP-trees), locality-sensitive hashing (LSH), and graph indices (NSW, HNSW) – in terms of the recall–throughput trade-off that fundamentally distinguishes this task from the deterministic search of the first article. The computational experiment was carried out on a dataset of more than 500 000 local atomic environments of face-centred cubic copper (Mishin embedded-atom potential from the NIST repository; SOAP descriptor of dimensionality 252), including a leave-one-state-out split with queries from the melt against a crystalline base. Exact exhaustive search in double precision with deterministic tie-breaking served as the ground truth, and each method was implemented using its reference library (hnswlib, FAISS, scikit-learn Ball-Tree); the main measurements were performed single-threaded. It is established that at this dimensionality the metric tree is 35 times slower than exhaustive search, while a dimensionality scan (from 50 to 780) quantitatively confirms the degradation of exact structures. The HNSW graph index attains recall 1.0 at a throughput 1.5–8 times higher than exhaustive search in a single thread (up to 28 times on all cores), with the advantage growing with dataset size and the recall preserved for novel environments; locality-sensitive hashing (in its binary FAISS implementation) proved non-competitive. Separately, it is found that the high redundancy of atomic environments makes standard single-precision exhaustive search inexact: it identifies the nearest neighbour correctly in only 93 % of cases, which requires a double-precision ground truth for a correct benchmark on molecular-dynamics data. The conditions of optimality for each family of methods are outlined, together with directions for application – integration into active learning of potentials and hardware acceleration.

Article Details

How to Cite
BOGATYREV О. О. (2026). ALGORITHMS AND DATA STRUCTURES FOR NEAREST NEIGHBOUR SEARCH IN MOLECULAR DYNAMICS: APPROXIMATE METHODS IN THE SPACE OF ATOMIC-ENVIRONMENT DESCRIPTORS. Cherkasy University Bulletin: Physical and Mathematical Sciences, 1(1), 62–82. https://doi.org/10.31651/2076-5851-2026-1-62-82
Section
Computer Modelling in Physics
Author Biography

О. О. BOGATYREV, Educational-Scientific Institute of Informational and Educational Technologies, Bohdan Khmelnytsky National University at Cherkasy, Cherkasy, Ukraine

Candidate of Physical and Mathematical Sciences, Associate Professor

References

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

Bartók, A. P., Kondor, R., & Csányi, G. (2013). On representing chemical environments. Physical Review B, 87(18), 184115. https://doi.org/10.1103/PhysRevB.87.184115

Drautz, R. (2019). Atomic cluster expansion for accurate and transferable interatomic potentials. Physical Review B, 99(1), 014104. https://doi.org/10.1103/PhysRevB.99.014104

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

Mishin, Y., Mehl, M. J., Papaconstantopoulos, D. A., Voter, A. F., & Kress, J. D. (2001). Structural stability and lattice defects in copper: Ab initio, tight-binding, and embedded-atom calculations. Physical Review B, 63(22), 224106. https://doi.org/10.1103/PhysRevB.63.224106

Himanen, L., Jäger, M. O. J., Morooka, E. V., Federici Canova, F., Ranawat, Y. S., Gao, D. Z., Rinke, P., & Foster, A. S. (2020). DScribe: Library of descriptors for machine learning in materials science. Computer Physics Communications, 247, 106949. https://doi.org/10.1016/j.cpc.2019.106949

Thompson, A. P., Aktulga, H. M., Berger, R., Bolintineanu, D. S., Brown, W. M., Crozier, P. S., … Plimpton, S. J. (2022). LAMMPS – a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales. Computer Physics Communications, 271, 108171. https://doi.org/10.1016/j.cpc.2021.108171

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., … Duchesnay, É. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.

Weber, R., Schek, H.-J., & Blott, S. (1998). A quantitative analysis and performance study for similarity-search methods in high-dimensional spaces. In Proceedings of the 24th International Conference on Very Large Data Bases (VLDB) (pp. 194–205).

Indyk, P., & Motwani, R. (1998). Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proceedings of the 30th Annual ACM Symposium on Theory of Computing (STOC) (pp. 604–613). https://doi.org/10.1145/276698.276876

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

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. https://doi.org/10.1109/TPAMI.2018.2889473

Johnson, J., Douze, M., & Jégou, H. (2021). Billion-scale similarity search with GPUs. IEEE Transactions on Big Data, 7(3), 535–547. https://doi.org/10.1109/TBDATA.2019.2921572

Aumüller, M., Bernhardsson, E., & Faithfull, A. (2020). ANN-Benchmarks: A benchmarking tool for approximate nearest neighbor algorithms. Information Systems, 87, 101374. https://doi.org/10.1016/j.is.2019.02.006

Bogatyrev, O. O. (2025). Alhorytmy ta struktury danykh dlia poshuku naiblyzhchykh susidiv u molekuliarnii dynamitsi: tochni metody v realnomu prostori [Algorithms and data structures for nearest neighbour search in molecular dynamics: Exact methods in real space]. Visnyk of Cherkasy University. Series Physical and Mathematical Sciences, (1), 199–210. https://doi.org/10.31651/2076-5851-2025-199-210