simulate
#
Run OpenMM simulations.
Modules:
-
femto
–A comprehensive toolkit for predicting free energies
Functions:
-
simulate_state
–Simulate a system following the specified
stages
, at a given 'state' (i.e. -
simulate_states
–Simulate the system at each 'state' using
simulate_state
.
simulate_state
#
simulate_state(
system: System,
topology: Structure,
state: dict[str, float],
stages: list[SimulationStage],
platform: OpenMMPlatform,
reporter: OpenMMStateReporter | None = None,
enforce_pbc: bool = False,
) -> State
Simulate a system following the specified stages
, at a given 'state' (i.e.
a set of context parameters, such as free energy lambda values)
Parameters:
-
system
(System
) –The system to simulate.
-
topology
(Structure
) –The topology to simulate.
-
state
(dict[str, float]
) –The state to simulate at.
-
stages
(list[SimulationStage]
) –The stages to run.
-
platform
(OpenMMPlatform
) –The accelerator to use.
-
reporter
(OpenMMStateReporter | None
, default:None
) –The reporter to use to record system statistics such as volume and energy.
-
enforce_pbc
(bool
, default:False
) –Whether to enforce periodic boundary conditions when retrieving the final coordinates.
Returns:
-
State
–The final coordinates and box vectors.
Source code in femto/md/simulate.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
simulate_states
#
simulate_states(
system: System,
topology: Structure,
states: list[dict[str, float]],
stages: list[SimulationStage],
platform: OpenMMPlatform,
reporter: OpenMMStateReporter | None = None,
enforce_pbc: bool = False,
) -> list[State]
Simulate the system at each 'state' using simulate_state
.
If running using MPI, each process will be responsible for simulating at a subset of the states.
Parameters:
-
system
(System
) –The system to simulate.
-
topology
(Structure
) –The topology of the system to simulate.
-
states
(list[dict[str, float]]
) –The states of the system to simulate.
-
stages
(list[SimulationStage]
) –The stages to run.
-
platform
(OpenMMPlatform
) –The accelerator to use.
-
reporter
(OpenMMStateReporter | None
, default:None
) –The reporter to use to record system statistics such as volume and energy.
-
enforce_pbc
(bool
, default:False
) –Whether to enforce periodic boundary conditions when retrieving the final coordinates.
Returns:
-
list[State]
–The final coordinates at each state.