Mace parities for SO3-restricted symmetry / Use mace-torch weights

Open
#31 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start in mlip/models/mace/models.py around line 213 and compare its interaction_irreps handling with the referenced mace-torch models.py implementation. Check how SO3-restricted symmetry and parity are represented in the existing MACE model path. Done means the mace-jax behavior matches the intended SO3 parity handling and can use the corresponding mace-torch weights.

Written by the indexing model from the issue text.

Description

enhancement

Here p=-1 (by default of e3nn.Irreps.spherical_harmonics), however in mace-torch p=1 (interaction_irreps is called sh_irreps_inter in mace-torch). It seems that in mace-jax, the author forgot to add p=1 as well.

https://github.com/instadeepai/mlip/blob/main/mlip/models/mace/models.py#L213

if not self.include_pseudotensors:
    interaction_irreps = e3nn.Irreps.spherical_harmonics(self.l_max) # so3: 0e+1o+2e+3o+...
else:
    interaction_irreps = e3nn.Irreps(e3nn.Irrep.iterator(self.l_max)) # not so3: 0e+0o+1e+1o+2e+2o+3e+3o+...

https://github.com/ACEsuit/mace/blob/main/mace/modules/models.py#L145

if not use_so3:
    sh_irreps = o3.Irreps.spherical_harmonics(max_ell) # not so3: 0e+1o+2e+3o+...
else:
    sh_irreps = o3.Irreps.spherical_harmonics(max_ell, p=1) # so3: 0e+1e+2e+3e+...

def generate_irreps(l):
    str_irrep = "+".join([f"1x{i}e+1x{i}o" for i in range(l + 1)])
    return o3.Irreps(str_irrep)

sh_irreps_inter = sh_irreps
if hidden_irreps.count(o3.Irrep(0, -1)) > 0:
     sh_irreps_inter = generate_irreps(max_ell) # not so3: 0e+0o+1e+1o+2e+2o+3e+3o+...
Dominant language
Python
Stars
149
Forks
24
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from instadeepai/mlip

All issues in instadeepai/mlip

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.