xnn.gnn.models.aimnet2.shell_sums#

xnn.gnn.models.aimnet2.shell_sums(nodes, gsv, nb_edge, nb_src, weight)[source]#

The scalar sums (N, C, S) and vector norms (N, C, H) of ShellConvolution.

The neighbors of every center as rows of a padded matrix (neighbor_matrix()): one gather of the per-atom quantity (N, C, S) and one of gsv (E, S, 4) (the radial basis and its products with the unit bond vector) onto it, and the four shell sums as one contraction over the neighbors, a batched matrix product. Every channel is independent, so the convolutions of several quantities run as one over their channels stacked (with their weights stacked).

Parameters:
Return type:

Tuple[Tensor, Tensor]