hoomd.util

Overview

make_example_simulation

Make an example Simulation object.

Details

Utilities.

hoomd.util.make_example_simulation(device=None, dimensions=3, particle_types=['A'], mpcd_types=None)

Make an example Simulation object.

The simulation state contains two particles at positions (-1, 0, 0) and (1, 0, 0).

Parameters:
  • device (hoomd.device.Device) – The device to use. Create a hoomd.device.CPU when None.

  • dimensions (int) – Number of dimensions (2 or 3).

  • particle_types (list[str]) – Particle type names.

  • mpcd_types (list[str]) – If not None, also create two MPCD particles, and include these type names in the snapshot.

Returns:

The simulation object.

Return type:

hoomd.Simulation

Note

make_example_simulation is intended for use in the documentation and other minimal working examples. Use hoomd.Simulation directly in other cases.

Example:

simulation = hoomd.util.make_example_simulation()