Public API

View Module Index

sire.restraints.bond(*args, **kwargs)[source]

Synonym for distance(), as a bond restraint is treated the same as a distance restraint

sire.restraints.boresch(mols, receptor, ligand, kr=None, ktheta=None, kphi=None, r0=None, theta0=None, phi0=None, name=None, map=None, temperature=298 K)[source]

Create a set of Boresch restraints that will restrain the 6 external degrees of freedom of the ligand relative to the receptor. All of the atoms in both ‘ligand’ and ‘receptor’ must be contained in ‘mols’.

The BoreschRestraint will be a set of six restraints between three identified ligand atoms, and three identified receptor atoms:

  1. A single distance restraint, with specified force constant (kr) and equilibrium distance (r0) parameters.

  2. Two angle restraints, with specified force constants (ktheta) and equilibrium angles (theta0) parameters.

  3. Three torsion restraints, with specified force constants (kphi)

    and equilibrium angles (phi0) parameters.

This will create a single BoreschRestraint, which will be passed back in a BoreschRestraints object.

Parameters:
  • mols (sire.system._system.System) – The system containing the receptor and ligand.

  • receptor (SireMol::Selector<SireMol::Atom>) – The receptor atoms to restrain.

  • ligand (SireMol::Selector<SireMol::Atom>) – The ligand atoms to restrain.

  • kr (str or SireUnits::Dimension::GeneralUnit, optional) – The force constant for the distance restraint. If None, this will default to 10 kcal mol-1 A-2. Default is None.

  • ktheta (str or SireUnits::Dimension::GeneralUnit or list of str or SireUnits::Dimension::GeneralUnit, optional) – The force constants for the angle restraints, in the order kthetaA, kthetaB If None, this will default to 100 kcal mol-1 rad-2 for both angle restraints. If a list, then this should be a list of length 2 containing the force constants for the two angle restraints. If a single value, then this will be used for both angle restraints. Default is None.

  • kphi (str or SireUnits::Dimension::GeneralUnit or list of str or SireUnits::Dimension::GeneralUnit, optional) – The force constants for the torsion restraints, in the order kthetaA, kthetaB, kthetaC. If None, this will default to 100 kcal mol-1 rad-2 for all three torsion restraints. If a list, then this should be a list of length 3 containing the force constants for the three torsion restraints. If a single value, then this will be used for all three torsion restraints. Default is None.

  • r0 (str or SireUnits::Dimension::GeneralUnit, optional) – The equilibrium distance for the distance restraint. If None, this will be measured from the current coordinates of the atoms. Default is None.

  • theta0 (list of str or SireUnits::Dimension::GeneralUnit, optional) – The equilibrium angles for the angle restraints. If None, these will be measured from the current coordinates of the atoms. If a list, then this should be a list of length 2 containing the equilibrium angles for the two angle restraints. Default is None.

  • phi0 (list of str or SireUnits::Dimension::GeneralUnit, optional) – The equilibrium angles for the torsion restraints. If None, these will be measured from the current coordinates of the atoms. If a list, then this should be a list of length 3 containing the equilibrium angles for the three torsion restraints. Default is None.

  • name (str, optional) – The name of the restraint. If None, then a default name will be used. Default is None.

  • map (dict, optional) – A dictionary of additional options. Note that any options set in this dictionary that are also specified via one of the arguments above will be overridden by the argument value

  • temperature (str or SireUnits::Dimension::GeneralUnit, optional) – The temperature to use when checking for unstable restraints. If None, then this will default to 298 K. Default is None.

Returns:

BoreschRestraints – A container of Boresch restraints, where the first restraint is the BoreschRestraint created. The Boresch restraint created can be extracted with BoreschRestraints[0].

Return type:

SireMM::BoreschRestraints

Examples

Create a set of Boresch restraints for the ligand in the system ‘system’, specifying all of the force constants and equilibrium values:

>>> my_boresch_restraints = boresch(
>>>     system,
>>>     receptor=system["protein"]["atomidx 1538 or atomidx 1518 or atomidx 1540"],
>>>     ligand=system["resname LIG"]["atomidx 4 or atomidx 3 or atomidx 5"],
>>>     kr="6.2012 kcal mol-1 A-2",
>>>     ktheta=["28.7685 kcal mol-1 rad-2", "24.8204 kcal mol-1 rad-2"],
>>>     kphi=["59.8626 kcal mol-1 rad-2", "0.7923 kcal mol-1 rad-2", "55.1775 kcal mol-1 rad-2"],
>>>     r0="7.687 A",
>>>     theta0=["1.3031 rad", "1.4777 rad"],
>>>     phi0=["2.5569 rad", "2.9359 rad", "1.4147 rad"],
>>> )
>>> my_boresch_restraint = my_boresch_restraints[0]
sire.restraints.distance(mols, atoms0, atoms1, r0=None, k=None, name=None, map=None)[source]

Create a set of distance restraints from all of the atoms in ‘atoms0’ to all of the atoms in ‘atoms1’ where all atoms are contained in the container ‘mols’, using the passed values of the force constant ‘k’ and equilibrium bond length r0.

These restraints will be per atom-atom distance. If a list of k and/or r0 values are passed, then different values could be used for different atom-atom distances (assuming the same number as the number of atom-atom distances). Otherwise, all atom-atom distances will use the same parameters.

If r0 is None, then the current atom-atom distance for each atom-atom pair will be used as the equilibium value.

If k is None, then a default value of 150 kcal mol-1 A-2 will be used

sire.restraints.get_standard_state_correction(restraint, temperature=300 K)[source]

Get the entropic correction for releasing a given restraint to the standard state volume at a given temperature.

Parameters:
  • restraint (sire.legacy.MM._MM.BoreschRestraint) – The restraint for which to calculate the standard state correction.

  • temperature (sire.legacy.Units._Units.GeneralUnit, optional) – The temperature at which to calculate the standard state correction.

Returns:

correction – The standard state correction for the given restraint.

Return type:

sire.legacy.Units._Units.GeneralUnit

Examples

To create a Boresch restraint and calculate the standard state correction:

>>> # Create the Boresch restraints object.
>>> my_boresch_restraints = boresch(
>>>     system,
>>>     receptor=system["protein"]["atomidx 1538 or atomidx 1518 or atomidx 1540"],
>>>     ligand=system["resname LIG"]["atomidx 4 or atomidx 3 or atomidx 5"],
>>>     kr="6.2012 kcal mol-1 A-2",
>>>     ktheta=["28.7685 kcal mol-1 rad-2", "24.8204 kcal mol-1 rad-2"],
>>>     kphi=["59.8626 kcal mol-1 rad-2", "0.7923 kcal mol-1 rad-2", "55.1775 kcal mol-1 rad-2"],
>>>     r0="7.687 A",
>>>     theta0=["1.3031 rad", "1.4777 rad"],
>>>     phi0=["2.5569 rad", "2.9359 rad", "1.4147 rad"],
>>> )
>>>
>>> # Extract the single Boresch restraint from the Boresch restraints.
>>> my_boresch_restraint = my_boresch_restraints[0]
>>>
>>> # Calculate the standard state correction for the Boresch restraint.
>>> standard_state_correction = get_standard_state_correction(my_boresch_restraint)
>>> print(standard_state_correction)
sire.restraints.positional(mols, atoms, k=None, r0=None, position=None, name=None, map=None)[source]

Create a set of position restraints for the atoms specified in ‘atoms’ that are contained in the container ‘mols’, using the passed values of the force constant ‘k’ and flat-bottom potential well-width ‘r0’ for the restraints.

These restraints will be per atom. If a list of k and/or r0 values are passed, then different values could be used for different atoms (assuming the same number as the number of atoms). Otherwise, all atoms will use the same parameters.

If ‘r0’ is not specified, then a simple harmonic restraint is used.

If ‘k’ is not specified, then a default of 150 kcal mol-1 A-2 will be used.