xnn.gnn.fast.conv.edge_pairs#

xnn.gnn.fast.conv.edge_pairs(edge_index, edge_vec)[source]#

The two directions of every bond, when each edge has its reverse.

Edge s -> d with vector r and edge d -> s with vector -r (the same periodic image seen from the other atom) are one bond: a radial network gives both the same weights.

Parameters:
Returns:

(rows, weight_index): one edge of each bond (E / 2,), and the bond of every edge (E,); None when some edge has no reverse (a half or an asymmetric list).

Return type:

tuple of (torch.Tensor, torch.Tensor) or None