deepfold.losses.geometry.supervised_chi_loss

deepfold.losses.geometry.supervised_chi_loss(angles_sin_cos: Tensor, unnormalized_angles_sin_cos: Tensor, aatype: Tensor, seq_mask: Tensor, chi_mask: Tensor, chi_angles_sin_cos: Tensor, chi_weight: float, angle_norm_weight: float, eps: float = 1e-06) Tensor[source]

Torsion Angle Loss.

Supplementary ‘1.9.1 Side chain and backbone torsion angle loss’: Algorithm 27 Side chain and backbone torsion angle loss.

Parameters:
  • angles_sin_cos – Predicted angles. [*, N, 7, 2]

  • unnormalized_angles_sin_cos – [*, N, 7, 2] The same angles, but unnormalized.

  • aatype – Residue indices. [*, N]

  • seq_mask – Sequence mask. [*, N]

  • chi_mask – Angle mask. [*, N, 7]

  • chi_angles_sin_cos – Ground truth angles. [*, N, 7, 2]

  • chi_weight – Weight for the angle component of the loss.

  • angle_norm_weight – Weight for the normalization component of the loss.

Returns:

Torsion angle loss tensor.