deepfold.losses.violation.extreme_ca_ca_distance_violations¶
- deepfold.losses.violation.extreme_ca_ca_distance_violations(pred_atom_positions: Tensor, pred_atom_mask: Tensor, residue_index: Tensor, max_angstrom_tolerance: float = 1.5, eps: float = 1e-06) Tensor[source]¶
Counts residues whose Ca is a large distance from its neighbour.
Measures the fraction of CA-CA pairs between consecutive amino acids that are more than ‘max_angstrom_tolerance’ apart.
- Parameters:
pred_atom_positions – Atom positions in atom37/14 representation
pred_atom_mask – Atom mask in atom37/14 representation
residue_index – Residue index for given amino acid, this is assumed to be monotonically increasing.
max_angstrom_tolerance – Maximum distance allowed to not count as violation.
- Returns:
Fraction of consecutive CA-CA pairs with violation.