GROMACS version: 2025.2-dev
GROMACS modification: Yes
After read this paper [2602.02234] Enabling AI Deep Potentials for Ab Initio-quality Molecular Dynamics Simulations in GROMACS, I installed the gromacs code integrated with deepmd-kit(GitHub - HuXioAn/gromacs at deepmd-oneModel · GitHub), however, I want to know how to write the input file to use the MLP trained by deepmd-kit. I added “nnpot-active = yes
nnpot-modelfile = frozen_model_compress.pb” in the mdp file, but it did not work. It will be appreciated if anyone could tell me something about it.
Hi! The paper you mention is for an interface specifically for DeePMD MLPs in GROMACS, however it is not maintained by the GROMACS team. The nnpot interface is the recommended (and officially supported) way to use MLPs in GROMACS, but it has nothing to do with the DeePMD interface described in the paper you cite, so the two approaches cannot work together.
Please refer to the section in the reference manual, and also this preprint for details on it’s use.
Basically, the way to go about it would be to wrap the DeePMD model in PyTorch with a shallow wrapper as described in the manual, to make sure the model gets the right inputs and the units match. Then, you would export the model with TorchScript into a .pt-file, which the nnpot module expects. Note that you will have to compile GROMACS with support for LibTorch, according to the install guide. You can also refer to this repo for some more examples of wrapped models. I have not yet tried to use the DeePMD models, but it should be fairly straightforward.
Let me know if you need more help with getting your models to work!