HOOMD-blue data#

GSD files from the simulation software HOOMD-blue can be loaded with amep.traj.load and the keyword argument mode='hoomd'. The instructions on how to store the simulation data with HOOMD-blue, can be found on their documentation or directly in their examples. At the bottom of this page, we show a brief excerpt of the HOOMD-blue examples, showing the the necessary Python code to create a gsd_writer.

AMEP uses the hoomd module of the python package gsd, the documentation of which can be found here.

Both, HOOMD-blue and the gsd python package, are developed by the Glotzer Group. More information can also be found on their GitHub glotzerlab.

import hoomd

cpu = hoomd.device.CPU()
simulation = hoomd.Simulation(device=cpu, seed=12)

# set up simulation

gsd_writer = hoomd.write.GSD(
    filename="trajectory.gsd", trigger=hoomd.trigger.Periodic(1000), mode="xb"
)
simulation.operations.writers.append(gsd_writer)

# run simulation

gsd_writer.flush()