ACEsuit / mace

MACE - Fast and accurate machine learning interatomic potentials with higher order equivariant message passing.
Other
497 stars 187 forks source link

Error when specifying more e0s then present in training set #605

Open LarsSchaaf opened 2 weeks ago

LarsSchaaf commented 2 weeks ago

Description When you specify e0s for Oxygen for example, but you dont have any oxygen in your training set you get the following error:

 File "programms/mace/modules/blocks.py", line 160, in forward
    return torch.matmul(x, torch.atleast_2d(self.atomic_energies).T)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (799x7 and 8x1)

To Reproduce Specify e0s from input script of two elements, but only have one element in dataset --E0s={1:0.1, 2:0.2}

Solution: Edit: https://github.com/ACEsuit/mace/blob/158b1f2898b142f187acf700b063a94ccb4eaf8f/mace/cli/run_train.py#L405

gabor1 commented 2 weeks ago

Hm.. I guess we could just silently ignore additional E0s.