gamda: GPU-Accelerated Molecular Dynamics Analysis
gamda, a python library which utilizes the CUDA-enable GPU to accelerate the analysis of molecular dynamics (MD)
Dependency
- cupy
cupy is the backend of the CUDA kernels for analysis
- MDAnalysis
MDAnalysis is used to handle the reading of MD trajectories and the selection of atoms
Installation
from pypi
pip install gamda
from gitee
git clone https://gitee.com/gao_hyp_xyj_admin/gamda.git
cd gamda
pip install .
Unittest
git clone https://gitee.com/gao_hyp_xyj_admin/gamda.git
cd gamda
cd unittest
python -m unittest
Usage
A simple exampe:
# Here, we create a xyz file as an example
with open("test.xyz", "w") as f:
f.write("3\n3\nO 1.11 2.22 3.33\nH 3.33 2.22 1.11\nH 2.22 2.22 2.22")
# Import the package
import gamda
import numpy as np
# Import the desired observable
from gamda.observable import PositionZ
# Import the disired analyzer
from gamda.analyzer import Histogrammer
# gamda.Universe is a subclass of MDAnalysis.Universe
u = gamda.Universe("test.xyz")
# Get your AtomGroup in host (CPU)
ag = u.select_atoms("element H")
# Get your AtomGroup in device (GPU)
dag = u.get_dag("atom", ag)
# Initialize your observable
z = PositionZ("z", dag, gamda.Argument("z", np.float32(0)))
# Initialize your analyzer and add it to the universe
zdf = Histogrammer("zdf", 0, 4, 4, z)
u.add_analyzer(zdf)
# Print the source code
print(u.source_code)
# Run
u.run()
# Free the memory
u.free()
del u
# Normalize the result and save
zdf.normalize()
zdf.save("test_zdf.txt")
Reference
- cupy
- MDAnalysis
- N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. J. Comput. Chem. 32 (2011), 2319–2327. doi:10.1002/jcc.21787
- R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler, D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein. MDAnalysis: A Python package for the rapid analysis of molecular dynamics simulations. In S. Benthall and S. Rostrup, editors, Proceedings of the 15th Python in Science Conference, pages 98-105, Austin, TX, 2016. SciPy. doi:10.25080/Majora-629e541a-00e
Metadata
Release files for gamda 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gamda-0.5.tar.gz | 11.7 kB | Without provenance | Details for gamda-0.5.tar.gz |
Release files / gamda-0.5.tar.gz
| Download URL | gamda-0.5.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7191d893b6591de5f4e03d61a21b323a9a419582c0f4aa3a451bae1c1e179aca
|
|
BLAKE2b-256 checksum How to use checksums |
713fb5d740d25cb8a32bd85b229b7518e1d2fb3d47a18e7d861ec4694d39be67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for gamda 0.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.