HOOMD-blue tutorials and examples

Welcome to the HOOMD-blue example scripts. These jupyter notebooks demonstrate how to utilize the functionality of HOOMD-blue. You can view a static version of the notebooks at nbviewer. To download and execute these notebooks locally:

git clone https://bitbucket.org/glotzer/hoomd-examples.git
cd hoomd-examples
jupyter notebook index.ipynb

These examples use the following python packages. If you do not have the packages installed, some or all of the examples will fail to execute: HOOMD-blue, Jupyter, GSD, matplotlib, freud, fresnel, and pillow.

Getting started

See Notebook Basics and Running Code for tutorials on using jupyter itself.


HOOMD is a python package that provides a toolkit of commands to configure particle simulations. These tutorials demonstrate many commonly used features in HOOMD with fully functional and documented scripts that perform simulations and examine the output.

Initializing simulations

This section includes more detailed examples on execution context and system initialization.

Specifying particle interactions

This section includes short examples of a variety of HOOMD features that control how particles interact.

  • Molecular Dynamics
    • Multiple pair potentials
    • Bonds, angles, and dihedrals
    • Walls and constant forces
    • Long range electrostatics
    • Distance constraints
  • Hard particle Monte Carlo
    • Confining shapes in walls

Running simulations

This section includes examples showing how to control simulation execution.

Analyzing simulation output

These notebooks demonstrate simple analysis techniques on the output of HOOMD simulations.