relentless.simulate.HOOMD#
- class relentless.simulate.HOOMD(initializer, operations=None)#
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. Both HOOMD 2.x and 3.x are supported.
The freud analysis package (version 2.x) is also required for initialization and analysis. To use this simulation backend, you will need to install both
hoomdandfreudinto your Python environment.hoomdis available through conda-forge or can be built from source, while :mod`freud` is available through both PyPI and conda-forge. Please refer to the package documentation for details of how to install these.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.- Raises:
ImportError – If the
hoomdpackage is not found or is not version 2.x.ImportError – If the
freudpackage 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: