compute_cell_shifts¶
- torch_sim.transforms.compute_cell_shifts(cell, shifts_idx, batch_mapping)[source]¶
Compute the cell shifts based on the provided indices and cell matrix.
This function calculates the shifts to apply to positions based on the specified indices and the unit cell matrix. If the cell is None, it returns None.
- Parameters:
- Returns:
- A tensor of shape (n_batches, 3) containing
the computed cell shifts.
- Return type: