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 -> dwith vectorrand edged -> swith vector-r(the same periodic image seen from the other atom) are one bond: a radial network gives both the same weights.- Parameters:
edge_index (torch.Tensor) –
(2, E): senders and receivers.edge_vec (torch.Tensor) –
(E, 3): the edge vectors.
- Returns:
(rows, weight_index): one edge of each bond(E / 2,), and the bond of every edge(E,);Nonewhen some edge has no reverse (a half or an asymmetric list).- Return type:
tuple of (torch.Tensor, torch.Tensor) or None