Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentials Fail on LAMMPS but ok in ASE #814

Open
cecilia-hong opened this issue Feb 3, 2025 · 9 comments
Open

Potentials Fail on LAMMPS but ok in ASE #814

cecilia-hong opened this issue Feb 3, 2025 · 9 comments

Comments

@cecilia-hong
Copy link

Hello,

I hope you are doing well, as always many thanks for your help in advance.

I have been having some issues with using my trained-from-scratch MACE potential or the pretrained foundation model for my MOF system on LAMMPS.

I had initially tried using the unit cell which had 52 atoms but then went onto using a 2x2x2 supercell in case it was a matter of minimum image convention but that also failed. So what I am seeing if that when I minimise the structure, all the atoms remain but they will either merge together or the framework would break. Furthermore, any type of MD I tried (NVT, NPT, NVE) would result in losing 48 or my 52 atoms.

I had initially assumed that it was my potentials or the pretrained potentials not being suitable for the system but when I tried running an NVT using ase.md I was able to get a stable run with energies comparable to AIMD so I am not sure where the issue is.

Would you be able to help me with this please?

I have attached my lammps input file but if you want to see any other files of mine please let me know.

in_lammps.txt

@gabor1
Copy link
Collaborator

gabor1 commented Feb 3, 2025

can you post your atomic position file as well?

@cecilia-hong
Copy link
Author

I have attached it here, thank you!

lammps_read_data.txt

@ilyes319
Copy link
Contributor

ilyes319 commented Feb 4, 2025

@cecilia-hong It is most probably a problem with your input to LAMMPs. Do check you got everything correct in terms of units and ordering, please and let us know. Thank you!

@cecilia-hong
Copy link
Author

Hi thank you for your response. I have checked my units that they are consistent with the units style "metal". As for my order of LAMMPS input, I have checked them over that they seem reasonable. I have followed the order that was demonstrated on the docs, https://mace-docs.readthedocs.io/en/latest/guide/lammps.html .

Furthermore, as a sanity check, I had also tried to use the inputs from Issues 487 and 497 from this rep however they gave the same output as my own.

@wcwitt
Copy link
Collaborator

wcwitt commented Feb 4, 2025

Your input file has

pair_coeff	* * pretrained_small.model C H Ga O

which makes me worry you might not be converting the model to LAMMPS form as described here: https://mace-docs.readthedocs.io/en/latest/guide/lammps.html#preparing-your-model. Have you done that part?

@cecilia-hong
Copy link
Author

Thank you for your response.

I had indeed done the conversion, to get the lammps.pt file but had renamed the file to make life easier. Would that pose as a problem?

@wcwitt
Copy link
Collaborator

wcwitt commented Feb 5, 2025

Probably not a problem then, but I'm not 100% sure.

The most common explanation in these situations is definitely a subtle error in the LAMMPS input, although I don't see anything wrong with yours from a quick scan. Would you please:

  1. send your output
  2. try running NVT with the foundation model for a simpler system (single element or bulk water)

@cecilia-hong
Copy link
Author

Thank you for looking into this, I have attached the dump and traj files for my run using the small foundation model here and I will try to run the water NVT the now (hopefully the HPC queue will run it soon).

log.txt
dump_01_opt.lammps.txt

@cecilia-hong
Copy link
Author

Hi, just wanted to update that I had managed to run a stable NVT with the foundation models but not my from-scratch ones.

The problem seemed to be the order in which I specify the elements (?) on the line:

pair_coeff * * model.pt C H Ga O

That it should match that of my data file not my training.

However, the matter still remains that my model worked on the ase.md but still not on LAMMPS. Would there potentially be a different issue perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants