xnn.common.data.grid_pairs.grid_pairs_staged#
- xnn.common.data.grid_pairs.grid_pairs_staged(pos, cutoff, lengths, shape, span, cap, out=None, half=False)[source]#
The pairs
i < kwithincutofffrom one search on the CPU (xnn.common.cpu_kernels): each atom’s partners incapslots of its own, with the index of their image among the 27 shifts of -1, 0, 1 per axis ((s_x + 1) 9 + (s_y + 1) 3 + s_z + 1, the displacementpos[k] - pos[i] + shift * lengths).half: each pair once in the row of one of its atoms,klower thanitoo (half the candidates).- Returns:
The counts
(N,)(int32), the partners(N (cap + 1),)(int32) and their image indices (int8), atomi’s fromi (cap + 1)(in the buffersoutwhere given, at least that long), orNonewhen an atom has more thancappartners or the positions spread over 1.5 edges on an axis (a pair’s shift may then be beyond -1, 0, 1).- Return type:
tuple or None
- Parameters: