Skip to content

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

@bhcao

Description

@bhcao

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+...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions