xnn.gnn.models.aimnet2.neighbor_matrix#

xnn.gnn.models.aimnet2.neighbor_matrix(edge_index, num_nodes)[source]#

The edges of every center as rows of a padded matrix: (nb_edge, nb_src).

Row i lists the edges into atom i (nb_edge, padded with E) and their neighbors (nb_src, padded with N), (N, M) for the largest number of neighbors M; the padding indexes a zero row appended to the gathered tensors.

Parameters:
Return type:

Tuple[Tensor, Tensor]