xnn.common.models.les.intra_structure_pairs#

xnn.common.models.les.intra_structure_pairs(batch, num_graphs)[source]#

Every ordered pair (i, j), i != j, of atoms in the same structure.

Parameters:
  • batch (Tensor) – Structure index of each atom (N,), in any order.

  • num_graphs (int) – Number of structures.

Returns:

Atom indices i and j, each (sum_b n_b (n_b - 1),).

Return type:

tuple of Tensor