starling.structure.coordinates.loss_function
- loss_function(original_distance_matrix, coords)[source]
Function to compute the loss between the original distance matrix and the computed distance matrix.
- Parameters:
original_distance_matrix (torch.Tensor) – A tensor of shape (n, n) containing the original pairwise distances between n points.
coords (torch.Tensor) – A tensor of shape (n, 3) containing the 3D coordinates of n points.
- Returns:
The mean squared error between the original and computed distance matrices, considering only the upper triangle.
- Return type: