xnn.ffnn.models.geometry.excluded_pairs#
- xnn.ffnn.models.geometry.excluded_pairs(i, k, excl_index, n, B, module)[source]#
Whether each pair
(i, k)of a batch ofBcopies of a topology ofnatoms is one of its excluded pairsexcl_index(2, E)(in either order), looked up in their sorted keys (made once per batch size and device, cached onmodule).- Parameters:
i (Tensor) – Atom indices of the batch
(P,).k (Tensor) – Atom indices of the batch
(P,).excl_index (Tensor) – The excluded pairs
(2, E)of one structure.n (int) – Atoms per structure.
B (int) – Structures in the batch.
module (torch.nn.Module) – The model holding the cache.
- Returns:
(P,)booleans.- Return type:
Tensor