schrodinger.structutils.interactions.pi module¶
A module for detecting pi-pi and pi-cation interactions.
Code example for pi-cation interactions:
from schrodinger.structutils import interactions
from schrodinger import structure
recep = None
for struct in structure.StructureReader(input_file):
if not recep:
recep = struct
# Precalculate receptor rings and cations to save time
rings = interactions.gather_rings(recep)
cations = interactions.get_receptor_positive_centroids(recep)
else:
picats = interactions.find_pi_cation_interactions(recep,
rings1=rings, cations1=cations,
struct2=struct)
Code example for pi-pi interactions:
from schrodinger.structutils import interactions
from schrodinger import structure
recep = None
for struct in structure.StructureReader(input_file):
if not recep:
recep = struct
# Precalculate receptor rings to save time
rings = interactions.gather_rings(recep)
else:
pipi = interactions.find_pi_pi_interactions(recep,
rings1=rings, struct2=struct)
-
schrodinger.structutils.interactions.pi.
squared_centroid_distance
(cent1, cent2)¶ Compute the squared distance between two centroids. Using the squared distance saves the sqrt compute cycles.
Parameters: - cent1 (Centroid object) – first centroid
- cent2 (Centroid object) – second centroid
Return type: float
Returns: the squared distance between the two centroids.
-
schrodinger.structutils.interactions.pi.
unit_vector_points
(a, b)¶
-
schrodinger.structutils.interactions.pi.
unit_vector
(vec)¶
-
class
schrodinger.structutils.interactions.pi.
Centroid
(atoms, xyz)¶ Bases:
object
The object that stores data about a centroid
-
__init__
(atoms, xyz)¶ Create a Centroid object
Parameters: - atoms (list of int) – the atom numbers involved in the centroid
- xyz (list of float) – the XYZ coordinates of the centroid
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.structutils.interactions.pi', '__doc__': '\n The object that stores data about a centroid\n ', '__init__': <function Centroid.__init__>, '__dict__': <attribute '__dict__' of 'Centroid' objects>, '__weakref__': <attribute '__weakref__' of 'Centroid' 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.pi'¶
-
__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)
-
-
class
schrodinger.structutils.interactions.pi.
CationPiInteraction
(cation_structure, pi_structure, cation_centroid, pi_centroid)¶ Bases:
object
The object that stores the data for a Cation-Pi interaction
-
__init__
(cation_structure, pi_structure, cation_centroid, pi_centroid)¶ Create a CationPiInteraction object
Parameters: - cation_structure (schrodinger.structure.Structure object) – structure that contains the cation
- pi_structure (schrodinger.structure.Structure object) – structure that contains the pi group
- cation_centroid (Centroid object) – Centroid of the positive charge
- pi_centroid (Centroid object) – Centroid of the pi group
- distance (float) – distance between the centroids
- angle (float) – angle in degrees between the centroids
-
cation_structure
= None¶ Ivar: structure that contains the cation Type: schrodinger.structure.Structure object
-
pi_structure
= None¶ Ivar: structure that contains the pi group Type: schrodinger.structure.Structure object
-
cation_centroid
= None¶ Ivar: Centroid of the positive charge Type: Centroid object
-
pi_centroid
= None¶ Ivar: Centroid of the pi group Type: Centroid object
-
distance
¶ Ivar: distance between the centroids Type: float
-
angle
¶ Ivar: angle in degrees between the centroids Type: float
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.structutils.interactions.pi', '__doc__': '\n The object that stores the data for a Cation-Pi interaction\n ', '__init__': <function CationPiInteraction.__init__>, 'distance': <property object>, 'angle': <property object>, '__dict__': <attribute '__dict__' of 'CationPiInteraction' objects>, '__weakref__': <attribute '__weakref__' of 'CationPiInteraction' 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.pi'¶
-
__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)
-
-
class
schrodinger.structutils.interactions.pi.
PiPiInteraction
(struct1, struct2, ring1, ring2, face_to_face)¶ Bases:
object
The object that stores the data for a Pi-Pi interaction
-
__init__
(struct1, struct2, ring1, ring2, face_to_face)¶ Create a PiPiInteraction object
Parameters: - struct1 (schrodinger.structure.Structure object) – structure that contains the first ring
- struct2 (schrodinger.structure.Structure object) – structure that contains the second ring
- ring1 (Centroid object) – Centroid of the first ring
- ring2 (Centroid object) – Centroid of the second ring
- distance (float) – distance between the centroids
- angle (float) – angle in degrees between the two ring planes
- face_to_face (bool) – True if the interaction is face to face, False if it is edge to face
-
distance
¶ Returns: distance between the centroids Return type: float
-
angle
¶ Returns: angle in degrees between the centroids Return type: float
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.structutils.interactions.pi', '__doc__': '\n The object that stores the data for a Pi-Pi interaction\n ', '__init__': <function PiPiInteraction.__init__>, 'distance': <property object>, 'angle': <property object>, '__dict__': <attribute '__dict__' of 'PiPiInteraction' objects>, '__weakref__': <attribute '__weakref__' of 'PiPiInteraction' 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.pi'¶
-
__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)
-
-
schrodinger.structutils.interactions.pi.
find_pi_cation_interactions
(struct1, struct2=None, rings1=None, rings2=None, skip_unknown=None, params=None, honor_pbc=True)¶ Determine if any positive centers are within a specified distance cutoff of any aromatic ring centroids. For those positive center/ring contacts, determine if the positive center is located on the face of the ring rather than the edge.
Code example:
import interactions from schrodinger import structure recep = None for struct in structure.StructureReader(input_file): if not recep: recep = struct # Precalculate receptor rings and cations to save time rings = interactions.gather_rings(recep) cations = interactions.get_receptor_positive_centroids(recep) else: picats = interactions.find_pi_cation_interactions(recep, rings1=rings, cations1=cations, struct2=struct)
Parameters: - struct1 (schrodinger.structure.Structure object) – Receptor structure if for a ligand-receptor complex, or the first of two structures to compute pi-cations for
- struct2 (schrodinger.structure.Structure object) – Ligand structure if for a ligand-receptor complex, or the second of two structures, or None if the first structure should be search for intramolecular interactions.
- rings1 (list of SSSR (from gather_rings)) – SSSR of struct1. If not passed, will be computed.
- rings2 (list of SSSR (from gather_rings)) – SSSR of struct2. If not passed, will be computed.
- skip_unknown – UNUSED and deprecated.
- params (schrodinger.infra.structure.PiCationParams or NoneType) – Detailed parameters controlling the interaction criteria. If None, then the default values will be used.
Return type: list
Returns: list of CationPiInteraction interaction objects:: # CationPiInteraction properties: cation_structure: structure that contains the cation pi_structure: structure that contains the pi group cation_centroid: Centroid of the positive charge pi_centroid: Centroid of the pi group distance: distance between the centroids angle: angle in degrees between the centroids
-
schrodinger.structutils.interactions.pi.
gather_rings
(astruct, atom_subset=None)¶
-
schrodinger.structutils.interactions.pi.
find_pi_pi_interactions
(struct1, struct2=None, rings1=None, rings2=None, params=None, honor_pbc=True)¶ Find all pi-pi interactions between the rings in struct1 and struct2 (or within struct1 if only 1 structure is given). Interactions are classified as to whether they are face-to-face or edge-to-face.
Code example:
import interactions from schrodinger import structure recep = None for struct in structure.StructureReader(input_file): if not recep: recep = struct # Precalculate receptor rings to save time rings = interactions.gather_rings(recep) else: pipi = interactions.find_pi_pi_interactions(recep, rings1=rings, struct2=struct)
Parameters: - struct1 (schrodinger.structure.Structure object) – first of two structures to compute pi-pi interactions for
- struct2 (schrodinger.structure.Structure object) – second of two structures to compute pi-pi interactions for. If not given, struct1 will be searched for intramolecular interactions.
- rings1 (list of SSSR (from gather_rings)) – SSSR of struct1 If not passed, will be computed.
- rings2 (list of SSSR (from gather_rings)) – SSSR of struct2. If not passed, will be computed.
- params (schrodinger.infra.structure.PiPiParams or NoneType) – Detailed parameters controlling the interaction criteria. If None, then the default values will be used.
Return type: list of PiPiInteraction objects
Returns: a PiPiInteraction object for each interaction found.