schrodinger.application.bindingsite.cavutils module¶
Utilities to find cavities in groups of atoms and cover them with grids.
-
schrodinger.application.bindingsite.cavutils.
dist3
(a, b)¶
-
schrodinger.application.bindingsite.cavutils.
surfnet_gaps_supplier
(centers, radii, min_radius=1.0, max_radius=4.0, ligand_centers=None, ligand_radii=None)¶ Generator of the “gap” spheres obtained using SURFNET algorithm:
Roman A.Laskowski
“SURFNET: A program for visualizing molecular surfaces, cavities, and intermolecular interactions”
https://doi.org/10.1016/0263-7855(95)00073-9
A sphere is placed so that the two given atoms are on opposite sides of the sphere’s surface. If the sphere contains any other atoms, it is reduced in size until no more atoms are contained. Only spheres with a radius of 1 to 4 angstrom are kept. The result of this procedure is a number of separate groups of interpenetrating spheres, called gap regions, both inside the protein and on its surface, which correspond to the protein’s cavities and clefts.
Parameters: - centers (
numpy.ndarray
) – Positions of the spheres to be considered. - radii (
numpy.ndarray
) – Radii of the spheres to be considered. - min_radius (float) – Smallest allowed radius of the “gap” sphere.
- max_radius (float) – Largest allowed radius of the “gap” sphere.
- ligand_centers (
numpy.ndarray
) – Position of ligand atoms orNone
. If notNone
, only emit spheres that intersect with one of the “ligand” spheres. - radii – Radii of the ligand atoms or
None
. If notNone
, number of the radii must be equal to the number ofligand_centers
.
- centers (
-
schrodinger.application.bindingsite.cavutils.
get_surfnet_gaps
(centers, radii, min_radius=1.0, max_radius=4.0)¶ Merges spheres generated by
surfnet_gaps_supplier()
into connected groups (clefts).Returns: List of clefts. Each cleft is a list of ((x, y, z), radius)
tuples. Clefts are sorted by their size in discending order.Return type: list(list(tuple))
-
schrodinger.application.bindingsite.cavutils.
get_atom_positions
(atoms, want_radii=True)¶ If
want_radii
isTrue
, returns a tuple ofnumpy.ndarray
instances holding positions and vdW radii of the atoms. Returns a singlenumpy.ndarray
holding the coordinates otherwise.Parameters: atoms (container of schrodinger.structure._StructureAtom
) – Container of atoms.Returns: Positions (and vdW radii) of the atoms. Return type: (numpy.ndarray, numpy.ndarray) or numpy.ndarray
-
schrodinger.application.bindingsite.cavutils.
get_com_and_axes
(spheres)¶ Calculates centroid and principal axes of the spheres.
Parameters: spheres (container of ((x, y, z), radius)) – Spheres to be considered. Returns: Center of mass and principal axes of the spheres. Return type: tuple(numpy.ndarray, numpy.ndarray)
-
schrodinger.application.bindingsite.cavutils.
get_grid_parameters
(spheres, com=None, axes=None, step=0.5, border=0.5)¶ Determines parameters of the grid necessary to cover the spheres.
Parameters: - spheres (container of ((x, y, z), radius)) – The spheres to be considered.
- com (
numpy.ndarray
) – Center of mass of the spheres (or None). - axes (
numpy.ndarray
) – 3x3 matrix whose columns hold principal axes of the spheres. - step (float) – Grid step.
- border (float) – Border around the spheres.
Returns: Grid size, origin and vectors.
Return type: ((int, int, int), numpy.ndarray, numpy.ndarray)
-
class
schrodinger.application.bindingsite.cavutils.
Cavity
(spheres)¶ Bases:
schrodinger.application.bindingsite.cavutils._UnionOfSpheres
-
__init__
(spheres)¶ Parameters: spheres (container of (pos, radius) tuples) – Spheres that define the cavity.
-
__class__
¶ alias of
builtins.type
-
__contains__
(pos)¶ Check whether point
pos
is inside one of the spheres in the union.
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.bindingsite.cavutils', '__init__': <function Cavity.__init__>, '__doc__': None})¶
-
__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.application.bindingsite.cavutils'¶
-
__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)
-
intersects
(pos, radius)¶ Check whether the sphere of given
radius
with center atpos
intersects with one of the spheres in the union.
-
-
class
schrodinger.application.bindingsite.cavutils.
Grid
(origin, vectors)¶ Bases:
object
Maps grid indices to Cartesian coordinates using provided grid origin and unit vectors.
-
__init__
(origin, vectors)¶ Initialize self. See help(type(self)) for accurate signature.
-
__call__
(ijk)¶ Call self as a function.
-
indicesToPositions
(indices)¶ Returns positions for the indices as single
numpy.ndarray
.Parameters: indices (container) – Container of triples of integers. Returns: Array of positions. Return type: numpy.ndarray
-
delta
¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dict__
= mappingproxy({'__module__': 'schrodinger.application.bindingsite.cavutils', '__doc__': '\n Maps grid indices to Cartesian coordinates using provided\n grid origin and unit vectors.\n ', '__init__': <function Grid.__init__>, '__call__': <function Grid.__call__>, 'indicesToPositions': <function Grid.indicesToPositions>, 'delta': <property object>, '__dict__': <attribute '__dict__' of 'Grid' objects>, '__weakref__': <attribute '__weakref__' of 'Grid' 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.application.bindingsite.cavutils'¶
-
__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)
-