Message Passing

Message Pack Blocks

Message packing and equivariant linear/tensor pathways between node and edge features.

Defines MessagePackBlock and related building blocks for radially weighted tensor products in HamGNN layers.

class hamgnn.nn.message_passing.MessagePackBlock(irreps_node_feats, irreps_edge_feats, irreps_local_env_edge, irreps_out, irreps_edge_scalars, radial_MLP=[64, 64], use_kan=False, lite_mode=False)[source]

Bases: Module

forward(node_feats_src, node_feats_dst, edge_feats, local_env_edge, edge_scalars)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class hamgnn.nn.message_passing.MessagePackBlockV2(irreps_node_feats, irreps_edge_feats, irreps_local_env_edge, irreps_out, irreps_edge_scalars, radial_MLP=[64, 64], use_kan=False)[source]

Bases: Module

forward(node_feats_src, node_feats_dst, edge_feats, local_env_edge, edge_scalars)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.