ACEsuit / mace

MACE - Fast and accurate machine learning interatomic potentials with higher order equivariant message passing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

atomic configs with len 1 that are not IsolatedAtom are processed wrong

bernstei opened this issue · comments

The structure of this if statement

if len(atoms) == 1:
seems to ignore configs with len(atoms) == 1. It's definitely broken in terms of adding them to theories which is how I discovered it. However, it also doesn't add them to atoms_without_iso, which, if keep_isolated_atoms is False, also excludes them from the main atoms_list, from what I can tell.

I think it would be safer to have the outermost if in that loop be

    if atoms.info.get("config_type") == "IsolatedAtom":
        assert len(atoms) == 1
        # do whatever special needs to be done with IsolatedAtom