Skip to content
Command line interface for running simulations for small molecules with hoomd-blue.
Python Other
  1. Python 98.7%
  2. Other 1.3%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status Documentation Status codecov Anaconda-Server Badge Anaconda-Server Badge Code style: black

This is a set of scripts that use Hoomd to perform the Molecular dynamics simulations of a glass forming molecular liquid. There is a particular focus on understanding the dynamic properties of these molecules.

Note that this is still very early alpha software and there are likely to be large breaking changes that occur.


The simplest method of installation is using conda. To install

conda install malramsay::sdrun

It is also possible to set the repository up as a development environment, in which case cloning the repository and installing is possible by running

git clone
cd statdyn-simulation
conda env create
source activate sdrun-dev
pip install -e .

Once the environment is setup the tests can be run with


Running Simulations

Interaction with the program is currently through the command line, using the command line arguments to specify the various parameters. There are two types of parameters that can be specified.

The simulation options, which map to the internal SimulationParams class, which are the general properties of the simulation. These idea is that these options will be shared across all simulation types. The simulation options are specified after the sdrun portion of the command.

$ sdrun --temperature 0.4 --pressure 13.5 --num-steps 1000 --molecule trimer ...

The other option are the simulation specific options and arguments. These are specific to each simulation type. The simulation specific options are specified after the simulation type.

$ sdrun --temperature 0.4 --pressure 13.5 --num-steps 1000 --molecule trimer \
  create --interface interface.gsd

There is documentation on each of the options and arguments that can be specified in the help of the command.

To create a crystal structure for a simulation, the command

$ sdrun --space-group p2 --num-steps 1000 --temperature 0.4 create test.gsd

will generate a file which has a trimer molecule with a p2 crystal structure. The simulation will be run for 1000 steps at a temperature of 0.4.

The output file we created be equilibrated at a higher temperature using the command

$ sdrun --space-group p2 --num-steps 1000 --temperature 1.2 --init-temp 0.4 \
  equil --equil-type crystal test.gsd test-equil.gsd

which will gradually increase the temperature from 0.4 to 1.2 over 1000 steps with the final configuration output to test-1.2.gsd. This equilibration will use the equilibration type of crystal, allowing the simulation cell to tilt and adjusting the length of each side of the box independently. This is unlikely to equilibrate this configuration; however, it runs in a reasonable time.

A production simulation can be run with the prod sub-command

$ sdrun --space-group p2 --num-steps 1000 --temperature 1.2 --init-temp 0.4 \
  prod test-equil.gsd

This has a different series of options including outputting a series of timesteps optimised for the analysis of dynamics quantities in a file prefixed with trajectory-.

Another tool I have written, [sdanalysis][sdanalyis] can be used to easily analyse the resulting trajectories.

For running simulations with many different parameters, experi provides an easy to read yaml interface for running a series of command line scripts with a complex set of variables.

You can’t perform that action at this time.