deepfold.losses.violation.between_residue_clash_loss¶
- deepfold.losses.violation.between_residue_clash_loss(atom14_pred_positions: Tensor, atom14_atom_exists: Tensor, atom14_atom_radius: Tensor, residue_index: Tensor, overlap_tolerance_soft: float = 1.5, overlap_tolerance_hard: float = 1.5, eps: float = 1e-10) Dict[str, Tensor][source]¶
Loss to penalize steric clashes between residues.
This is a loss penalizing any steric clashes due to non bonded atoms in different peptides coming too close. This loss corresponds to the part with different residues of equation 46 (Supplementary ‘1.9.11 Structural violations’).
- Parameters:
atom14_pred_positions – Predicted positions of atoms in global prediction frame.
atom14_atom_exists – Mask denoting whether atom at positions exists for given amino acid type.
atom14_atom_radius – Van der Waals radius for each atom.
residue_index – Residue index for given amino acid.
overlap_tolerance_soft – Soft tolerance factor.
overlap_tolerance_hard – Hard tolerance factor.
- Returns:
‘mean_loss’: average clash loss
’per_atom_loss_sum’: sum of all clash losses per atom, shape (N, 14)
’per_atom_clash_mask’: mask whether atom clashes with any other atom shape (N, 14)
- Return type:
Dict containing