A simple, fast and cross-platform python library to handle the data generated from molecular dynamics simulations
Project description
mdapy : Molecular Dynamics Analysis with Python
Overview
The mdapy python library is developed by the Yong-Chao Wu & Jian-Li Shao Group at the Beijing Institute of Technology, which provides an array of powerful, flexible, and straightforward tools to analyze atomic trajectories generated from Molecular Dynamics (MD) simulations. The library is fully cross-platform, making it accessible to users in Windows, Linux, and Mac OS. Benefited by the TaiChi project, we can effectively accelerate the pure python code, bringing it closer to the speed of code written in C++. Furthermore, mdapy is highly parallelized, allowing users to leverage the resources of both multicore CPU and GPU. mdapy can directly handle the DUMP and DATA formats in LAMMPS. Besides, all data in mdapy is stored in NDARRAY format in NumPy, which enables easy integration with the scientific ecosystem in python and facilitates collaboration with other post-progressing tools such as OVITO and freud.
Resources
Homepage: https://github.com/mushroomfire/mdapy
Documentation: https://mdapy.readthedocs.io/
Issue Tracker: https://github.com/mushroomfire/mdapy/issues
Dependencies
python (3.7-3.10)
Optional Dependencies
SciencePlots (Optional, for plotting results)
tqdm (Optional, for progress bar when reading/saving multi DUMP files)
pyfftw (Optional, for fast FFT)
pyfnntw>=0.4.1 (Optional, for fast KNN search)
Installation
Install from pip (recommended).
pip install mdapy
Install from source code.
You should install pybind11 and have a C++ compilation environment (-std=c++11 or newer) and openmp supports. Tested by MSVC in Windows 10, GCC in Ubuntu, Clang in MAC OS M1.
pip install pybind11
Download the source code and installation.
git clone https://github.com/mushroomfire/mdapy.git cd mdapy pip install .
Usage
import mdapy as mp
mp.init('cpu') # use cpu, mp.init('gpu') will use gpu to compute.
system = mp.System('./example/CoCuFeNiPd-4M.dump') # read dump file to generate a system class
system.cal_centro_symmetry_parameter() # calculate the centrosymmetry parameters
system.cal_atomic_entropy() # calculate the atomic entropy
system.write_dump() # save results to a new dump file
Main Features
Structure Analysis
Potential Analysis
Melting Analysis
Geometry Structure Creation
Neighbor Search
Other
Citation
If you find mdapy useful, you can start it! If you use mdapy in your scientific publication, because the paper is under review on Computer Physics Communication and you can cite its preprint version as below:
Wu, Yong-Chao and Shao, Jian-Li, Mdapy: A Flexible and Efficient Analysis Software for
Molecular Dynamics Simulations. Available at SSRN: https://ssrn.com/abstract=4360931
or http://dx.doi.org/10.2139/ssrn.4360931.
Trouble Shoot
If you encounter ImportError in Linux:
version 'GLIBCXX_3.4.29' not found.
You can try:
conda install -c conda-forge gxx_linux-64
Release Notes
V0.8.5 (4/9/2023)
Compile it on MAC OS with M1. Now mdapy is fully cross-platform.
Obviously improve the performance of reading/writing DUMP with pyarrow.
Add pyarrow as a dependency package.
Fix bug of create_polycrystalline module. One can give box with any number, the old version only works for positive float.
Fix bug of spatial_binning module for empty region.
Let tqdm as an Optional dependency.
V0.8.4 (3/30/2023)
Optimize Pair Distribution module.
Optimize Neighbor module.
Update many Benchmark cases.
V0.8.3 (3/20/2023)
Make Polyhedral Template Mathing parallel.
V0.8.2
Fix bugs of unwrap positions.
Fix a typo error in msd.
V0.8.1
Add Steinhardt Bondorder Parameter method, which can be used to identify the lattice structure and distinguish the solid/liquid phase during melting process.
Add Polyhedral Template Mathing method.
Add IdentifySFsTBs method to identify the stacking faults (SFs) and twinning boundary (TBs) in FCC lattice.
V0.8.0
Add Ackland Jones Analysis (AJA) method.
Add Common Neighbor Parameter (CNP) method.
Update the nearest neighbor search in CSP method.
V0.7.9
Fix bug of create_polycrystalline module in Linux.
V0.7.8
Update TaiChi version to 1.4.0.
Set SciencePlots as a optional package.
Fix bug in create_polycrystalline.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for mdapy-0.8.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aecbe492a77f324b457ed78aa4acfc1f54fbe93a7afd0b4d252c7f6c08745663 |
|
MD5 | 2224dd03108a963f8432f43f16cfbc1e |
|
BLAKE2b-256 | 2602471d2e6b30415e74b5b832bcdada591debcc7eb8dca70350dc581c10faec |
Hashes for mdapy-0.8.5-cp310-cp310-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9df7970ac74dfed412953ee5f8439154b3f25f1a00af273038fd30ecf3a5ff30 |
|
MD5 | a984b35c67c332ae6f02b70089bc625c |
|
BLAKE2b-256 | 92eaf53ef3ff559eacb70f63b2b8f957a7335547d4a2e8b30e8cceaa8f4c3d2e |
Hashes for mdapy-0.8.5-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 603040b33cd1075941a3dd8833af29e29b9a792500ec52aa80145645f276a95d |
|
MD5 | a2222265a1647f73f3c75428b4be6f21 |
|
BLAKE2b-256 | 13a05ca4cee93efd45944479aa2e24c2332c5fcc2bc427c0a9282d71ecfb89a5 |
Hashes for mdapy-0.8.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc008ce1ea8708c57182c5fb6dc15841bb66eef81449b6dc04bb1ae2c9c5fb9a |
|
MD5 | 7e5e8659dfff8a5eaf21ca619344dfb6 |
|
BLAKE2b-256 | 3bb40c2318538e96e10e5c5f4fbcbfd350abeec08c6682d020ca31ab8758456f |
Hashes for mdapy-0.8.5-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 467e402ee82eb14cec6400e69e02491dd65dfcc6b2bd30f9eac7c89bbe1fe771 |
|
MD5 | b9e1bb2e66e8a12ca3cc264dbdc99622 |
|
BLAKE2b-256 | 0d42d0e826bdb8503ca361e882537ac23806e90a94dd155e6b23a59f8728f177 |
Hashes for mdapy-0.8.5-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a9f8d48bef4adb5eb80167ca2d2d58e870e676ad357e52cf52bed72b2ec77c9 |
|
MD5 | e5491def4718bd7286e3710eba4eda1d |
|
BLAKE2b-256 | 258d875b898ec707c7a84de45240a2a60be27c4f1812aefe622f99828a110f22 |
Hashes for mdapy-0.8.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82c19574652eded2be233cbcc1cd42e9c9974372544147f7103e8f87b18d00e0 |
|
MD5 | e9a95a1f4c0d311061640850ca184432 |
|
BLAKE2b-256 | 28dc67f3e1df4b3d452abc7b9da1bfb1fbdaad98bea9d00b0666964715bab4d6 |
Hashes for mdapy-0.8.5-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 000b566428e6034d40a46969868fc568c9b7de0641b59c2dd399e529649efc30 |
|
MD5 | ee1d87657ab038b2cdda9c3c19e58d14 |
|
BLAKE2b-256 | 00410e6d4e8e1d3c115edf07f0813d6904e0a339f1653abbe0f971c0f14e77a4 |
Hashes for mdapy-0.8.5-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 412da514f9c82a9b76a2a7994462521a3b28fb29c0fec4a44d4342244e17731f |
|
MD5 | 5d841ee19cb28ca7bd71b22b234ae375 |
|
BLAKE2b-256 | 5792aa790f422d7a4c9f895fb2be9232da0d1f7a2a183d74e23c61d3a75a2734 |
Hashes for mdapy-0.8.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3183b987a50fc88273876d8d764b44869c42a2e93e2725dc9354fa27d7141476 |
|
MD5 | 76e0f7007d12f7eeb92e4f9a4f3def26 |
|
BLAKE2b-256 | 972c2a7d53662e4b0d38cfd49d16b825d08bacecbeb88a01fabfd9a855151e99 |
Hashes for mdapy-0.8.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2056aa74be8a940c6cd8f40be7b98f2f709fb0e6842e007619470c522f4d82c4 |
|
MD5 | 398d10e6f2b40bde65867365bece5159 |
|
BLAKE2b-256 | f2e2e986988428f13a46dd7d704332dc4f889585b84891f6d95e66952896636a |
Hashes for mdapy-0.8.5-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91987f9c4f9dadaa1df5a2a9b3f0d92be810091bb2cd1cb978ac01aecc073f62 |
|
MD5 | e8d199a44041624b7596562c7b96145f |
|
BLAKE2b-256 | 9e0ed2e41bacca3ee2b637718577bee4d52dac6cbb307f465aedcd6724df3ac3 |