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 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.11)
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 star it! If you use mdapy in your scientific publications, please cite the paper:
@article{mdapy2023,
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}
}
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.7 (5/25/2023)
Updated Taichi to 1.6.0, which decreases the import time ans supports Python 3.11.
Fix bug in read data.
Updated mdapy citation. We are pleased that our article for mdapy has been accepted by Computer Physics Communications.
V0.8.6 (4/22/2023)
Add repr for System class.
Add Replicate class.
Improve the performance of reading/writing DATA file with pyarrow.
Improve the performance of building Voronoi diagram with new version voro++.
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.7-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29945890fe04ac685e0a434d49f7d36a60a4b9a1a3b482b9ae6552ba5120fe89 |
|
MD5 | 6f06225132db8483d7391a139c1e8270 |
|
BLAKE2b-256 | f85904f24697555d79960055bd9bc74a2ce543a061cb0f9159e1e0067d6f442b |
Hashes for mdapy-0.8.7-cp311-cp311-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba2158bc688363b8a8dd65c1d3aa789e60557085167a9228281b60e484eb8a8 |
|
MD5 | 0f97baa43a95e429da1075df325464a1 |
|
BLAKE2b-256 | 4ca7b710123b5c4332beb305101ed6ad769721043f3fe8f4bc484f41f34c7f90 |
Hashes for mdapy-0.8.7-cp311-cp311-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96db61e888f0529166a1a410ba173f837a11598a45a9bc2102ff79ebf2e0588d |
|
MD5 | 46fd3baf95d4bc3bb3c4a116033742f3 |
|
BLAKE2b-256 | 5af76f3a8b4a1b861672ade754d291ec3d9cfdba52bc623f1074ca8d6e38f9d9 |
Hashes for mdapy-0.8.7-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 595c450982dd410b659e95814a45f0346e326f987596803574c995127b4384c5 |
|
MD5 | ce689605956daaab82fca4d5b88ef74b |
|
BLAKE2b-256 | d9f0ca342a10bd7c4a64f7cea5ba7758ecc78b125ad1357e321451e394d9ba6f |
Hashes for mdapy-0.8.7-cp310-cp310-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5dd5aff344f670d48af2046ce6913b7572d0cfa9dd52233d1b437c500eaacbf |
|
MD5 | a7d2f4a97d07e739ec6f82b4d2898c2e |
|
BLAKE2b-256 | 257f41a6dd02e441b3ab472d9b78eef743b0871a2088b576447a350b819a0d4d |
Hashes for mdapy-0.8.7-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bba9298ccc13bc3367b09040afdee453fbc1a10d573e0a18315c3f7d4883696d |
|
MD5 | 583ba1f41d5c6aed6fd2c88cb3c9153b |
|
BLAKE2b-256 | 940ac2bad736d4fd273b9530915f43ca98541b3377243cb37ce6a98f0a15d421 |
Hashes for mdapy-0.8.7-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37e5af511cf780adf001386433ededcf9913829942d78bda994af1dbfbae244e |
|
MD5 | 2dbf9830c62d8662d925fe91bd485331 |
|
BLAKE2b-256 | 281cc6d477c94c9f97c7b95c09e8da0ff23aa0fda6fa25ed2823a940551cb685 |
Hashes for mdapy-0.8.7-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25169c58e591f4146381d085df8bc159f0ff9889288ddbe4d5a41ee5c86b6681 |
|
MD5 | 90c86248317efe25e94f3e7793c2d194 |
|
BLAKE2b-256 | 2eb21d539438c1d057e898cb5ba2f5706b1ad881231dc6ea03be9916f217bd49 |
Hashes for mdapy-0.8.7-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b084693a0db4cd2ea328b246eba897bcdfe817080ea2dda22d926297240acdb0 |
|
MD5 | 1f09bd22d896c25cb83f4bb78f13b7a3 |
|
BLAKE2b-256 | 3a8507b0cf35bbc55d6d561d564a4e67d722bb481423c304f595163516a6d568 |
Hashes for mdapy-0.8.7-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ade37def395b4a4130d5444af04fa6230ee45071010ec800d60d512ae3829a77 |
|
MD5 | 04a8c45397556c876beb46aaefc25df3 |
|
BLAKE2b-256 | b22107c03acc0a6f8cb7c1510cb5a39951b549a9d5de82925b0873c950825901 |
Hashes for mdapy-0.8.7-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2603dd40ea6c8cda0dd023ab00dffce7c505c46f38faba068e7a3d0d07b943cf |
|
MD5 | cca97d3611710f1387bd0a15875b0e6f |
|
BLAKE2b-256 | 31d5167e28ffab419528da3d79387c994fe27428e730d377d6141e2e723a96b5 |
Hashes for mdapy-0.8.7-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 129b5d908dd59bfe650aac386ce9ad3926828d7ed5a4c6b917d4d89b31bc7f53 |
|
MD5 | 70a8e863168f7fe27a7d43549247b373 |
|
BLAKE2b-256 | 7ee4d5f56f5e32073f8c71f7adc8d16bd158724aa3d101ff572a856720a66ada |
Hashes for mdapy-0.8.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9daf94aa0aea2442f88e620891cb149a199802d901ef2e119522adf6c9b5797 |
|
MD5 | ade8c8b7a511e603c2a7f8d66c8a897f |
|
BLAKE2b-256 | 4be3620ecdd6e107c326be1c311944e28fc66f86e084c4f25a189004e11f33d1 |
Hashes for mdapy-0.8.7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41d613aa743b854a9eefb879a42b5bdac1b20afd0bf641a0c03c8985cfee0de3 |
|
MD5 | c47fe8e3ecaef80585c0d29e18839313 |
|
BLAKE2b-256 | b3e62593aba69e6f247a3ae9e38d36db1319670fa32ba021fb9af3ebdf3a23f7 |
Hashes for mdapy-0.8.7-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13ac84c30c6597a5a16b0911c0d85b5e271baea606d94a8c5a2c992fb5d95175 |
|
MD5 | a988738a4c72abc80121c286cc6b1476 |
|
BLAKE2b-256 | 885cdbc6ed0af8b4312ace2ea41be0150266a896b7e7aff374ceea1da3bab7f3 |