schrodinger.structutils.interactions.salt_bridge module¶
Find salt-bridge interactions.
Examples¶
Find all salt bridge interactions within a protein:
st = structure.Structure.read("protein.mae.gz")
for atom1, atom2 in get_salt_bridges(st):
print(f"Salt bridge between atoms {atom1.index} and {atom2.index}")
Find all salt bridges within a single protein chain:
st = structure.Structure.read("protein.mae.gz")
atoms = st.chain["C"].getAtomIndices()
for atom1, atom2 in get_salt_bridges(st, atoms):
print(f"Salt bridge between atoms {atom1.index} and {atom2.index}")
Find all salt bridges between a protein and a ligand:
with StructureReader("protein_and_ligand.mae.gz") as reader:
prot, lib = reader
for atom1, atom2 in get_salt_bridges(prot, struc2=lig):
print(f"Salt bridge between atoms {atom1.index} and {atom2.index}")
-
class
schrodinger.structutils.interactions.salt_bridge.
OrderBy
¶ Bases:
enum.Enum
An enumeration.
-
AnionCation
= 1¶
-
InputOrder
= 2¶
-
__class__
¶ alias of
enum.EnumMeta
-
__members__
= mappingproxy(OrderedDict([('AnionCation', <OrderBy.AnionCation: 1>), ('InputOrder', <OrderBy.InputOrder: 2>)]))¶
-
__module__
= 'schrodinger.structutils.interactions.salt_bridge'¶
-
-
schrodinger.structutils.interactions.salt_bridge.
get_salt_bridges
(struc1, group1=None, struc2=None, group2=None, cutoff=5, order_by=<OrderBy.AnionCation: 1>, honor_pbc=True)¶ Calculate all salt bridges within or between the specified atoms. If struc2 or group2 are given, then this function will return salt bridges between the two structures/groups of atoms. If neither struc2 nor group2 are given, then this function will return salt bridges within a single structure/group of atoms.
Parameters: - struc1 (
schrodinger.structure.Structure
) – The structure to analyze - group1 (list) – The list of atom indices in
struc1
to analyze. If not given, all atoms in struc1 will be analyzed. - struc2 (
schrodinger.structure.Structure
) – The second structure to analyze. Ifgroup2
is given butstruc2
is not, thenstruc1
will be used. - group2 (list) – The list of atom indices in
struc2
to analyze. Ifstruc2
is given butgroup2
is not, then all atoms instruc2
will be analyzed. - cutoff (float) – The maximum distance allowed for salt bridges
- order_by (
OrderBy
) – How the returned salt bridge atom should be ordered. IfOrderBy.AnionCation
, then each salt bridge will be returned as a tuple of (anion atom, cation atom). IfOrderBy.InputOrder
, then each salt bridge will be returned as a tuple of (atom from struc1/group1, atom from struc2/group2).
Returns: A list of salt bridges, where each salt bridge is represented by a tuple of two
schrodinger.structure._StructureAtom
objects.Return type: list
- struc1 (
-
class
schrodinger.structutils.interactions.salt_bridge.
SaltBridgeFinder
(cutoff=4.0)¶ Bases:
object
DEPRECATED because it is inconsistent with Maestro.
Use get_salt_bridges() instead
-
PROT_CATIONS
= {'ARG': {'NH1', 'NH2'}, 'HID': {'NE2'}, 'HIE': {'ND1'}, 'HIS': {'NE2'}, 'LYS': {'NZ'}}¶
-
PROT_ANIONS
= {'ASP': {'OD1', 'OD2'}, 'GLU': {'OE1', 'OE2'}}¶
-
STANDARD_AAS
= {'HID', 'PRO', 'CYS', 'PHE', 'HIP', 'HIS', 'ASN', 'NMA', 'LYS', 'MET', 'VAL', 'ILE', 'ASP', 'LEU', 'TYR', 'GLN', 'SER', 'GLU', 'ARG', 'ACE', 'HIE', 'THR', 'TRP', 'ALA', 'GLY'}¶
-
RES_TO_IGNORE
= {'HOH'}¶
-
__init__
(cutoff=4.0)¶ DEPRECATED for get_salt_bridges()
Parameters: cutoff (float) – The maximum distance allowed for salt bridges
-
classmethod
find
(struc1, group1=None, struc2=None, group2=None, cutoff=4.0, ignore_same_res=True)¶ DEPRECATED for get_salt_bridges()
Parameters: - struc1 (
schrodinger.structure.Structure
) – The structure to analyze - group1 (list) – The list of atoms in
struc1
to analyze. If not given, all atoms in struc1 will be analyzed. - struc2 (
schrodinger.structure.Structure
) – The second structure to analyze. Ifgroup2
is given butstruc2
is not, thenstruc1
will be used. - group2 (list) – The list of atoms in
struc2
to analyze. Ifstruc2
is given butgroup2
is not, then all atoms instruc2
will be analyzed. - cutoff (float) – The maximum distance allowed for salt bridges
- ignore_same_res (bool) – If True, salt bridges between atoms within the same residue will be ignored. If False, these salt bridges will be returned as normal. This option has no effect if struc2 or group2 are given. In those cases, the two structures/groups of atoms are assumed to be non-overlapping, so this option is irrelevant and no salt bridges are ignored. Also note that, if this option if False, there is no within-bonds restriction on salt bridges (ex. If there is an anion covalently bound to a cation, the pair will be returned as a salt bridge.)
Returns: An iterator that provides pairs of atoms involved in salt bridges
Return type: iter
Note: If group2 are given and struc2 is None, then group1 and group2 are assumed to be non-overlapping. If these two lists contain the same atoms, then salt bridges may be returned twice.
- struc1 (
-
calculateInter
(struc1, group1, struc2, group2)¶ Return an iterator that provides salt bridges between two groups of atoms
Parameters: - struc1 (
schrodinger.structure.Structure
) – The first structure to analyze - group1 (list) – The list of atoms in
struc1
to analyze - struc2 (
schrodinger.structure.Structure
) – The second structure to analyze - group2 (list) – The list of atoms in
struc2
to analyze
Returns: An iterator that provides salt bridge atoms as a tuple of (atom index from group1, atom index from group2)
Return type: iter
- struc1 (
-
calculateIntra
(struc, atoms, ignore_same_res=True)¶ Return an iterator that provides salt bridges within a group of atoms
Parameters: - struc (
schrodinger.structure.Structure
) – The structure to analyze - atoms (list) – The list of atoms
- ignore_same_res (bool) – If True, salt bridges between atoms within the same residue will be ignored. If False, these salt bridges will be returned as normal. Note that, if this option if False, there is no within-bonds restriction on salt bridges (ex. If there is an anion covalently bound to a cation, the pair will be returned as a salt bridge.)
Returns: An iterator that provides salt bridge atoms as a tuple of two atom indices
Return type: iter
- struc (
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.structutils.interactions.salt_bridge', '__doc__': '\n DEPRECATED because it is inconsistent with Maestro.\n\n Use get_salt_bridges() instead\n ', 'PROT_CATIONS': {'LYS': {'NZ'}, 'ARG': {'NH1', 'NH2'}, 'HID': {'NE2'}, 'HIE': {'ND1'}, 'HIS': {'NE2'}}, 'PROT_ANIONS': {'GLU': {'OE1', 'OE2'}, 'ASP': {'OD1', 'OD2'}}, 'STANDARD_AAS': {'HID', 'PRO', 'CYS', 'PHE', 'HIP', 'HIS', 'ASN', 'NMA', 'LYS', 'MET', 'VAL', 'ILE', 'ASP', 'LEU', 'TYR', 'GLN', 'SER', 'GLU', 'ARG', 'ACE', 'HIE', 'THR', 'TRP', 'ALA', 'GLY'}, 'RES_TO_IGNORE': {'HOH'}, '_warned': False, '__init__': <function SaltBridgeFinder.__init__>, 'find': <classmethod object>, 'calculateInter': <function SaltBridgeFinder.calculateInter>, 'calculateIntra': <function SaltBridgeFinder.calculateIntra>, '_findChargedAtoms': <function SaltBridgeFinder._findChargedAtoms>, '_checkAtomCharge': <function SaltBridgeFinder._checkAtomCharge>, '_sumPartialCharges': <function SaltBridgeFinder._sumPartialCharges>, '_safeExtend': <function SaltBridgeFinder._safeExtend>, '_sbIterator': <function SaltBridgeFinder._sbIterator>, '_sameRes': <function SaltBridgeFinder._sameRes>, '__dict__': <attribute '__dict__' of 'SaltBridgeFinder' objects>, '__weakref__': <attribute '__weakref__' of 'SaltBridgeFinder' objects>})¶
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.structutils.interactions.salt_bridge'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
__weakref__
¶ list of weak references to the object (if defined)
-