Closed pfebrer closed 1 year ago
Hey,
Did you make sure to change also --max_ell=4
in the input file. If you do not, no l=4 spherical harmonics will be injected thus the bug.
Best,
Ilyes
Thanks! If I increase max_ell to 4, then I get an error from e3nn
:
Traceback (most recent call last):
File "~/myenv/lib/python3.10/site-packages/e3nn/o3/_wigner.py", line 129, in wigner_3j
out = flat_src[_W3j_indices[(l3, l2, l1)]].reshape(2 * l3 + 1, 2 * l2 + 1, 2 * l1 + 1).transpose(0, 2).mul((-1) ** (l1 + l2 + l3)).clone()
KeyError: (4, 8, 12)
During handling of the above exception, another exception occurred:
prod = EquivariantProductBasisBlock(
File "~/mace/modules/blocks.py", line 114, in __init__
self.symmetric_contractions = SymmetricContraction(
File "~/mace/modules/symmetric_contraction.py", line 71, in __init__
self.contractions[str(irrep_out)] = Contraction(
File "~/mace/modules/symmetric_contraction.py", line 107, in __init__
U_matrix = U_matrix_real(
File "~/mace/tools/cg.py", line 116, in U_matrix_real
wigners = _wigner_nj(irrepss, normalization, filter_ir_mid, dtype)
File "~/mace/tools/cg.py", line 55, in _wigner_nj
C = o3.wigner_3j(ir_out.l, ir_left.l, ir.l, dtype=dtype)
File "~/myenv/lib/python3.10/site-packages/e3nn/o3/_wigner.py", line 135, in wigner_3j
raise NotImplementedError(f'Wigner 3j symbols maximum l implemented is {max(_W3j_indices.keys())[0]}, send us an email to ask for more')
NotImplementedError: Wigner 3j symbols maximum l implemented is 11, send us an email to ask for more
Mmm yes, this should reported on e3nn repo. Usually you never need to go to that high order, it saturates at 3. Could you open an issue there and link it here?
Ok, thanks! I would like to open an issue there, the problem is that I don't understand exactly what is going on in the _wigner_nj
function, so I don't know how to explain it :sweat_smile: E.g. I don't know what order of the Wigner 3j symbols do I need.
Forget what I said, in their latest version (e3nn==0.5.0
) they already removed this restriction, and the mace model works with hidden irreps l=4 and max_ell=4 :ok_hand:
Thank you very much for the quick replies! :)
I'm trying to run a variant of the mace model with hidden irreps of order l=4 (
20x0e + 20x1o + 20x2e + 20x3o + 20x4e
) and I get an error on the symmetric contraction:Should I be able to run the model with l=4 hidden irreps?
Thanks!