- class openfe.protocols.openmm_septop.equil_septop_method.SepTopComplexSetupUnit(*, protocol: Protocol, stateA: ChemicalSystem, stateB: ChemicalSystem, alchemical_components: dict[str, list[Component]], generation: int = 0, repeat_id: int = 0, name: str | None = None)#
Protocol Unit for the complex phase of a SepTop free energy calculation
- Parameters:
protocol (gufe.Protocol) – protocol used to create this Unit. Contains key information such as the settings.
stateA (ChemicalSystem) – ChemicalSystem containing the components defining the state at lambda 0.
stateB (ChemicalSystem) – ChemicalSystem containing the components defining the state at lambda 1.
alchemical_components (dict[str, Component]) – the alchemical components for each state in this Unit
name (str, optional) – Human-readable identifier for this Unit
repeat_id (int, optional) – Identifier for which repeat (aka replica/clone) this Unit is, default 0
generation (int, optional) – Generation counter which keeps track of how many times this repeat has been extended, default 0.
- get_system_AB(solv_comp: SolventComponent, system_modeller_A: Modeller, smc_comps_AB: dict[SmallMoleculeComponent, Molecule], smc_off_B: dict[SmallMoleculeComponent, Molecule], settings: dict[str, SettingsBaseModel])#
Creates an OpenMM system, topology, positions, and modeller for a complex system that contains a protein and two ligands. This takes the modeller of complex A (solvated protein-ligand A complex) and inserts ligand B into that complex.
- Parameters:
solv_comp (SolventComponent) – The SolventComponent
system_modeller_A (openmm.app.Modeller) –
smc_comps_AB (dict[SmallMoleculeComponent,OFFMolecule]) – The dictionary of all SmallMoleculeComponents in the system.
smc_off_B (dict[SmallMoleculeComponent,OFFMolecule]) – The dictionary of the SmallMoleculeComponent and OFF Molecule of ligand B
settings (dict[str, SettingsBaseModel]) – A dictionary of settings objects for the unit.
- Returns:
omm_system_AB (openmm.System)
omm_topology_AB (openmm.app.Topology)
positions_AB (openmm.unit.Quantity)
system_modeller_AB (openmm.app.Modeller)
- run(dry=False, verbose=True, scratch_basepath=None, shared_basepath=None) dict[str, Any]#
Run the SepTop free energy calculation.
- Parameters:
dry (bool) – Do a dry run of the calculation, creating all necessary alchemical system components (topology, system, sampler, etc…) but without running the simulation, default False
verbose (bool) – Verbose output of the simulation progress. Output is provided via INFO level logging, default True
scratch_basepath (pathlib.Path) – Path to the scratch (temporary) directory space.
shared_basepath (pathlib.Path) – Path to the shared (persistent) directory space.
- Returns:
Outputs created in the basepath directory or the debug objects (i.e. sampler) if
dry==True.- Return type:
- static check_assign_velocities_with_virtual_site(system: System, integrator_settings: IntegratorSettings)#
Virtual sites sanity check - ensure we restart velocities when there are virtual sites in the system
- Parameters:
system (openmm.System) – The OpenMM System being checked.
integrator_settings (IntegratorSettings) – Multistate sampler integrator settings.
- Raises:
* If the system has a virtual site but the integrator settings specify – that velocities are not reassigned.
- property dependencies: list[ProtocolUnit]#
All units that this unit is dependent on (parents)
- execute(*, context: Context, raise_error: bool = False, **inputs) ProtocolUnitResult | ProtocolUnitFailure#
Given ProtocolUnitResult s from dependencies, execute this ProtocolUnit.
- Parameters:
context (Context) – Execution context for this ProtocolUnit; includes e.g.
sharedandscratchPath s.raise_error (bool) – If True, raise any errors instead of catching and returning a ProtocolUnitFailure default False
**inputs – Keyword arguments giving the named inputs to _execute. These can include ProtocolUnitResult objects from ProtocolUnit objects this unit is dependent on.
- static get_smc_comps(alchem_comps: dict[str, list[Component]], smc_comps: dict[SmallMoleculeComponent, Molecule]) tuple[dict[SmallMoleculeComponent, Molecule], dict[SmallMoleculeComponent, Molecule], dict[SmallMoleculeComponent, Molecule]]#
- get_system(solv_comp: SolventComponent, prot_comp: ProteinComponent, smc_comp: dict[SmallMoleculeComponent, Molecule], settings: dict[str, SettingsBaseModel])#
Creates an OpenMM system, topology, positions, modeller and also residue IDs of the different components
- Parameters:
solv_comp (SolventComponent) –
prot_comp (Optional[ProteinComponent]) –
smc_comp (dict[SmallMoleculeComponent,OFFMolecule]) –
settings (dict[str, SettingsBaseModel]) – A dictionary of settings object for the unit.
- Returns:
omm_system (openmm.app.System)
omm_topology (openmm.app.Topology)
positions (openmm.unit.Quantity)
system_modeller (openmm.app.Modeller)
comp_resids (dict[Component, npt.NDArray]) – A dictionary of residues for each component in the System.