get_linear_bin_idx¶
- torch_sim.transforms.get_linear_bin_idx(cell, pos, n_bins_s)[source]¶
Calculate the linear bin index for each position within a defined box.
This function computes the linear bin index for each position based on the provided cell vectors and the number of bins in each direction. The positions are first scaled according to the cell dimensions, and then the corresponding bin indices are determined.
- Parameters:
- Returns:
A tensor containing the linear bin indices for each position.
- Return type: