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. |
hull |
Convex hulls in N dimensions.
TYPE:
|
tolerance |
tolerance for the calculation.
TYPE:
|
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. |
RETURNS | DESCRIPTION |
---|---|
points_in_hull
|
FOP trimmed of points outside the convex hull defined by the protein. |
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. |
atoms_points |
coordinates of atoms within the field of points.
TYPE:
|
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:
|
RETURNS | DESCRIPTION |
---|---|
Sequence[Sequence[float]]
|
A field of points without atom clashes. |