Skip to main content

A python-based simulation package using mpcd and md.

Project description

Mpcmd

An extensible hydrodynamic simulation package

Installation

you can install it with:

  $ pip install mpcmd

or clone this repository and run:

  $ python setup.py install

Requirements

If you are using Lammps for MD simulation, you need to install lammps Python module.

You can install this module by following this page: https://docs.lammps.org/Python_module.html, or just using following commands (recommend):

  $ conda install -c conda-forge lammps

If you are using Hoomd-blue for MD simulation, you need to install hoomd Python module (<=2.9.7).

You can install this module by following this page: https://hoomd-blue.readthedocs.io/en/v2.9.7/installation.html, or just using this command (recommend):

  $ conda install -c conda-forge "hoomd=2.9.7"

Example usage

# Import Modules
from mpcmd import MPCD
from mpcmd.geometry import Cylinder

# Set fluid geometry
cyl = Cylinder(dim='z', radius=10.0, lo=0, hi=10)
cyl.construct_grid(a=1)

# Setup MPCD system
m = MPCD()
m.set_box(box=[100, 100, 100])
m.set_geometry(cyl)
m.add_fluid(density=10)
m.stream(dt=0.005, period=20)
m.collide(kbt=1.0, alpha=130, period=20)

# Save trajectory
m.logger(period=1000, objects=['fluid'], fnames=['test_fluid.gsd'])

# Run
m.run(1e4, mute=1e3)

# Add force field
m.add_force(a=0.1, direction=[0,0,1])
m.run(1e4, mute=1e3)

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

mpcmd-0.0.4.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

mpcmd-0.0.4-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file mpcmd-0.0.4.tar.gz.

File metadata

  • Download URL: mpcmd-0.0.4.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for mpcmd-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d6aefb5d98fff3420d8544bf5a383b0364d95028c2558c3df0019ac0cbaf44cb
MD5 a8c4ba840bc6a8badf89fccf76f8276b
BLAKE2b-256 6c8f11151dd66b27286d1be55a93592f70701696e4fb347ab388e6bb407ba7c8

See more details on using hashes here.

File details

Details for the file mpcmd-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mpcmd-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for mpcmd-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 25337ac650b1351a7eade4fb910a2f046e63514267424dc6021dd809a0c255e0
MD5 aec3ca4f9cf5b6c6ff6fa2ec8a188ff0
BLAKE2b-256 74b36a62dcdde14ba679df395fdaf995c38ce7f0e0ac8c95a60e495252e795e5

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