xnn.common.data.neighborlist.half_list#

xnn.common.data.neighborlist.half_list(pos, cutoff, cell=None, pbc=None)[source]#

vesin’s half neighbor list: every pair within cutoff once, in either order, with an atom’s own periodic images, as ((i, j), shift); None where vesin does not apply (see unique_pairs()).

Parameters:
  • pos (Tensor) – Cartesian positions of shape (N, 3).

  • cutoff (float) – Neighbor cutoff radius.

  • cell (Tensor, optional) – Lattice vectors as rows, of shape (3, 3).

  • pbc (Tensor, optional) – Boolean periodicity flags of shape (3,).

Returns:

The atoms (2, M) and the integer image shifts (M, 3).

Return type:

tuple of Tensor, or None