e3j.core.SymmetricContraction¶
- class e3j.core.SymmetricContraction(source_irreps: str, correlation: int, keep_irrep_out: str, num_species: int, num_channels: int, layout: str | Layout, l_max: int | None = None, config: Config | None = None)¶
Contracts the power expansion of E3-features with index-wise weights,
B(A, i) = W[i] @ (A + (A ⊗ A) + … + A**(⊗ ν))
where:
νis the correlation order (typically lower than 4),A : (N, C, D)is an array ofD-dimensional E3-features,i : (N,)is the vector of species indices0 <= i < S,Wstores one(S, C, m_out, m_in)weight per block oflinear_blocks, passed explicitly to__call__().
Species indices outside
[0, S)are undefined behaviour: they are not checked, and the result may differ between implementations.References
See MACE, eq.10.
MACE: Higher Order Equivariant Message Passing Neural Networks for Fast and Accurate Force Fields. Batatia, Kovacs, Simm, Ortner & Csanyi, 2022.
Methods
__call__(features, indices, weight)Power expansion of
features, contracted with index-wise weights.Attributes
Direct sum of equivariant powers.
Index-wise linear mixing the sorted powers.
Per-(l, p) blocks of the index-wise linear, in weight order.
Static metadata of the fused Mosaic GPU kernel.
Static metadata of the fused Mosaic TPU kernel.
Groups equivalent irreps before the output linear transform.
sourcetarget- __call__(features: Array, indices: Array, weight: list[Array]) Array¶
Power expansion of
features, contracted with index-wise weights.- Parameters:
features (jnp.ndarray) –
(..., C, dim)or(..., dim, C)features depending onlayout.indices (jnp.ndarray) –
(...)-array of species indices in[0, S); out-of-range indices are undefined behaviour.weight (list[jnp.ndarray]) – one
(S, C, m_out, m_in)array per block oflinear_blocks.
- Returns:
targetfeatures, inlayout.- Return type:
jnp.ndarray
- property expansion: PowerExpansion¶
Direct sum of equivariant powers.
- property linear: LinearIndexwise¶
Index-wise linear mixing the sorted powers.
- property linear_blocks: list[LinearBlock]¶
Per-(l, p) blocks of the index-wise linear, in weight order.
- property mosaic_gpu_params: PallasMosaicGPUSymmetricContractionParams¶
Static metadata of the fused Mosaic GPU kernel.
- property mosaic_tpu_params: PallasMosaicTPUSymmetricContractionParams¶
Static metadata of the fused Mosaic TPU kernel.
- property permutation: Permutation¶
Groups equivalent irreps before the output linear transform.