How to add tests for a new potential function?

Dear all,

I am willing to use the OpenKIM to test the special Machine learning potential.
If I don’t get it wrong, I need to upload the Model of specific elements and evaluated it using the potential which needed to be uploaded as a Model Driver.
I search for the documentation and can not find any clear guides. Where to find the manuals?

And the potential can now be used by lammps, but the lammps needed to be recompiled with the potential and it depended on the external libraries such as Tensorflow_cc.
Is that possible to add the model test of the potential in to openkim?



Hello Jason,

I can try to help you with this. Currently, openKIM works with certain types of models directly, and also allows for something we call a “simulator model” (SM). An SM is a model that depends on a certain simulator code (e.g. LAMMPS), but can be run within openKIM if that simulator is available.

If I understand correctly, your model currently built to work with LAMMPS, but it is a customized version of LAMMPS that uses external libraries. Is that correct? If so, it may require adding your customized LAMMPS to the openKIM suite of SMs. This may be possible, but would take some work.

Can you tell me a bit more about the model and about the additions to LAMMPS that it depends on?


Hi Ron,

It would be great if you could help me :slight_smile:

The potential I used is a deep learning based model of interatomic potential. The repository of the project is deepmd-kit[1].
To compile deepmd compatible lammps version, I need create the folder USER-DEEPMD and copy the folder to the lammps src directory. Then in the lammps/src I turn on the user-deepmd and start to compile. The USER-DEEPMD contains a pair_nnp.cpp which will call the Tensorflow C++ interface. The files needed to compile the lammps are here[2]

I think the tricky thing is that it migh be needed to compile the tensorflow_cc interface in the openkim and it is hard, if I understand correctly?

Thanks and regards,


Hello Jason,

Thanks for the details of your workflow. I took a quick look at the codes you point to and have a basic idea of how the various parts fit together.

There are basically two options for using openkim tests with this sort of potential. (1) create a "simulator model" (SM) and provide a compiled version of lammps that supports the model and (2) create a "portable model" (PM).

If you want to submit either of these officially to openkim, there are difficulties for both options. For the SM case, we would need to get the deepmd-kit code officially incorporated into a lammps release. For the PM case, we would need to develop a way to support the deepmd-kim and tensorflow libraries as external dependencies. A PM is the preferred approach and we already have plans to support external dependencies of this type. However, it has not be out top priority.

However, if you want, at least for the moment, only to be able to use the openkim content to do testing/simulations on your own machine(s), then it should be possible to reasonably quickly hack together a SM solution.

So, maybe you can give me a better understanding of your short and longer term goals for this effort?



Hi Ryan,

At present, I want to test my deepmd potential using the test cases provided by OpenKIM. If possible I also want to upload the results to the OpenKIM.
In the long term, I certainly hope to be able to make this potential a Model Driver and easily applied to other models.

Therefore, the hack way you mentioned might be enough for my purpose at the moment.


Hi Jason,

Thanks for the response. OK. I think we can do something, but there is still one significant aspect we need to work out on our side. We'll need to discuss this at our next regular group meeting, so that I can collect all the relevant details on the current state of our system.

Let me get back to you later next week.