deepmodeling / deepmd-kit

A deep learning package for many-body potential energy representation and molecular dynamics
https://docs.deepmodeling.com/projects/deepmd/
GNU Lesser General Public License v3.0
1.41k stars 486 forks source link

Fail to run MD simulation with DP (pytorch backend) #3907

Closed ZhihaoXu0313 closed 1 week ago

ZhihaoXu0313 commented 1 week ago

Summary

Hi,

I encountered an issue when I was using DP for MD simulation (.pth model, from pytorch backend). The model can be successfully loaded but following the error:

image image

(sorry for the screen photo)

I wonder where could this issue coming from? Since the model seems to be good since it can be normally used for inference with Python API and there's no error occurs when using dp commands.

Best

DeePMD-kit Version

DeePMD-kit v3.0.0a0

Backend and its version

PyTorch

Python Version, CUDA Version, GCC Version, LAMMPS Version, etc

No response

Details

See above

CaRoLZhangxy commented 1 week ago

MD simulation for dpa2 model is supported at 2024Q1 branch and multiprocess MD is supported at devel branch. Note that your model should be freeze with the same code version with your c++ inference code version. (Sometimes model trained with old version can not be freezed by a newer one )

ZhihaoXu0313 commented 1 week ago

Thank you so much for the response!

All of the works are under the same code (train, freeze, test, etc), so I guess there's no version issue at all. I'm now using the devel branch (I'll double check it later), so according to your information, it will be fine to use use that for MD simulation, right? What is the multiprocess MD simulation you meant?

Thanks again for your further explanation!

njzjz commented 1 week ago

Duplicate of #3428