Gridmesh
GridMesh(box, res)
¶
A class representing a box of equidistant points.
Initialize the class.
PARAMETER | DESCRIPTION |
---|---|
|
A numpy array representing two 3D points, (min_x, min_y, min_z) and (max_x, max_y, max_z), that define a box.
TYPE:
|
|
The space between the points of the box, in the X, Y, and Z direction.
TYPE:
|
points = np.array(list(zip(x.ravel(), y.ravel(), z.ravel())))
¶
write_pdbs = write_pdbs()
¶
__delete_limited_points(pt_indices)
¶
A support function
__keep_limited_points(pt_indices)
¶
A support function
__snap_float(val, res)
¶
Snaps an arbitrary point to the nearest grid point.
PARAMETER | DESCRIPTION |
---|---|
|
A numpy array corresponding to a 3D point.
TYPE:
|
|
The resolution (distance in the X, Y, and Z directions between adjacent points) of the grid.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
NDArray[float64]
|
A numpy array corresponding to a 3D point near val that is on a nearby grid point. |
__unique_points()
¶
Identifies unique points (rows) in an array of points.
PARAMETER | DESCRIPTION |
---|---|
|
A nx3 np.array representing 3D points.
|
RETURNS | DESCRIPTION |
---|---|
A nx2 np.array containing the 3D points that are unique. |
expand_around_existing_points(num_pts, reso)
¶
filter_isolated_points_until_no_change(reso, number_of_neighbors)
¶
remove_all_points_close_to_other_points(other_points, dist_cutoff, config)
¶
Removes all points in this box that come within the points specified in a numpy array
PARAMETER | DESCRIPTION |
---|---|
|
A numpy array containing the other points.
TYPE:
|
|
A float, the cutoff distance to use in determining whether or not box points will be removed.
TYPE:
|
|
Configuration object containing
TYPE:
|
remove_points_outside_convex_hull(hull, config)
¶
separate_out_pockets()
¶
Separate the points according to the pocket they belong to. Determined by looking at patches of contiguous points.
RETURNS | DESCRIPTION |
---|---|
list[NDArray[float64]]
|
A list of point arrays, each array corresponding to the points of a separate pocket. |
TaskGetClosePoints
¶
Bases: RayTaskGeneral
A class to identify box points that are near other, user-specified points.
process_item(item)
¶
Identifies indices of box points close to other points.
PARAMETER | DESCRIPTION |
---|---|
|
A tuple containing: - box_of_pts_distance_tree: KDTree of box points. - dist_cutoff: The cutoff distance. - other_points: Numpy array of other points.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
NDArray[float64]
|
A numpy array of unique indices of box points that are within dist_cutoff. |
TaskRemovePointsOutsideHull
¶
Bases: RayTaskGeneral
A class to remove points outside a convex hull using multiple processors.
process_item(item)
¶
Removes points outside the convex hull.
PARAMETER | DESCRIPTION |
---|---|
|
A tuple containing: - hull: The convex hull object. - some_points: A numpy array of points to be tested.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
NDArray[float64]
|
A numpy array of points that are inside the convex hull. |