Skip to content

Clean

Algorithms to clean a field of points.

point_in_hull(point, hull, tolerance=1e-12)

Determines if a point is contained in a hull. A point is in the hull if and only if for every equation (describing the facets), the dot product between the point and the normal vector (eq[:-1]) plus the offset (eq[-1]) is less than or equal to zero. You may want to compare to a small, positive constant tolerance = 1e-12 rather than to zero because of issues of numerical precision (otherwise, you may find that a vertex of the convex hull is not in the convex hull).

PARAMETER DESCRIPTION
point

coordinates of the point to be considered.

TYPE: Sequence[float]

hull

Convex hulls in N dimensions.

TYPE: ConvexHull

tolerance

tolerance for the calculation.

TYPE: float DEFAULT: 1e-12

RETURNS DESCRIPTION
bool

Returns True if point in hull, False otherwise

remove_convex_fop(fop_trimmed, trimmed_alpha)

Uses a convex hull to trim points from the field of points that are outside of the protein pocket.

PARAMETER DESCRIPTION
fop

Field of points XYZ coordinates with no atom clashes.

trimmed_alpha

alpha atoms to define the convex hull.

TYPE: Sequence[Sequence[float]]

RETURNS DESCRIPTION
points_in_hull

FOP trimmed of points outside the convex hull defined by the protein.

TYPE: Sequence[Sequence[float]]

remove_fop_atom_clash(fop, atoms_points, vdw_radius=2.6)

Removes points that clash with atoms within the field of points.

PARAMETER DESCRIPTION
fop

Field of points XYZ coordinates.

TYPE: Sequence[Sequence[float]]

atoms_points

coordinates of atoms within the field of points.

TYPE: list of lists

vdw_radius

Van der Waals radius for atoms to detect clashes. Defaults to the van der Waals radius of water and that of hydrogen atom.

TYPE: float DEFAULT: 2.6

RETURNS DESCRIPTION
Sequence[Sequence[float]]

A field of points without atom clashes.