Skip to main content

GPU Accelerated Molecular Dynamics in Python

Project description

gamdpy [gam-dee-pai]

GPU Accelerated Molecular Dynamics in Python

Gamdpy implements molecular dynamics on GPU's in Python, relying heavily on the numba package (numba.org) which does JIT (Just-In-Time) compilation both to CPU and GPU (cuda). The gamdpy package being pure Python (letting numba do the heavy lifting of generating fast code) results in an extremely extendable package: simply by interjecting Python functions in the right places, the (experienced) user can extend most aspect of the code, including new integrators, new pair-potentials, new properties to be calculated during simulation, new particle properties, ...

Project is hosted here The Users Guide (gamdpy.readthedocs.io)

Overall structure of the package

1. Configuration

A class containing all relevant information about a configuration, including the simulation box (class sim_box).

  • Vectors (r, v, f, etc): (N,D) float array storing D-dimensional vector for each particle
  • Scalars (mass, kinetic energy, etc.): (N,) float array storing scalar for each particle
  • sim_box (data describing box + functions implementing how to calculate distances and how to implement BC). For now:orthorombic (default) and lees_edwards

2. Integrators

Classes implementing a simulation algorithm. Currently implemented:

  • class NVE
  • class NVT : Nose-Hoover thermostat
  • class NVT_Langevin
  • class NPT_Atomic
  • class NPT_Langevin
  • class NVU_RT (Experimental)

Temperature/Pressure can be controlled by a user-supplied function, see examples/kablj.py

3. Interactions

Classes implementing interactions that can be applied to particles in the system:

  • class PairPotential (stores potential parameters and the neighbour list to use (class NbList)
  • fixed interactions (interactions known beforehand):
    • bonds, angles, and dihedrals
    • planar interactions: smooth walls, gravity, electric fields, ...
    • point interactions, e.g., tethering

An interaction is responsible for keeping any internal datastructures up to date (in particular: class PairPotential is responsible for keeping its neighbor-list (class NbList up to date).

4. Runtime actions

Classes implementing actions on the configuration which are not related to the interactions or the integration of the equation of motion. These classes include momentum reset and savers.

  • class TrajectorySaver
  • class ScalarSaver
  • class MomentumReset

5. Simulation

This class takes a Configuration, an Integrator, a (list of) Interaction(s) and a list of Runtime actions and sets up a simulation. Performing simulation is done by a method of this class.

6. Evaluator

Takes a Configuration and a (list of) Interaction(s), and evaluates properties and assign them to the appropiate fields in the configuration.

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

gamdpy-0.8.0.tar.gz (11.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gamdpy-0.8.0-py3-none-any.whl (135.7 kB view details)

Uploaded Python 3

File details

Details for the file gamdpy-0.8.0.tar.gz.

File metadata

  • Download URL: gamdpy-0.8.0.tar.gz
  • Upload date:
  • Size: 11.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for gamdpy-0.8.0.tar.gz
Algorithm Hash digest
SHA256 5994cf2dda23a6731791492be64eb5f7a9bf5989f12e8a573027c1588f1ce55a
MD5 1013008d495bf66f0ccec4229b604961
BLAKE2b-256 9677f9065f1990c24ba8ee3521c7eb8014cffb677bd86b82eee84f2165e399d1

See more details on using hashes here.

File details

Details for the file gamdpy-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: gamdpy-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 135.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for gamdpy-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac21aa87666b77bff4d8ca9b7f43ca32b7f3ad8307c4d4fdbe2635532c17e8c4
MD5 29bf4b57bdcdb303e38ef7880e60eb1c
BLAKE2b-256 f8fafb0d1068f197e2312421d65e4714edbdf42eca32950f95748ba3232e5621

See more details on using hashes here.

Supported by

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