🚀 mdapy - Molecular Dynamics Analysis with Python¶

Overview¶

mdapy is a fast, full-featured Python library for analyzing Molecular Dynamics (MD) simulation data. It combines high-performance C++ kernels, a lightweight Python interface, built-in ray-tracing visualization, and machine-learning potential workflows in one package.

pip install mdapy

Why mdapy?¶

  • Fast core: Nanobind-wrapped C++ kernels with OpenMP acceleration.

  • Lightweight: the core package depends only on NumPy and Polars.

  • Practical: structure analysis, model building, rendering, and NEP workflows in one API.

  • Cross-platform: wheels for Windows, Linux, and macOS.

Key Capabilities¶

  • Neighbor search: fixed-radius neighbors, kNN, and Voronoi neighbors.

  • Structural analysis: PTM, CNA, CSP, IDS, SRO, RDF, ADF, structure factor, bond analysis, and more.

  • Connectivity: build bond pairs directly from neighbor lists with a global cutoff or type-/element-specific cutoffs.

  • Model building: FCC/BCC/HCP/diamond crystals, HEAs, and polycrystals.

  • Rendering: Tachyon CPU/GPU rendering with configurable colors, radii, shadows, and transparent backgrounds.

  • Machine-learning workflows: NEP/qNEP evaluation, elastic constants, EOS, stacking faults, and phonons.

Dependencies¶

Citation¶

If you use mdapy in research, please cite:

@article{mdapy023,
   title = {mdapy: A flexible and efficient analysis software for molecular dynamics simulations},
   journal = {Computer Physics Communications},
   pages = {108764},
   year = {2023},
   issn = {0010-4655},
   doi = {https://doi.org/10.1016/j.cpc.2023.108764},
   url = {https://www.sciencedirect.com/science/article/pii/S0010465523001091},
   author = {Yong-Chao Wu and Jian-Li Shao},
   keywords = {Simulation analysis, Molecular dynamics, Polycrystal, TaiChi, Parallel computing}
   }

Release Notes¶

Getting Started¶

Mdapy Python API¶

Project README¶