Simulate rounded, faceted shapes in molecular dynamics.

The DEM component provides forces which apply short-range, purely repulsive interactions between contact points of two shapes. The resulting interaction is consistent with expanding the given polygon or polyhedron by a disk or sphere of a particular rounding radius.

The pair forces located in hoomd.dem.pair behave like other hoomd pair forces, computing forces and torques for each particle based on its interactions with its neighbors. Also included are geometric helper utilities in hoomd.dem.utils.


When initializing systems, be sure to set the inertia tensor of DEM particles. Axes with an inertia tensor of 0 (the default) will not have their rotational degrees of freedom integrated. Because only the three principal components of inertia are given to hoomd, particle vertices should also be specified in the principal reference frame so that the inertia tensor is diagonal.


snap =,
snap.particles.moment_inertia[:] = (10, 10, 10)
system = hoomd.init.read_snapshot(snap)


To allow particles to rotate, use integrators which can update rotational degrees of freedom:

Note that the Nosé-Hoover thermostats used in and work by rescaling momenta and angular momenta. This can lead to instabilities in the start of the simulation if particles are initialized with 0 angular momentum and no neighbor interactions. Two easy fixes for this problem are to initialize each particle with some angular momentum or to first run for a few steps with or

Data Storage

To store trajectories of DEM systems, use a format that knows about anisotropic particles, such as:


hoomd.dem is stable. When upgrading from version 2.x to 2.y (y > x), existing job scripts that follow documented interfaces for functions and classes will not require any modifications. Maintainer: Matthew Spellings.