relentless.simulate.HOOMD#
- class relentless.simulate.HOOMD(initializer, operations=None, device='auto')#
Simulation using HOOMD-blue.
A simulation is performed using HOOMD-blue. HOOMD-blue is a molecular dynamics program that can execute on both CPUs and GPUs, as a single process or with MPI parallelism. The launch configuration will be automatically selected for you when the simulation is run. HOOMD 2.x, 3.x, and 4.x are supported.
Warning
HOOMD requires that tabulated pair potentials be finite. A common place to have an infinite value is at \(r=0\), since potentials like
LennardJonesdiverge there. You should make sure to exclude these values from the tabulated potentials, e.g., settingrminto a small value larger than 0.- Parameters:
initializer (
SimulationOperation) – Operation that initializes the simulation.operations (array_like) –
SimulationOperationto execute for run. Defaults toNone, which means nothing is done after initialization.device (str) – Device to execute on. Values are “cpu” (run on CPU), “gpu” (run on GPU), and “auto” (default, select best available).
- Raises:
ImportError – If the
hoomdpackage is not found or is not version 2.x.
Methods
run(potentials, directory)Run the simulation operations.
Attributes
Initialization operation.
The operations to be performed during a simulation run.
- property initializer#
Initialization operation.
- Type:
InitializationOperation
- run(potentials, directory)#
Run the simulation operations.
A new simulation instance is created to perform the run. It is intended to be destroyed at the end of the run to prevent memory leaks.
- Parameters:
potentials (
Potentials) – The interaction potentials.directory (str or
Directory) – Directory for output.
- Returns:
The simulation instance after the operations are performed.
- Return type: