peppr.BondLengthViolations#
- class peppr.BondLengthViolations(tolerance: float = 0.1, reference_bonds: Dict[Tuple[str, str], ndarray] | None = None)[source]#
Check for unusual bond lengths in the structure by comparing against reference values. Returns the percentage of bonds that are outside acceptable ranges.
- Parameters:
- tolerancefloat, optional
The tolerance in Angstroms for acceptable deviation from ideal bond lengths. Default is 0.1 Angstroms.
- reference_bondsdict, optional
Dictionary mapping atom type pairs to ideal bond lengths. If not provided, uses a default set of common bond lengths.
- 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 lengths.
- 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.