waxmorph.torch.graph

waxmorph.torch.graph#

PyTorch graph features with detached contact topology.

Torch node and edge features retain autograd; contacts use a detached host snapshot. Warp arrays are also accepted.

Functions

build_edge_features(X, P, edge_index, ...[, ...])

Return geometric features for each directed edge.

build_edge_index(X, R, particle_count[, ...])

Return unpadded directed COO contacts with shape [2, E].

build_graph(X, P, R[, particle_count, c, ...])

Return (node_features, edge_index, edge_features).

build_node_features(c, particle_count[, device])

Return float concentrations as [N, C], promoting [N] to [N, 1].