HOOMD-blue is a general purpose particle simulation toolkit. 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. HOOMD-blue runs fast on NVIDIA GPUs, and can scale across thousands of nodes.

To use Hoomd, you need to load the appropriate modules (see below):
[abc123@gpu01 ~]$ module load python/3.7.2 cuda91/toolkit openmpi/3.0.0 intel-tbb-oss/intel64/2019_20180718oss

Here is a simple example:

import hoomd
from hoomd import md
hoomd.context.initialize()

# Create a 10x10x10 simple cubic lattice of particles with type name A
hoomd.init.create_lattice(unitcell=hoomd.lattice.sc(a=2.0, type_name='A'), n=10)

# Specify Lennard-Jones interactions between particle pairs
nl = md.nlist.cell()
lj = md.pair.lj(r_cut=3.0, nlist=nl)
lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0)

# Integrate at constant temperature
md.integrate.mode_standard(dt=0.005)
hoomd.md.integrate.langevin(group=hoomd.group.all(), kT=1.2, seed=4)

# Run for 10,000 time steps
hoomd.run(10e3)

[gqd693@gpu01 ~]$ python3 test_hoomd.py
[gpu01:28036] mca_base_component_repository_open: unable to open mca_oob_ud: libosmcomp.so.3: cannot open shared object file: No such file or directory (ignored)
[gpu01:28035] mca_base_component_repository_open: unable to open mca_oob_ud: libosmcomp.so.3: cannot open shared object file: No such file or directory (ignored)
[gpu01:28035] mca_base_component_repository_open: unable to open mca_btl_openib: libosmcomp.so.3: cannot open shared object file: No such file or directory (ignored)
HOOMD-blue v2.6.0-9-gfc6484e CUDA (9.1) DOUBLE HPMC_MIXED MPI TBB SSE SSE2
Compiled: 11/27/2019
Copyright (c) 2009-2019 The Regents of the University of Michigan.
-----
You are using HOOMD-blue. Please cite the following:
* J A Anderson, C D Lorenz, and A Travesset. "General purpose molecular dynamics
 simulations fully implemented on graphics processing units", Journal of
 Computational Physics 227 (2008) 5342--5359
* J Glaser, T D Nguyen, J A Anderson, P Liu, F Spiga, J A Millan, D C Morse, and
 S C Glotzer. "Strong scaling of general-purpose molecular dynamics simulations
 on GPUs", Computer Physics Communications 192 (2015) 97--107
-----
HOOMD-blue is running on the following GPU(s):
 [0] Tesla K80 13 SM_3.7 @ 0.823 GHz, 11441 MiB DRAM
test_hoomd.py:004 | hoomd.init.create_lattice(unitcell=hoomd.lattice.sc(a=2.0), n=5);
test_hoomd.py:004 | hoomd.init.create_lattice(unitcell=hoomd.lattice.sc(a=2.0), n=5);
notice(2): Group "all" created containing 125 particles
test_hoomd.py:005 | nl = hoomd.md.nlist.cell();
test_hoomd.py:006 | lj = hoomd.md.pair.lj(r_cut=2.5, nlist=nl);
test_hoomd.py:007 | lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0);
test_hoomd.py:008 | hoomd.md.integrate.mode_standard(dt=0.005);
test_hoomd.py:009 | all = hoomd.group.all();
test_hoomd.py:000 | import hoomd
import hoomd.md
hoomd.context.initialize("");
hoomd.init.create_lattice(unitcell=hoomd.lattice.sc(a=2.0), n=5);
nl = hoomd.md.nlist.cell();
lj = hoomd.md.pair.lj(r_cut=2.5, nlist=nl);
lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0);
hoomd.md.integrate.mode_standard(dt=0.005);
all = hoomd.group.all();
hoomd.md.integrate.langevin(group=all, kT=0.2, seed=42);hoomd.analyze.log(filename="log-output.log",
notice(2): integrate.langevin/bd is using specified gamma values
test_hoomd.py:010 | hoomd.md.integrate.langevin(group=all, kT=0.2, seed=42);hoomd.analyze.log(filename="log-output.log",
 quantities=['potential_energy', 'temperature'],
 period=100,
 overwrite=True);
test_hoomd.py:014 | hoomd.dump.gsd("trajectory.gsd", period=2e3, group=all, overwrite=True);
test_hoomd.py:015 | hoomd.run(1e4);
notice(2): -- Neighborlist exclusion statistics -- :
notice(2): Particles with 0 exclusions : 125
notice(2): Neighbors included by diameter : no
notice(2): Neighbors excluded when in the same body: no
** starting run **
Time 00:00:05 | Step 10000 / 10000 | TPS 8263.06 | ETA 00:00:00
Average TPS: 8262.36
---------
-- Neighborlist stats:
359 normal updates / 34 forced updates / 0 dangerous updates
n_neigh_min: 17 / n_neigh_max: 81 / n_neigh_avg: 46.08
shortest rebuild period: 17
-- Cell list stats:
Dimension: 3, 3, 3
n_min : 0 / n_max: 29 / n_avg: 4.62963
** run complete **

You can safely ignore the warning messages about mca_base_component_repository_open because we build our own OpenMPI statically.

-- AdminUser - 27 Nov 2019
Topic revision: r1 - 27 Nov 2019, AdminUser
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding UTSA Research Support Group? Send feedback