Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local variable 'last_ir' referenced before assignment #2

Open
jx291605427 opened this issue Jun 6, 2023 · 1 comment
Open

local variable 'last_ir' referenced before assignment #2

jx291605427 opened this issue Jun 6, 2023 · 1 comment

Comments

@jx291605427
Copy link

jx291605427 commented Jun 6, 2023

Hello, this error occurred when I used MACE_layer.

The following is my parameter.

layer = MACE_layer(
max_ell=3,
correlation=3,
n_dims_in=2,
hidden_irreps='4x0e + 4x1e + 4x2e',
node_feats_irreps='16x0e',
edge_feats_irreps='16x0e',
avg_num_neighbors=10.0,
use_sc=False,
)

Is the parameter set wrong?

@ilyes319
Copy link
Contributor

ilyes319 commented Jun 6, 2023

Hey very happy to see you are using mace layers!

The defaults parity for mace are always alternating parity. If you want to use this parity, you need to go inside the model and change the parity of the spherical harmonics on this line

sh_irreps = o3.Irreps.spherical_harmonics(max_ell)
to sh_irreps = o3.Irreps.spherical_harmonics(max_ell, p=1).

If you want to make a small PR with that, happy to merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants