tfep.utils.geometry.batchwise_rotate
- tfep.utils.geometry.batchwise_rotate(x, rotation_matrices, inverse=False)[source]
Rotate a batch of configurations with their respective rotation matrix.
- Parameters:
x (torch.Tensor) – A tensor of shape
(batch_size, n_vectors, 3).rotation_matrices (torch.Tensor) – A tensor of shape
(batch_size, 3, 3).inverse (bool, optional) – If
Truethe inverse rotation is performed.
- Returns:
y – A tensor of shape
(batch_size, n_vectors, 3))wherey[b][i]is the result of rotating vectorx[b][i]with the rotation matrixrotation_matrices[b].- Return type:
torch.Tensor