schrodinger.structutils.interactions.hbond module

Module for identifying hydrogen and halogen bond interactions.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.structutils.interactions.hbond.get_maestro_params(interaction_type)

Gets current Maestro preference values. Usage:

try:
    params = get_maestro_params(hbonds.HYDROGEN_BONDS)
except schrodinger.MaestroNotAvailableError:
    params = get_default_params(hbonds.HYDROGEN_BONDS)
pairs = get_donor_acceptor_bonds(params, st1, atoms1, st2, atoms2)

This attempts to read all current Maestro defaults. However, there is no current way to gaurantee that it is complete or exhaustive.

schrodinger.structutils.interactions.hbond.get_default_params(interaction_type)

Get query parameters for an interaction type.

schrodinger.structutils.interactions.hbond.get_hbond_params(max_dist: float = None, min_donor_angle: float = None, min_acceptor_angle: float = None, max_acceptor_angle: float = None) structure.AtomQueryParams

Return hydrogen bond AtomQueryParams object with the given criteria. :param max_dist: See get_hydrogen_bonds. :param min_donor_angle: See get_hydrogen_bonds. :param min_acceptor_angle: See get_hydrogen_bonds. :param max_acceptor_angle: See get_hydrogen_bonds. :return: AtomQueryParams with given hydrogen bond criteria.

schrodinger.structutils.interactions.hbond.get_hydrogen_bonds(st, atoms1=None, st2=None, atoms2=None, max_dist=None, min_donor_angle=None, min_acceptor_angle=None, max_acceptor_angle=None, honor_pbc=True)

Return hydrogen bonds meeting the specified threshold criteria. See get_interactions for details on how structure and atom set parameters are interpreted. Threshold values set to None will use the default values from structureinteraction.h

Parameters
  • st (structure.Structure) – Structure containing the two atom sets.

  • atoms1 – First set of atom indices to check within st. If not specified, all atoms will be used.

  • st2 (structure.Structure or None) – Structure containing the atoms specified in atoms2. If None, st will be used for both sets.

  • atoms2 (list of ints or structure._StructureAtom objects or None) – Second set of atom indices to check within st. If not specified, all atoms will be used.

  • max_dist (float) – Maximum allowable bond distance. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • min_donor_angle (float) – Minimum allowable donor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • min_acceptor_angle (float) – Minimum allowable acceptor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • max_acceptor_angle (float) – Maximum allowable acceptor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • honor_pbc (bool) – Honor Periodic Boundary Conditions, if defined as properties in the structure, and if st is equal to st2. Default is True.

Returns

A list of (donor atom object, acceptor atom object) for each hydrogen bond between the subsets of atoms.

Return type

list of (structure._StructureAtom, structure._StructureAtom) tuples

schrodinger.structutils.interactions.hbond.match_hbond(atom1, atom2, distance_max=None, donor_angle=None, acceptor_angle=None, honor_pbc=True)

Return whether atom1-atom2 represents an H-bond where either atom1 or atom2 is the acceptor heavy atom, and the other atom is the donor hydrogen.

NOTE: If you are searching for hbonds, it is almost certainly preferable to use get_hydrogen_bonds(st1, st2).

To match as hydrogen bond,
  1. the atom1-atom2 distance must be less than or equal to ‘distance_max’,

  2. the N-H..X angle must be at least ‘donor_angle’, and

  3. the H..X-Y angle must be at least ‘acceptor_angle’.

Parameters
  • atom1 (_StructureAtom) – First atom.

  • atom2 (_StructureAtom) – Second atom (either from the same or a different Structure.

  • distance_max (float) – Maximum accepted atom1-atom2 H-bond distance.

  • donor_angle (float) – Minimum accepted N-H..X angle.

  • acceptor_angle (float) – Minimum accepted H..X-Y angle.

  • honor_pbc (bool) – Honor Periodic Boundary Conditions, if defined as properties in the structure, and if both atoms are from the same CT.

Return type

bool

Returns

Does atom1-atom2 count as an H-bond under the criteria provided?

schrodinger.structutils.interactions.hbond.get_halogen_bonds(st, atoms1=None, st2=None, atoms2=None, max_dist=None, min_donor_angle=None, min_acceptor_angle=None, max_acceptor_angle=None, honor_pbc=True)

Return halogen bonds meeting the specified threshold criteria. See get_interactions for details on how structure and atom set parameters are interpreted. Threshold values set to None will use the default values from structureinteraction.h

Parameters
  • st (structure.Structure) – Structure containing the two atom sets.

  • atoms1 – First set of atom indices to check within st. If not specified, all atoms will be used.

  • st2 (structure.Structure or None) – Structure containing the atoms specified in atoms2. If None, st will be used for both sets.

  • atoms2 (list of ints or structure._StructureAtom objects or None) – Second set of atom indices to check within st. If not specified, all atoms will be used.

  • max_dist (float) – Maximum allowable bond distance. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • min_donor_angle (float) – Minimum allowable donor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • min_acceptor_angle (float) – Minimum allowable acceptor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • max_acceptor_angle (float) – Maximum allowable acceptor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • honor_pbc (bool) – Honor Periodic Boundary Conditions, if defined as properties in the structure, and if st is equal to st2. Default is True.

Returns

A list of (donor atom object, acceptor atom object) for each halogen bond between the subsets of atoms.

Return type

list of (structure._StructureAtom, structure._StructureAtom) tuples

schrodinger.structutils.interactions.hbond.get_aromatic_hydrogen_bonds(st, atoms1=None, st2=None, atoms2=None, max_dist=None, min_donor_angle=None, min_acceptor_angle=None, max_acceptor_angle=None, honor_pbc=True)

Return aromatic hydrogen bonds meeting the specified threshold criteria. See get_interactions for details on how structure and atom set parameters are interpreted. Threshold values set to None will use the default values from structureinteraction.h

Parameters
  • st (structure.Structure) – Structure containing the two atom sets.

  • atoms1 – First set of atom indices to check within st. If not specified, all atoms will be used.

  • st2 (structure.Structure or None) – Structure containing the atoms specified in atoms2. If None, st will be used for both sets.

  • atoms2 (list of ints or structure._StructureAtom objects or None) – Second set of atom indices to check within st. If not specified, all atoms will be used.

  • max_dist (float) – Maximum allowable bond distance. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • min_donor_angle (float) – Minimum allowable donor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • min_acceptor_angle (float) – Minimum allowable acceptor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • max_acceptor_angle (float) – Maximum allowable acceptor angle. If not specified, the Maestro preference default value will be used. (Not the current user setting).

  • honor_pbc (bool) – Honor Periodic Boundary Conditions, if defined as properties in the structure, and if st is equal to st2. Default is True.

Returns

A list of (donor atom object, acceptor atom object) for each hydrogen bond between the subsets of atoms.

Return type

list of (structure._StructureAtom, structure._StructureAtom) tuples

schrodinger.structutils.interactions.hbond.get_donor_acceptor_bonds(params, st, atoms1=None, st2=None, atoms2=None, honor_pbc=True)

Get the requested type of interactions

Parameters
  • params (list(schrodinger.infra.structure.AtomQueryParams)) – Parameters for accepting a donor/acceptor pair.

  • st (structure.Structure) – Structure containing the two atom sets.

  • atoms1 – First set of atom indices to check within st. If not specified, all atoms will be used.

  • st2 (structure.Structure or None) – Structure containing the atoms specified in atoms2. If None, st will be used for both sets.

  • atoms2 (list of ints or structure._StructureAtom objects or None) – Second set of atom indices to check within st. If not specified, all atoms will be used.

  • honor_pbc (bool) – Honor Periodic Boundary Conditions, if defined as properties in the structure, and if st is equal to st2. Default is True.

Returns

A list of (donor atom object, acceptor atom object) for each hydrogen bond between the subsets of atoms.

Return type

list of (structure._StructureAtom, structure._StructureAtom) tuples