LAMMPS-Bug with less species than MACE-Model contains
Felixrccs opened this issue · comments
Hey I have a reproducible BUG when using MACE-LAMMPS with less species than my MACE model contains.
The simulation does completely wrong chemistry (everything diffuses and or atoms crash into atoms). If I add the third element (contained in my MACE model) frozen in the vacuum (way outside the cuttoff) the MACE reproduces the expected behavior.
My LAMMPS input looks like the following:
units metal
dimension 3
boundary p p f
atom_style full
newton on
atom_modify map yes
timer timeout 23:00:00 every 1000
read_data ./RUN_1/lammps.data
mass 1 63.546
mass 2 15.999
pair_style mace no_domain_decomposition
pair_coeff * * mace_0_swa.model-lammps.pt Cu O
reset_timestep 0
fix myNPT all npt temp 300 300 $(100.0*dt) iso 1.01325 1.01325 $(1000.0*dt)
run 20000
The output shows
Loading MACE model from "mace_0_swa.model-lammps.pt" ... finished.
- The r_max is: 4.
- The model has: 2 layers.
- The model atomic numbers are: 1 8 29.
- The pair_coeff atomic numbers are: 29 8.
- The torch_float_dtype is: Double
I tested this issue on different GPU compilations with different MACE models.
What a beautiful bug!
Sorry about this - we are aware of it and it's on my list to fix. It is possible to use your potential as you wish - you just need to list all the possible species types (e.g., in your lammps.data file), even if your simulation has zero of some species.
@wcwitt Maybe a temporary fix to this issue is just to say that in the doc if it is not already the case.
Fixed by ACEsuit/lammps@344780a.