Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

MDAPY

Fast building, analysis, simulation and visualization of atomistic systems, in Python.

Tests Coverage PyPI version PyPI downloads Python 3.11 or newer Linux, macOS, Windows License: MPL-2.0 Paper: Comput. Phys. Commun. 290, 108764

Documentation · Quick tour · Lessons · Examples · Install · Tests · Cite

MDAPY 2.0 is a complete rewrite and is not compatible with MDAPY 1.x. It brings many more features, and we recommend upgrading: From MDAPY 1.x gives the 2.0 way of each common call. The code of 1.x stays on the branch 1.x.

If you like MDAPY, please give it a ⭐ star.

💡 Why MDAPY

  • Light. NumPy and polars are its only requirements. Packages such as matplotlib or ASE are optional, and it carries no other third-party code.
  • Robust. Tests cover more than 99 % of the code and compare each feature with analytic results and with mature software. All of them run automatically on Linux, macOS and Windows. Results are the same for any number of threads, and damaged files or impossible inputs give a clear error, not a crash.
  • Fast. The heavy parts run in C++, on a parallel engine of MDAPY's own. See the benchmarks.
  • Predictable. Names say what the code does: minimize, elastic_constants, CommonNeighborAnalysis. A System never changes in place, every analysis has the form compute(system) and returns NumPy arrays, and one unit system, Å, eV and ps, runs through everything.
  • Stable. From 2.0.0 on, code that works keeps working: the API changes only with 3.0, a replaced name warns long before it goes, and a result changes only to fix a bug, named in the release notes. See Compatibility.
  • Integrated. One package and one System, from the first structure to the last picture. It converts systems to and from ASE, OVITO, pymatgen and freud, takes any ASE calculator or LAMMPS interaction, shares a process with PyTorch, and works as one step of high-throughput calculations.
  • Documented. Every feature has its own page, with an example, its parameters, its results and its references, and lessons lead from the first structure on.

🧰 What it does

Area What is in it
Build Crystals, polycrystals, alloys, defects and dislocations
Analyze More than 40 analyses of structure, local order, defects and dynamics
Simulate Native EAM and NEP, interfaces to LAMMPS and ASE; relaxation and dynamics; elastic constants, phonons, free energies, melting points and phase diagrams
MLIP Training sets from VASP, descriptors, errors of a model, the frames worth computing
Visualize Ray-traced pictures on the processor or the graphics card, movies and plots
Exchange Eight file formats, and systems shared with ASE, OVITO, pymatgen and freud

🎨 Examples

Click a picture for its example, with the whole code.

A movie that flies through a copper polycrystal
Fly through a crystal

Polycrystals
Polycrystals
Gradient grains
Gradient grains
Graphene grains
Graphene grains
Ice polycrystal
Ice polycrystal
Quasirandom alloys
Quasirandom alloys
Dislocations
Dislocations
Structure types
Structure types
Voronoi cells
Voronoi cells
Point groups
Point groups
Atomic strain
Atomic strain
Rings
Rings
Clusters
Clusters
Ice and water
Ice and water
Atom paths
Atom paths
Polyhedra
Polyhedra
Gamma surfaces
Gamma surfaces
NEP against DFT
NEP against DFT
Phase diagrams
Phase diagrams
Surface meshes
Surface meshes
Model uncertainty
Model uncertainty
High throughput
High throughput

More in the documentation, from the quick tour on.

📦 Install

pip install mdapy

MDAPY needs Python 3.11 or newer. Code written for 1.x keeps working with pip install "mdapy<2", or moves to 2.0 as this guide shows. Installation describes the other ways to install it, from a source archive or from git, what those need, and the optional packages.

🧪 Tests

git clone https://github.com/mushroomfire/mdapy.git
cd mdapy
pip install -e ".[dev]"
pytest

Tests that need another program are skipped where it is missing. Contributing lists what a complete run needs.

📖 Citing MDAPY

If MDAPY contributes to a publication, please cite:

Yong-Chao Wu and Jian-Li Shao, mdapy: A flexible and efficient analysis software for molecular dynamics simulations, Computer Physics Communications 290, 108764 (2023). doi:10.1016/j.cpc.2023.108764

Papers citing MDAPY lists, by year, the papers that cite it.

📄 License

Mozilla Public License 2.0, see LICENSE: MDAPY may be used in any software, open or closed, and changes to its own files are shared under the same license.

📜 Code history

MDAPY has been written three times.

Series Years How it was built Code
0.x 2022–2025 Python, with Taichi for the kernels Branch mdapy_old, last release 0.11.5
1.x 2025–2026 Rewritten with every kernel in C++, and with NumPy and polars as its only requirements Branch 1.x, last release 1.0.10, documentation
2.x 2026– Rewritten again from scratch, for the reasons below This branch

Taichi was no longer updated, which also limited the versions of Python that 0.x could run on. 1.x was rewritten to be easy to update and maintain, and it needs only NumPy and polars, no longer SciPy and Taichi.

2.x goes further: it is easier to maintain, more stable and more consistent, lighter without external code, with many more features and a clearer organization. In particular:

  • OpenMP. The OpenMP runtime of 1.x could clash with those of other packages. 2.x runs a thread pool of its own, so it shares a process with PyTorch and LAMMPS.
  • Third-party code. 1.x carried ten third-party codes to build and keep working. 2.x carries none.
  • The API. In 1.x an analysis was a method that changed the system. In 2.x a System never changes and every analysis is a class with one form.
  • Tests. Tests cover more than 99 % of the code and compare each feature with analytic results and with mature software, which makes 2.x more stable.
  • Many small calculations. The threads can be limited for each process, so thousands of small calculations side by side do not fight for cores.
  • Graphical interfaces. Long computations report their progress, can be cancelled and leave Python running, so a graphical interface is easy to build on 2.x.

Metadata

Release files for mdapy 2.1.0rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mdapy 2.1.0rc2
File Size Uploaded Provenance Actions
mdapy-2.1.0rc2.tar.gz 748.4 kB With provenance Details for mdapy-2.1.0rc2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for mdapy 2.1.0rc2
File Actions
mdapy-2.1.0rc2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for mdapy-2.1.0rc2-cp312-abi3-win_amd64.whl
mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64, Linux glibc 2.27+ ARM64 Details for mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
mdapy-2.1.0rc2-cp312-abi3-macosx_14_0_arm64.whl CPython 3.12 abi3 macOS 14.0+ ARM64 Details for mdapy-2.1.0rc2-cp312-abi3-macosx_14_0_arm64.whl
mdapy-2.1.0rc2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for mdapy-2.1.0rc2-cp311-cp311-win_amd64.whl
mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64, Linux glibc 2.27+ ARM64 Details for mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
mdapy-2.1.0rc2-cp311-cp311-macosx_14_0_arm64.whl CPython 3.11 CPython 3.11 macOS 14.0+ ARM64 Details for mdapy-2.1.0rc2-cp311-cp311-macosx_14_0_arm64.whl

Total release size: 12.1 MB

Release files / mdapy-2.1.0rc2.tar.gz

Download URL mdapy-2.1.0rc2.tar.gz
Size 748.4 kB
Tags Source
SHA-256 checksum
How to use checksums
509070ad6c40be37080b946c3d33b7f0d42d2dbae898dbe4220e5c3eee4a80ef
BLAKE2b-256 checksum
How to use checksums
e61e35f5ba3f5bd3e1682ef348ef75fdbd79a479bb4546e5d8aa411d21695a43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp312-abi3-win_amd64.whl

Download URL mdapy-2.1.0rc2-cp312-abi3-win_amd64.whl
Size 1.5 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
437a1fbd4342418c3069cba41044fca75d048d53e3b77cfee768469b3482ac9b
BLAKE2b-256 checksum
How to use checksums
d357107eec4a900e6dfc034bb1813d8357a298fa35429c6a160a9d2cda5004e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
29564fd120f626211fcf1e9f9556f79b0e5d99853a0d1567f58430cbccbedbb5
BLAKE2b-256 checksum
How to use checksums
fc6916b82eb6a8243719ce63f1db2144a2fe966e4fe023d1023d809e4622f751
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL mdapy-2.1.0rc2-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
875ad6d55d52fb7f0c5cc3ecc780f49e1ad3bf0b3b9194e3a61be387a58692f2
BLAKE2b-256 checksum
How to use checksums
ea22bb9977838a0cbc7f58796ae506a2914adebb28618dcd13884262a38049e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp312-abi3-macosx_14_0_arm64.whl

Download URL mdapy-2.1.0rc2-cp312-abi3-macosx_14_0_arm64.whl
Size 1.2 MB
Tags CPython 3.12 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
c20e88827c23d264ca57abb3ccbc2522ca74d13ca19d8d00746e2144674a57be
BLAKE2b-256 checksum
How to use checksums
9cdea47c0f5035d28443ade4183e1d1362445a11f7cab25a9dd79379b646e1e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp311-cp311-win_amd64.whl

Download URL mdapy-2.1.0rc2-cp311-cp311-win_amd64.whl
Size 1.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
105bbc767a9d182c69d14358df5519d10d7302965e7aefb0cc2b49b3af06e08d
BLAKE2b-256 checksum
How to use checksums
117d6b430d8bcdaa5821751969e327606e47d885e19467697a9bd43dc3ac31dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
eb34422b0ec19dd6d68e70267096068d5176ce2dd33c99ca421786aa916b4e9b
BLAKE2b-256 checksum
How to use checksums
410659ee1e64427ffa4074dd896c6aa88af6ded371c40079d4f5f336133a064f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL mdapy-2.1.0rc2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 1.5 MB
Tags CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
40428fa9199711af5de01a67bf4515c2edaa450ba9342d2f096c2477dae24ccd
BLAKE2b-256 checksum
How to use checksums
8ffed900c1904c056cf978dbbe03bf27a871e4245782578ceb1dfd35f43aa97c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mdapy-2.1.0rc2-cp311-cp311-macosx_14_0_arm64.whl

Download URL mdapy-2.1.0rc2-cp311-cp311-macosx_14_0_arm64.whl
Size 1.2 MB
Tags CPython 3.11 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
73a16fd1f0f82c51be760ceff8d63f114021d4b2e20af78b40e8c0e74bd659f7
BLAKE2b-256 checksum
How to use checksums
8bc1391af9cd958513f54644a4bb309a38a5f639d160ac6d5f983ad13066e86b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for mdapy 2.1.0rc2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 9 files in this release have been uploaded with provenance metadata.

Select from 9 files

Attestation for mdapy-2.1.0rc2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page