🚀 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.
Quick Links¶
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¶
- Installation
- Method 1 — pip install (recommended)
- Method 2 — install with optional extras
- Method 3 — build from the PyPI source distribution
- Method 4 — install from a git clone (for development)
- Method 5 — install directly from GitHub
- System requirements for Methods 3 – 5
- Verify the installation
- Interoperability with PyTorch / OVITO / freud / scikit-learn
- Atomic Structure Generation
- Use Mdapy Efficiently
- Elastic constant
- Phonon Calculation
- EAM Analysis
- Load and Save File
- Render atomic structures
- Benchmark
Mdapy Python API¶
- Index
- mdapy.ackland_jones_analysis module
- mdapy.angular_distribution_function module
- mdapy.atomic_strain module
- mdapy.atomic_temperature module
- mdapy.bond_analysis module
- mdapy.bond_stiffness module
- mdapy.box module
- mdapy.build_bond module
- mdapy.build_lattice module
- mdapy.calculator module
- mdapy.centro_symmetry_parameter module
- mdapy.chill_plus module
- mdapy.cluster_analysis module
- mdapy.common_neighbor_analysis module
- mdapy.common_neighbor_parameter module
- mdapy.create_polycrystal module
- mdapy.data module
- mdapy.eam module
- mdapy.elastic module
- mdapy.identify_diamond_structure module
- mdapy.identify_fcc_planar_faults module
- mdapy.knn module
- mdapy.lammps_potential module
- mdapy.lammps_runner module
- mdapy.lindemann_parameter module
- mdapy.load_save module
- mdapy.md_elastic module
- mdapy.mean_squared_displacement module
- mdapy.minimizer module
- mdapy.neighbor module
- mdapy.nep module
- mdapy.nep4ase module
- mdapy.orthogonal_cell module
- mdapy.parallel module
- mdapy.phonon module
- mdapy.pigz module
- mdapy.plotset module
- mdapy.polyhedral_template_matching module
- mdapy.potential_tool module
- mdapy.qha_elastic module
- mdapy.radial_distribution_function module
- mdapy.render module
- mdapy.spatial_binning module
- mdapy.spline module
- mdapy.sqs module
- mdapy.steinhardt_bond_orientation module
- mdapy.structure_entropy module
- mdapy.structure_factor module
- mdapy.system module
- mdapy.tool_function module
- mdapy.trajectory module
- mdapy.unwrap_trajectory module
- mdapy.visualize module
- mdapy.void_analysis module
- mdapy.voronoi module
- mdapy.warren_cowley_parameter module
- mdapy.wigner_seitz_defect module