xnn.common.models.electrostatics.dense_pairs#

xnn.common.models.electrostatics.dense_pairs(pos, batch)[source]#

Every atom pair as dense (N, N) matrices, without a host synchronization.

Parameters:
  • pos (Tensor) – Positions (N, 3).

  • batch (Tensor) – Structure index per atom (N,).

Returns:

The squared distances (the diagonal at one, a finite placeholder) and the mask of the distinct pairs of one structure, (N, N) each.

Return type:

tuple of Tensor