facade
Module containing an abstract base class for MD engine facades
- class MDMC.MD.engine_facades.facade.MDEngine[source]
Abstract base class for MD engine facades
- clear() None[source]
Deletes all atoms of the MD engine, restores all settings to their default values, and frees all memory.
- abstract convert_trajectory(start: int = 0, stop: int = None, step: int = 1, **settings: dict) CompactTrajectory[source]
Parses the trajectory from the
MDEngineformat into MDMC format- Parameters:
start (int) – The index of the first trajectory, inclusive.
stop (int) – The index of the last trajectory, exclusive.
step (int) – The step size between trajectories.
**settings –
scaled_positions(bool)If the
trajectory_filehas scaledpositionsatom_IDs(list)LAMMPS
IDof the atoms which should be included. If not passed then all atoms are included in the converted trajectory.
- Returns:
The
CompactTrajectoryfrom the most recent production simulation- Return type:
CompactTrajectory
- abstract minimize(n_steps: int, minimize_every: int = 10, **settings: dict) None[source]
Minimizes the simulation energy
- property parent_simulation: Simulation
Get or set the simulation that created this engine facade
- Returns:
The Simulation object that created this engine facade
- Return type:
Simulation
- abstract reset_config() None[source]
Resets the configuration of the simulation to that in
saved_config
- abstract run(n_steps: int, equilibration: bool) None[source]
Runs a simulation. Must follow a call to
setup_universe()andsetup_simulation().
- abstract property saved_config: Configuration
Get the saved configuration of the atomic positions
- Returns:
The atomic positions
- Return type:
Configuration
- abstract setup_simulation(**settings: dict) None[source]
Sets the options required to perform a simulation on a setup
Universe. Must follow a call tosetup_universe().- Parameters:
universe (Universe) – A molecular dynamics
Universewhich will be simulated in theMDEngine.settings** – The majority of these are generic but some are specific to the
MDEnginethat is being used.
- abstract setup_universe(universe: str, **settings: dict) None[source]
Creates a
Universe.configurationand populates withStructure- Parameters:
universe (Universe) – A molecular dynamics
Universewhich will be setup in theMDEngine.**settings – The majority of these are generic but some are specific to the
MDEnginethat is being used.
- property time_step: float
Get the simulation time step in
fsfrom the parent simulation- Returns:
Simulation time step in
fs- Return type:
float