clustering

computeDistance(pose1, pose2)

Compute distance between two poses.

BSAS(poses, dist_cutoff)

BSAS clustering from a list of poses.

computeDistance(pose1: DockingPP.pose.Pose, pose2: DockingPP.pose.Pose) → float

Compute distance between two poses. The distance is the distance between the center of mass of each pose, calculated from the translation vector.

Parameters
Returns

The distance between the two poses

Return type

float

BSAS(poses: List[DockingPP.pose.Pose], dist_cutoff: float) → Dict[DockingP.pose.Pose, List[DockingPP.pose.Pose]]

BSAS clustering from a list of poses. Browse the poses in the given order and add the pose to the first cluster where the distance between the pose and the representative pose of the cluster is below given distance cutoff. If the pose can’t be added to any cluster, a new one is created.

Parameters
  • poses (List[DockingPP.pose.Pose]) – List of poses to cluster.

  • dist_cutoff (float) – Distance cutoff below which a pose is assigned to a cluster.

Returns

Dictionary that stores the clusters. It has representative pose object as key and list of other poses object in the cluster as value.

Return type

Dict[DockingPP.pose.Pose, List[DockingPP.pose.Pose]]