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

LAMMPS compatibility #13

Closed
mutingx opened this issue Sep 18, 2024 · 5 comments
Closed

LAMMPS compatibility #13

mutingx opened this issue Sep 18, 2024 · 5 comments

Comments

@mutingx
Copy link

mutingx commented Sep 18, 2024

I'm trying to run LAMMPS with models trained by deepmd-mace. The deepmd-mace was installed following the README.md and it did work. But when running lmp -i in.lmp, it failed with the following message:

 DeePMD-kit C API Error: DeePMD-kit Error: incompatable model: version 0.0 in graph, but version 1.1
 Last command: pair_style   deepmd frozen_model.pth

Should I recompile the dp part or the lmp part? How to recompile LAMMPS with the new "libdeepmd_mace.so"?
Best wishes.

@njzjz
Copy link
Member

njzjz commented Sep 18, 2024

incompatable model: version 0.0 in graph, but version 1.1

This error is from the TensorFlow backend. Did you use an old version?

@mutingx
Copy link
Author

mutingx commented Sep 19, 2024

I thought I've used the PyTorch backend. The model was trained with dp --pt train and was frozen with dp --pt freeze. The warning messages during training and freezing are as follow:
The TorchScript type system doesn't support instance-level annotations on empty non-base types in init. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in torch.jit.Attribute``
The versions are: DeePMD version: 3.0.0b3 , `tensorflow: 2.16.1` and `torch: 2.4.0+cu124`

Before testing deepmd-mace, I trained a deepmd-kit model with dp train with the same environment. That model can be used by lmp.

@njzjz
Copy link
Member

njzjz commented Sep 19, 2024

Please check whether you use the latest code on the devel branch to compile the C++ interface. The plugin support (deepmodeling/deepmd-kit#4073) has not been released to any release version.

@mutingx
Copy link
Author

mutingx commented Sep 20, 2024

I used the released version. Thanks for your help! That's quite helpful and I will try the latest codes

@njzjz
Copy link
Member

njzjz commented Oct 3, 2024

v3.0.0b4 has been released, so it should not be a problem anymore.

@njzjz njzjz closed this as completed Oct 3, 2024
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

2 participants