xnn.gnn.models.mace.U_matrix_real#
- xnn.gnn.models.mace.U_matrix_real(irreps_in, irreps_out, correlation, normalization='component', filter_ir_mid=None, dtype=None)[source]#
Symmetric coupling basis of
correlationcopies ofirreps_in->irreps_out.Assembles the generalized Clebsch-Gordan
Ubasis for the MACE symmetric contraction: it couplescorrelationcopies ofirreps_in(via_wigner_nj()) and stacks the paths reaching each target irrep along a trailingn_pathsaxis. The result is bit-identical tomace-torch.- Parameters:
irreps_in (e3nn.o3.Irreps) – The input irreps;
correlationcopies are coupled together.irreps_out (e3nn.o3.Irreps) – The target output irreps to keep coupling paths for.
correlation (int) – Correlation order (number of copies of
irreps_into couple), i.e. the body order minus one. Whencorrelation == 4the intermediate irreps are filtered (upstream restriction) for tractability.normalization ({"component", "norm"}, optional) – Clebsch-Gordan normalization convention passed through to
_wigner_nj(). Defaults to"component".filter_ir_mid (list of e3nn.o3.Irrep or None, optional) – Intermediate-irrep filter passed to
_wigner_nj(); overridden internally whencorrelation == 4.dtype (torch.dtype or None, optional) – Dtype for the coupling tensors.
Noneuses the tensor default.
- Returns:
Alternating
[ir, U, ir, U, ...]pairs, one per contiguous run of coupling paths reaching an irrep ofirreps_out; eachUhas shape([out.dim,] in.dim, ..., in.dim, n_paths)(leading output axis squeezed away for scalar outputs, so callers typically take the final element). When no coupling path exists, a single[label, zeros]pair with one all-zero path is returned instead.- Return type: