relentless.simulate.Simulation#
- class relentless.simulate.Simulation(initializer, operations=None)#
Simulation engine.
A simulation engine interprets a sequence of
SimulationOperations into a set of commands or parameters that are executed by backend software. The easiest backend software to work with will have a Python interface so that the operation commands can be passed through to Python commands. However, in-house or legacy software may require creation of input files, etc. that are executed by other binaries or programs.When the simulation is
run(), aSimulationInstanceis created that can hold specific data or parameters associated with the operations. Hence, a singleSimulationcan be run multiple times, e.g., with varied inputs, to obtain different outputSimulationInstances.- Parameters:
initializer (
InitializationOperation) – Operation to initialize the simulation.operations (array_like) – Sequence of
SimulationOperations to call.
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: