Экспериментальное исследование масштабируемости параллельных реализаций алгоритма молекулярной динамики с короткодействующим потенциалом Леннарда-Джонса на Python/MPI, C++/MPI и MATLAB/parfor
Аннотация
В работе выполнено сравнение эффективности реализаций параллельных вычислений при решении задачи молекулярной динамики на языках программирования Python и C++, а также в среде MATLAB. Рассматривается классическая задача моделирования движения системы взаимодействующих частиц в трехмерной области пространства. Используется потенциал взаимодействия Леннарда-Джонса. Для интегрирования уравнений движения применяется скоростной метод Верле. Для всех исследуемых программных платформ реализованы идентичные алгоритмы вычислений и одинаковые начальные условия моделирования. Параллельные вычисления в MATLAB организованы с использованием оператора parfor, обеспечивающего распараллеливание на уровне потоков (threads), а в программах на Python и C++ – с применением стандарта передачи сообщений MPI. Проведены численные эксперименты на двух вычислительных платформах: персональном компьютере и многопроцессорном сервере. Исследованы зависимости времени выполнения программ от количества вычислительных процессов. Выполнен сравнительный анализ производительности, масштабируемости и эффективности распараллеливания. Показано, что реализация в среде MATLAB обеспечивает наименьшее абсолютное время выполнения вычислений, тогда как программа на языке C++ демонстрирует наилучшую масштабируемость при увеличении числа процессов. Полученные результаты могут быть использованы при выборе программных средств для разработки программ молекулярно-динамического моделирования.
- молекулярная динамика
- параллельные вычисления
- MPI
- MATLAB
- Python
- C++
- скоростной метод Верле
- высокопроизводительные вычисления
- численный эксперимент
- моделирование физических процессов
Abstract (in English)
Experimental investigation of the scalability of parallel implementations of the molecular dynamics algorithm with the short-range Lennard–Jones potential using Python/MPI, C++/MPI, and MATLAB/parfor
The paper presents a comparative study of parallel implementations of a molecular dynamics simulation using Python, C++, and MATLAB. A classical molecular dynamics problem describing the motion of interacting particles in a three-dimensional domain is considered. The particle interactions are modeled using the Lennard–Jones potential, while the equations of motion are integrated by the Verlet algorithm. Identical computational algorithms and initial conditions are employed for all software implementations. Parallel computations in MATLAB are performed using the parfor construct, whereas the Python and C++ implementations are based on the Message Passing Interface (MPI) standard. Computational experiments are carried out on both a personal computer and a multiprocessor server. The dependence of execution time on the number of computational processes is investigated. A comparative analysis of performance, scalability, and parallel efficiency is conducted. The results show that MATLAB provides the lowest absolute execution time, while the C++ implementation demonstrates the best scalability with increasing numbers of processes. The obtained results may be useful for selecting software tools for the development of molecular dynamics applications.
Финансирование
Работа выполнена по государственному заданию ИРЭ им. В.А. Котельникова РАН.
Для цитирования
Забегаев Д.Н., Глазунов П.С., Вдовин В.А. Экспериментальное исследование масштабируемости параллельных реализаций алгоритма молекулярной динамики с короткодействующим потенциалом Леннарда-Джонса на Python/MPI, C++/MPI и MATLAB/parfor // Журнал радиоэлектроники. – 2026. – № 10. https://doi.org/10.30898/1684-1719.2026.10.10
Литература
- Allen M.P., Tildesley DJ.. Computer simulation of liquids. – Oxford university press, 2017. https://doi.org/10.1093/oso/9780198803195.001.0001
- Frenkel D., Smit B., Ratner MA.. Understanding molecular simulation: from algorithms to applications. – 1997. https://doi.org/10.1016/B978-0-12-267351-1.X5000-7
- Рапапорт Д. Искусство молекулярной динамики. – 2012.
- Панькин Н.А., Смоланов Н.А., Кашапов Н.Ф. Введение в метод классической молекулярной динамики. – Казань: Издательство Казанского университета, 2022. – 156 с.
- Хельтье Х.Д. и др. Молекулярное моделирование. Теория и практика. – М.: Бином. Лаб. Знаний. – 2013.
- Норман Г.Э., Стегайлов В.В. Стохастическая теория метода классической молекулярной динамики // Математическое моделирование. – 2012. – Т. 24. – № 6. – С. 3–44.
- Verma V.A. et al. Utilizing Molecular Dynamics and Mechanistic Pharmacokinetic Studies in the Design of Selective CDK2 Inhibitors // Journal of Medicinal Chemistry. – 2026. – V. 69. – No. 13. – P. 15294–15316. https://doi.org/10.1021/acs.jmedchem.5c03803
- Gallego G.M. et al. Discovery of Atirmociclib (PF-07220060): A Potent and Selective CDK4 Inhibitor // Journal of Medicinal Chemistry. – 2025. – V. 68. – No. 24. – P. 26085–26098. https://doi.org/10.1021/acs.jmedchem.5c02137
- Elez K. et al. Simulations and active learning enable efficient identification of an experimentally-validated broad coronavirus inhibitor // Nature Communications. – 2025. – V. 16. – P. 6949. https://doi.org/10.1038/s41467-025-62139-5
- Chang X. et al. Integrating Molecular Dynamics and Machine Learning for Solvation-Guided Electrolyte Optimization in Lithium Metal Batteries // Advanced Science. – 2025. – V. 12. – No. 36. – P. e04997. https://doi.org/10.1002/advs.202504997
- Yu Z. et al. Simulation guided molecular design of hydrofluoroether solvent for high energy batteries // Journal of Materials Chemistry A. – 2024. – V. 12. – P. 6294–6301. https://doi.org/10.1039/D3TA07670A
- Li G. et al. Multilevel Artificial Intelligent Framework Accelerates Electrolytes Design for Aqueous Batteries // Angewandte Chemie International Edition. – 2026. – V. 65. – No. 20. – P. e5593105. https://doi.org/10.1002/anie.5593105
- Chen X. et al. Tuning the Hydrogen Bond Network Inside the Helmholtz Plane for Industrial Hydrogen Evolution // Advanced Functional Materials. – 2025. – V. 35. – No. 36. – P. 2503701. https://doi.org/10.1002/adfm.202503701
- Chen W. et al. Designer topological-single-atom catalysts with site-specific selectivity // Nature Communications. – 2025. – V. 16. – P. 574. https://doi.org/10.1038/s41467-025-55838-6
- Tian F. et al. Bioinspired tandem catalyst with topological ordered water networks accelerates alkaline hydrogen evolution electrocatalysis // Applied Catalysis B: Environment and Energy. – 2026. – V. 386. – P. 126427. https://doi.org/10.1016/j.apcatb.2026.126427
- Yang Y. et al. Rejuvenation as the origin of planar defects in the CrCoNi medium entropy alloy // Nature Communications. – 2024. – V. 15. – P. 1402. https://doi.org/10.1038/s41467-024-45696-z
- Xie B. et al. Divergent evolution of slip banding in CrCoNi alloys // Nature Communications. – 2025. – V. 16. – P. 3631. https://doi.org/10.1038/s41467-025-58480-4
- Lyu S. et al. Statistical mechanics, entropy and temperature analog of dislocations moving on fluctuating resistance landscapes // Acta Materialia. – 2025. – V. 291. – P. 121002. https://doi.org/10.1016/j.actamat.2025.121002
- Desai S., Reeve S.T., Belak J.F. Implementing a neural network interatomic model with performance portability for emerging exascale architectures // Computer Physics Communications. – 2022. – V. 270. – P. 108156. https://doi.org/10.1016/j.cpc.2021.108156
- Beck T.L., Carloni P., Asthagiri D.N. All-atom biomolecular simulation in the exascale Era // Journal of chemical theory and computation. – 2024. – V. 20. – No. 5. – P. 1777-1782. https://doi.org/10.1021/acs.jctc.3c01276
- Kutzner C. et al. Scaling of the GROMACS Molecular Dynamics Code to 65k CPU Cores on an HPC Cluster // Journal of Computational Chemistry. – 2025. – V. 46. – No. 5. – P. e70059. https://doi.org/10.1002/jcc.70059
- Phillips J.C. et al. Scalable molecular dynamics on CPU and GPU architectures with NAMD // The Journal of chemical physics. – 2020. – V. 153. – No. 4. https://doi.org/10.1063/5.0014475
- Abraham M.J. et al. GROMACS: High performance molecular simulations through multi-level parallelism from laptops to supercomputers // SoftwareX. – 2015. – V. 1–2. – P. 19–25. https://doi.org/10.1016/j.softx.2015.06.001
- Mai S., Marquetand P., González L. Nonadiabatic dynamics: The SHARC approach // WIREs Computational Molecular Science. – 2018. – V. 8. – No. 6. – P. e1370. https://doi.org/10.1002/wcms.1370
- Shu Y. et al. Semiclassical Nonadiabatic Molecular Dynamics Using Linearized Pair-Density Functional Theory // Journal of Chemical Theory and Computation. – 2024. – V. 20. – No. 20. – P. 8741–8748. https://doi.org/10.1021/acs.jctc.4c01061
- Medvedev N., Artímez Peña A. Ultrafast X-ray induced damage and nonthermal melting in cadmium sulfide // Physical Chemistry Chemical Physics. – 2025. – V. 27. – No. 16. – P. 8230–8237. https://doi.org/10.1039/D5CP00525F
- Coretti A. et al. MetalWalls: Simulating electrochemical interfaces between polarizable electrolytes and metallic electrodes // The Journal of Chemical Physics. – 2022. – V. 157. – No. 18. https://doi.org/10.1063/5.0101777
- Bannerman M.N., Sargant R., Lue L. DynamO: a free O(N) general event-driven molecular dynamics simulator // Journal of Computational Chemistry. – 2011. – V. 32. – No. 15. – P. 3329–3338. https://doi.org/10.1002/jcc.21915
- Ntioudis S., Ewen J.P., Dini D., Turner C.H. PAPRECA: A parallel hybrid off-lattice kinetic Monte Carlo/molecular dynamics simulator // Journal of Open Source Software. – 2024. – V. 9. – No. 98. – P. 6714. https://doi.org/10.21105/joss.06714
- Béland L.K. et al. Kinetic activation–relaxation technique and self-evolving atomistic kinetic Monte Carlo: Comparison of on-the-fly kinetic Monte Carlo algorithms // Computational Materials Science. – 2015. – V. 100. – P. 124-134. https://doi.org/10.1016/j.commatsci.2014.12.001
- Hayakawa S. et al. Atomistic modeling of meso-timescale processes with SEAKMC: A perspective and recent developments // Computational Materials Science. – 2021. – V. 194. – P. 110390. https://doi.org/10.1016/j.commatsci.2021.110390
- Jones J.E. On the determination of molecular fields. II. From the equation of state of a gas // Proceedings of the Royal Society of London. Series A. – 1924. – V. 106. – No. 738. – P. 463–477. https://doi.org/10.1098/rspa.1924.0082
- Verlet L. Computer “experiments” on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules // Physical review. – 1967. – V. 159. – No. 1. – P. 98. https://doi.org/10.1103/PhysRev.159.98
- Plimpton S. Fast Parallel Algorithms for Short-Range Molecular Dynamics // Journal of Computational Physics. – 1995. – V. 117. – No. 1. – P. 1–19. https://doi.org/10.1006/jcph.1995.1039
- Gropp W., Lusk E., Skjellum A. Using MPI: Portable Parallel Programming with the Message-Passing Interface. 3rd ed. Cambridge, MA: MIT Press, 2014. 336 p.
- Gunther N.J. Guerrilla capacity planning: a tactical approach to planning for highly scalable applications and services. – Berlin, Heidelberg : Springer Berlin Heidelberg, 2007. https://doi.org/10.1007/978-3-540-31010-5
- Amdahl G.M. Validity of the single processor approach to achieving large scale computing capabilities // Proceedings of the April 18–20, 1967, Spring Joint Computer Conference (AFIPS ’67 Spring). – 1967. – V. 30. – P. 483–485. https://doi.org/10.1145/1465482.1465560
- md-scalability [Электронный ресурс]. GitHub repository. Режим доступа: https://github.com/DmitriyZabegaev/md-scalability