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' style restraint force, useful for aligning a receptor and
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: Topology,
mask: str,
config: FlatBottomRestraint,
) -> CustomExternalForce
Creates position restraints for all ligand atoms.
Parameters:
-
topology
(Topology
) –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' style restraint force, useful for aligning a receptor and ligand.
It applies to three receptor atoms (r1, r2, r3), and three ligand atoms (l1, l2, l3).
Namely, the following will be restrained:
* r3
-- l1
distance.
* (θ_a) r2
-- r3
-- l1
angle.
* (θ_b) r3
-- l1
-- l2
angle.
* (φ_a) r1
-- r2
-- r3
-- l1
dih.
* (φ_b) r2
-- r3
-- l1
-- l2
dih.
* (φ_c) r3
-- l1
-- l2
-- l3
dih.
Parameters:
-
config
(BoreschRestraint
) –The restraint configuration.
-
receptor_atoms
(tuple[int, int, int]
) –The indices of the three receptor atoms to restrain.
-
ligand_atoms
(tuple[int, int, int]
) –The indices of the three 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.