yurivict / hoomd-blue

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.

Home Page:http://glotzerlab.engin.umich.edu/hoomd-blue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HOOMD-blue

Citing HOOMD conda-forge conda-forge Downloads GitHub Actions Read the Docs Contributors License

HOOMD-blue is a Python package that runs simulations of particle systems on CPUs and GPUs. It performs hard particle Monte Carlo simulations of a variety of shape classes and molecular dynamics simulations of particles with a range of pair, bond, angle, and other potentials. Many features are targeted at the soft matter research community, though the code is general and capable of many types of particle simulations.

Resources

Related tools

  • freud: Analyze HOOMD-blue simulation results with the freud Python library.
  • signac: Manage your workflow with signac.

Example scripts

These examples demonstrate some of the Python API.

Hard particle Monte Carlo:

import hoomd

mc = hoomd.hpmc.integrate.ConvexPolyhedron()
mc.shape['octahedron'] = dict(vertices=[
    (-0.5, 0, 0),
    (0.5, 0, 0),
    (0, -0.5, 0),
    (0, 0.5, 0),
    (0, 0, -0.5),
    (0, 0, 0.5),
])

cpu = hoomd.device.CPU()
sim = hoomd.Simulation(device=cpu, seed=20)
sim.operations.integrator = mc
# See HOOMD tutorial for how to construct an initial configuration 'init.gsd'
sim.create_state_from_gsd(filename='init.gsd')

sim.run(1e5)

Molecular dynamics:

import hoomd

cell = hoomd.md.nlist.Cell()
lj = hoomd.md.pair.LJ(nlist=cell)
lj.params[('A', 'A')] = dict(epsilon=1, sigma=1)
lj.r_cut[('A', 'A')] = 2.5

integrator = hoomd.md.Integrator(dt=0.005)
integrator.forces.append(lj)
nvt = hoomd.md.methods.NVT(kT=1.5, filter=hoomd.filter.All(), tau=1.0)
integrator.methods.append(nvt)

gpu = hoomd.device.GPU()
sim = hoomd.Simulation(device=gpu)
sim.operations.integrator = integrator
# See HOOMD tutorial for how to construct an initial configuration 'init.gsd'
sim.create_state_from_gsd(filename='init.gsd')
sim.state.thermalize_particle_momenta(filter=hoomd.filter.All(), kT=1.5)

sim.run(1e5)

Change log

CHANGELOG.rst contains the full change log.

Contributing to HOOMD-blue

Contributions are welcomed via pull requests. Please report bugs and suggest feature enhancements via the issue tracker. See CONTRIBUTING.rst and ARCHITECTURE.md for more information.

License

HOOMD-blue is available under the 3-clause BSD license.

About

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.

http://glotzerlab.engin.umich.edu/hoomd-blue

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 66.0%Language:Cuda 16.5%Language:Python 15.7%Language:CMake 1.4%Language:NASL 0.3%Language:Jupyter Notebook 0.1%Language:Batchfile 0.1%Language:CSS 0.0%Language:HTML 0.0%Language:C 0.0%Language:Shell 0.0%