rogers.neighbors.bin_points¶
- rogers.neighbors.bin_points(n_mesh_div, pos, cell, celmsh, valid, max_count_cap)¶
Bin the points into their respective mesh-cells.
- Parameters:
n_mesh_div (tuple[int, int, int]) – (3,) Number of mesh divisions in each dimension
n_neighb_cell – (3,) Number of neighboring mesh cells in each dimension
pos (Float[Array, 'n 3']) – (n, 3) Positions of all points
cell (Float[Array, '3 3']) – (3, 3) Unit cell vectors, one per column
valid (Bool[Array, 'n']) – (n,) Whether each point is valid or padded
max_count_cap (int) – Static; maximum number of points per cell
celmsh (Float[Array, '3 3'])
- Returns:
(int) Actual max number of points per cell, to check overflows
(n, 3) In-mesh position of each point
(n, 3) Mesh-cell index of each point
(n,) Which atoms are valid with the new sorting
- (nm, max_count_cap) Indices of points in each cell, sorted for
locality
(n,) Mapping of new indices to old indices
- Return type:
tuple[int, Float[Array, ‘n 3’], Int[Array, ‘nm max_count_cap’]]