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 or None. If not None, only emit spheres that intersect with one of the “ligand” spheres.

  • radii – Radii of the ligand atoms or None. If not None, number of the radii must be equal to the number of ligand_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 is True, returns a tuple of numpy.ndarray instances holding positions and vdW radii of the atoms. Returns a single numpy.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 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)
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

property delta