Skip to main content

Python GPU-Accelerated Molecular Dynamics Software

Project description

Version 1

Installation

pygamd:

python3 setup.py install
pip install pygamd

Installation time < half of an hour.

Requirements:

OS: Linux Hardware: NVIDIA GPU, AMD GPU or DCU.

Dependencies

  1. Python3.11 including numba, numpy, and pybind11 packages

  2. NVIDIA CUDA Toolkit 12

Citation

To cite PYGAMD in publications use:

Thanks to Zhongyuan Lu group for providing PYGAMD software in our research work.

Documentation

Official website: https://pygamd.com Online manual could be read here: https://pygamd-v1.readthedocs.io/en/latest/. Tutorials written by jupyter notebook are given here: https://nbviewer.jupyter.org/github/youliangzhu/pygamd-v1/tree/main/tutorials/index.ipynb. More examples could be found here: https://github.com/youliangzhu/pygamd-v1/tree/main/examples.

Example: DPD simulation of diblock copolymer

1 First step: generate configuration

from poetry import molgen

mol1=molgen.Molecule(10)#particle number
mol1.setParticleTypes("A,A,A,A,A,B,B,B,B,B")#type
mol1.setTopology("0-1,1-2,2-3,3-4,4-5,5-6,6-7,7-8,8-9")#topology
mol1.setBondLength(0.75)#bond length
mol1.setMass(1.0)#mass


gen=molgen.Generators(20,20,20) # box size in x, y, and z direction
gen.addMolecule(mol1,2400)#molecule, the number of molecules
gen.outPutMST("A5B5") #file name

2 Second step: run simulation

import pygamd

mst = pygamd.snapshot.read("A5B5.mst")
app = pygamd.application.dynamics(info=mst, dt=0.04)

fn = pygamd.force.dpd(info=mst, rcut=1.0)
fn.setParams(type_i="A", type_j="A", alpha=25.0, sigma=3.0)
fn.setParams(type_i="B", type_j="B", alpha=25.0, sigma=3.0)
fn.setParams(type_i="A", type_j="B", alpha=40.0, sigma=3.0)
app.add(fn)

fb = pygamd.force.bond(info=mst, func='harmonic')
fb.setParams(bond_type = 'A-A', param=[4.0, 0.0])# param=[k, r0]
fb.setParams(bond_type = 'A-B', param=[4.0, 0.0])# param=[k, r0]
fb.setParams(bond_type = 'B-B', param=[4.0, 0.0])# param=[k, r0]
app.add(fb)

inn = pygamd.integration.gwvv(info=mst, group='all')
app.add(inn)

dm = pygamd.dump.mst(info=mst, group=['A', 'B'], file='p.mst', period=10000)
app.add(dm)

di = pygamd.dump.data(info=mst, group='all', file='data.log', period=100)
app.add(di)

app.run(500000)

Runing time < 2 hours. Results are the snapshots for the transition from disordered structure to a lamellar phase.

Contributing

We welcome contributions to PYGAMD. Whether it is reporting a bug, starting a discussion by asking a question, or proposing/requesting a new feature, please go by creating a new issue here (https://github.com/youliangzhu/pygamd-v1/issues/) or writing an email to the author Dr. You-Liang Zhu (Email: ylzhu@pygamd.com) so that we can talk about it. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

GNU General Public License v3 (GPLv3)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygamd-1.4.6.tar.gz (48.4 MB view details)

Uploaded Source

Built Distribution

pygamd-1.4.6-py3-none-any.whl (49.0 MB view details)

Uploaded Python 3

File details

Details for the file pygamd-1.4.6.tar.gz.

File metadata

  • Download URL: pygamd-1.4.6.tar.gz
  • Upload date:
  • Size: 48.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pygamd-1.4.6.tar.gz
Algorithm Hash digest
SHA256 4c2fa347d840a57f2b502b2fdc68dbb88746fd7e29e55873cb5a3d5d07e31fca
MD5 4afd5dba90529e39345a41830341d2f0
BLAKE2b-256 45e0e7f0db32d507a4dba7b6a025cda424ca8b3197e13962e5006c69dd3d4403

See more details on using hashes here.

File details

Details for the file pygamd-1.4.6-py3-none-any.whl.

File metadata

  • Download URL: pygamd-1.4.6-py3-none-any.whl
  • Upload date:
  • Size: 49.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pygamd-1.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 97c1f195c1565c00bd9f7280f1064111be3a1ceaa742b31380354fd248499ce3
MD5 c1e4e1ffb26bdc270f078b2e3d8eb89b
BLAKE2b-256 ca94a2eb3f37d6d4213de06a79b62673cc365711c0841e86fbaf755db0012d88

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page