Skip to content

2022-11-16

Compare
Choose a tag to compare
@mariogeiger mariogeiger released this 16 Nov 23:14
· 450 commits to main since this release

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 and e3nn.IrrepsArray.regroup to regroup irreps. Equivalent to sort followed by simplify.
  • add regroup_output parameter to e3nn.tensor_product and e3nn.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() in e3nn.Linear which can change the structure of the parameters dictionary.
  • breaking change regroup_output is True by default in e3nn.tensor_product and e3nn.tensor_square.
  • To facilitate debugging, if not key is provided to e3nn.normal it will use the hash of the irreps.
  • breaking change changed normalization of e3nn.tensor_square in the case of normalized_input=True

Removed

  • Deprecate e3nn.TensorSquare