peppr.BondAngleViolations#

class peppr.BondAngleViolations(tolerance: float = 0.2)[source]#

Check for unusual bond angles in the structure by comparing against idealized bond geometry. Returns the percentage of bonds that are outside acceptable ranges.

This approach does not measure directly bond angles, but rather checks the distance between the atoms A and C in the bond angle ABC.

Parameters:
tolerancefloat, optional

The relative tolerance for acceptable deviation from ideal distances.

Notes

Violations across residues are not considered.

evaluate(reference: AtomArray, pose: AtomArray) float#

Calculate the percentage of bonds that are outside acceptable ranges.

Parameters:
referenceAtomArray

Not used in this metric as we compare against ideal bond angles.

poseAtomArray

The structure to evaluate.

Returns:
float

Percentage of bonds outside acceptable ranges (0.0 to 1.0).

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.