2022-11-16
New method regroup
aim to replace .sort
and .simplify
most of the time.
Irreps("1e + 0e + 1e + 0x2e").regroup() # 1x0e+2x1e
New default behavior of tensor_product
e3nn.tensor_product("0e + 1o + 0e", "1o + 1o") # version<0.12.0
# 1x0e+1x0e+1x1o+1x1o+1x1o+1x1o+1x1e+1x1e+1x2e+1x2e
e3nn.tensor_product("0e + 1o + 0e", "1o + 1o") # version==0.12.0
# 2x0e+4x1o+2x1e+2x2e
e3nn.tensor_product("0e + 1o + 0e", "1o + 1o", regroup_output=False) # version==0.12.0
# 1x0e+1x0e+1x1o+1x1o+1x1o+1x1o+1x1e+1x1e+1x2e+1x2e
Added
e3nn.Irreps.regroup
ande3nn.IrrepsArray.regroup
to regroup irreps. Equivalent tosort
followed bysimplify
.- add
regroup_output
parameter toe3nn.tensor_product
ande3nn.tensor_square
to regroup the output irreps.
Changed
e3nn.IrrepsArray.convert
is now private (e3nn.IrrepsArray._convert
) because it's recommended to other methods instead.- breaking change use
input.regroup()
ine3nn.Linear
which can change the structure of the parameters dictionary. - breaking change
regroup_output
isTrue
by default ine3nn.tensor_product
ande3nn.tensor_square
. - To facilitate debugging, if not
key
is provided toe3nn.normal
it will use the hash of the irreps. - breaking change changed normalization of
e3nn.tensor_square
in the case ofnormalized_input=True
Removed
- Deprecate
e3nn.TensorSquare