get_number_of_cell_repeats¶
- torch_sim.transforms.get_number_of_cell_repeats(cutoff, cell, pbc)[source]¶
- Determine the number of cell repeats required for a given
cutoff distance.
This function calculates how many times the unit cell needs to be repeated in each dimension to ensure that all interactions within the specified cutoff distance are accounted for, considering periodic boundary conditions (PBC).
- Parameters:
- Returns:
- A tensor of shape (n_cells, 3)
containing the number of repeats for each dimension, where non-PBC dimensions are set to zero.
- Return type: