restraints
#
Create OpenMM restraint forces.
Functions:
-
create_flat_bottom_restraint–Creates a flat bottom position restraint.
-
create_position_restraints–Creates position restraints for all ligand atoms.
-
create_boresch_restraint–Creates a Boresch restraint force useful in aligning a receptor and ligand.
create_flat_bottom_restraint
#
create_flat_bottom_restraint(
config: FlatBottomRestraint, coords: dict[int, Quantity]
) -> CustomExternalForce
Creates a flat bottom position restraint.
Parameters:
-
config(FlatBottomRestraint) –The restraint configuration.
-
coords(dict[int, Quantity]) –A dictionary of indices of atoms to restrain and the corresponding coordinates to restrain them to.
Returns:
-
CustomExternalForce–The restraint force.
Source code in femto/md/restraints.py
create_position_restraints
#
create_position_restraints(
topology: Structure,
mask: str,
config: FlatBottomRestraint,
) -> CustomExternalForce
Creates position restraints for all ligand atoms.
Parameters:
-
topology(Structure) –The topology of the system being simulation.
-
mask(str) –The mask that defines which atoms to restrain.
-
config(FlatBottomRestraint) –The restraint configuration.
Returns:
-
CustomExternalForce–The created restraint force.
Source code in femto/md/restraints.py
create_boresch_restraint
#
create_boresch_restraint(
config: BoreschRestraint,
receptor_atoms: tuple[int, int, int],
ligand_atoms: tuple[int, int, int],
coords: Quantity,
ctx_parameter: str | None = None,
) -> CustomCompoundBondForce
Creates a Boresch restraint force useful in aligning a receptor and ligand.
Parameters:
-
config(BoreschRestraint) –The restraint configuration.
-
receptor_atoms(tuple[int, int, int]) –The indices of the receptor atoms to restrain.
-
ligand_atoms(tuple[int, int, int]) –The indices of the ligand atoms to restrain.
-
coords(Quantity) –The coordinates of the full system.
-
ctx_parameter(str | None, default:None) –An optional context parameter to use to scale the strength of the restraint.
Returns:
-
CustomCompoundBondForce–The restraint force.