runner
#
Run calculations defined by a config.
Classes:
-
PreparedSystem
–A container for the prepared inputs for a particular solvent phase.
Functions:
-
setup
–Prepare each system to be simulated, namely the ligand in each solvent.
-
run_eq
–Perform a simulation at each lambda window and for each solvent.
-
run_neq
–Performs the simulations required to estimate the free energy using a
PreparedSystem
#
Bases: NamedTuple
A container for the prepared inputs for a particular solvent phase.
Attributes:
setup
#
setup(
system: System,
config: Config,
force_field: ForceField | SystemGenerator,
custom_alchemical_potential: str | None = None,
) -> tuple[PreparedSystem, PreparedSystem]
Prepare each system to be simulated, namely the ligand in each solvent.
Parameters:
-
system
(System
) –The system to prepare.
-
config
(Config
) –The config defining the calculation to perform.
-
force_field
(ForceField | SystemGenerator
) –The force field, or a callable that transforms an OpenFF topology into an OpenMM system, without any alchemical modifications to run the calculations using.
If a callable is specified, it should take arguments of an OpenFF topology, a unit wrapped numpy array of atom coords, and a string literal with a value of either
"solvent-a"
or"solvent-b"
. -
custom_alchemical_potential
(str | None
, default:None
) –A custom expression to use for the potential energy function that describes the chemical-alchemical intermolecular interactions.
See the
absolv.fep.apply_fep
function for more details.
Returns:
-
tuple[PreparedSystem, PreparedSystem]
–The two prepared systems, corresponding to solvent-a and solvent-b respectively.
Source code in absolv/runner.py
run_eq
#
run_eq(
config: Config,
prepared_system_a: PreparedSystem,
prepared_system_b: PreparedSystem,
platform: OpenMMPlatform = femto.md.constants.OpenMMPlatform.CUDA,
output_dir: Path | None = None,
) -> Result
Perform a simulation at each lambda window and for each solvent.
Parameters:
-
config
(Config
) –The config defining the calculation to perform.
-
prepared_system_a
(PreparedSystem
) –The prepared system a. See
setup
for more details. -
prepared_system_b
(PreparedSystem
) –The prepared system b. See
setup
for more details. -
platform
(OpenMMPlatform
, default:CUDA
) –The OpenMM platform to run using.
-
output_dir
(Path | None
, default:None
) –The (optional) directory to save HREMD samples to.
Source code in absolv/runner.py
run_neq
#
run_neq(
config: Config,
prepared_system_a: PreparedSystem,
prepared_system_b: PreparedSystem,
platform: OpenMMPlatform = femto.md.constants.OpenMMPlatform.CUDA,
) -> Result
Performs the simulations required to estimate the free energy using a non-equilibrium method.
These include equilibrium simulations at the two end states (i.e. fully interacting and fully de-coupled solute) for each solvent followed by non-equilibrium switching simulations between each end state to compute the forward and reverse work values.
Parameters:
-
config
(Config
) –The config defining the calculation to perform.
-
prepared_system_a
(PreparedSystem
) –The prepared system a. See
setup
for more details. -
prepared_system_b
(PreparedSystem
) –The prepared system b. See
setup
for more details. -
platform
(OpenMMPlatform
, default:CUDA
) –The OpenMM platform to run using.