peppr.PocketVolumeOverlap#
- class peppr.PocketVolumeOverlap(voxel_size: float = 0.5)[source]#
Calculates the discretized volume overlap (DVO) between the reference and pose ligand. [1]
It is defined as the intersection of the reference and pose ligand volume divided by the union of the volumes. The volume of an atom is a sphere with radius equal to the Van-der-Waals radius. If multiple ligands are present, the average DVO is calculated.
- Parameters:
- voxel_sizefloat, optional
The size of the voxels used for the DVO calculation. The computation becomes more accurate with smaller voxel sizes, but the run time scales inverse cubically with voxel size.
References
- evaluate(reference: AtomArray, pose: AtomArray) float #
Apply this metric on the given predicted pose with respect to the given reference.
ABSTRACT: Must be overridden by subclasses.
- Parameters:
- referenceAtomArray, shape=(n,)
The reference structure of the system. Each separate instance/molecule must have a distinct chain_id.
- poseAtomArray, shape=(n,)
The predicted pose. Must have the same length and atom order as the reference.
- Returns:
- float
The metric computed for each pose. NaN, if the structure is not suitable for this metric.
Notes
Missing atoms in either the reference or the pose can be identified with NaN values.
- smaller_is_better() bool #
Whether as smaller value of this metric is considered a better prediction.
ABSTRACT: Must be overridden by subclasses.
- Returns:
- bool
If true, a smaller value of this metric is considered a better prediction. Otherwise, a larger value is considered a better prediction.