mdapy: A flexible and efficient analysis software for molecular dynamics simulations

YC Wu and JL Shao, COMPUTER PHYSICS COMMUNICATIONS, 290, 108764 (2023).

DOI: 10.1016/j.cpc.2023.108764

The mdapy is a library for pre-and postprocessing molecular dynamics simulation data. Benefitting from the just-in-time compile technology of TaiChi mdapy can be written in pure Python while possessing similar speed to those written in C++. mdapy is designed with highly paralleled and makes full advantages of modern computer resources on both multicore CPU and GPU architecture. The package implements a fast module to find the neighbors of particles in both free and periodic boundaries, based on which it offers a wide variety of methods to analyze atomic environments, such as standard centrosymmetry parameters, radial distribution function and newer methods, such as atomic entropy fingerprint. In addition, mdapy can be used to create the geometric structure of polycrystals with metallic or graphene grain boundaries by Voronoi diagram. mdapy can directly read the DUMP and DATA format defined in LAMMPS code, and, in practice, it accepts any other format by converting it into NumPy ndarray format. This design philosophy enables seamless integration with abundant scientific ecosystems in the Python community and easy cooperation with other analysis codes like OVITO or freud.Program summaryProgram Title: mdapyCPC Library link to program files: https://doi .org /10 .17632 /dtdkxvcsc9 .1Developer's repository link: https://github .com /mushroomfire /mdapyCode Ocean capsule: https://codeocean .com /capsule /5271472Licensing provisions: BSD 3-clauseProgramming language: Python, C++Nature of problem: Atomic environment analysis and generation of the initial structure are important in molecular dynamics simulations. Many analysis methods relying on particle neighbors, such as radial distribution functions and atomic entropy, are computationally intensive and need to be carefully implemented to scale to large systems. Traditional code is often written in C++ or Fortran to guarantee performance while causing difficulty in installation and secondary development due to the complexity of the programming language.Solution method: mdapy is written in parallel to quickly perform neighbor finding, provides a set of analysis methods and creates an atomic geometry structure on multicore CPU and GPU. Over 95 percent of mdapy is written in Python with a uniform API to call. All data are stored in NumPy ndarray, making users easy to install, use and secondary develop.Additional comments including restrictions and unusual features:1. mdapy provides fast parallel implementations of neighbor finding in periodic and free boundary system.2. mdapy can generate a polycrystalline model with graphene grain boundaries.3. mdapy is helpful for analyzing the melting process by the mean squared displacement and Lindemann index at the atomic level.4. mdapy is very easy to install via pip install mdapy without any compile steps and can be run on Windows, Linux and Mac OS with Python 3.7-3.10.5. mdapy has detailed documentation to make it easier to use.& COPY; 2023 Elsevier B.V. All rights reserved.

Return to Publications page