Does LAMMPS support hybrid pair_style with deepmd models (.pb format) and tabulated pair potentials?

I used DeepMD for generating a neural network potential, frozen in the .pb format. This works well when used on its own :

pair_style deepmd graph.pb
pair_coeff * *

However, what I’m trying to do is to use the neural network potential for a certain set of atoms, and a tabulated pair potential for the rest. This calls for the hybrid pair style, but it keeps on giving the same message - ERROR: Illegal pair_style command

I tried a few similar variations of the following type, which did not work:
pair_style hybrid deepmd table spline 2000

So am I making a mistake somewhere, or does LAMMPS currently not support hybrid pair style involving deepmd generated potentials?


I don’t know deepmd, but - based on your standalone pair_style command, the hybrid pair style command would have to be:

pair_style hybrid deepmd graph.pb table spline 2000

But that is only the lesser issue to make hybrid pair styles work. The pair style also needs to have a way to map LAMMPS’ numeric atom types to symbolic atom types of the pair style and the quoted pair_coeff command indicates that that kind of facility does not exist.

However, do not take my word for it, but rather contact the DeepMD developers. Support for hybrid pair styles is primarily something that has to be implemented into the individual pair style. For pairwise additive potentials like lj/cut, that is somewhat built into how pair_coeff commands are designed, however for manybody potentials (e.g. Tersoff, or Stillinger-Weber) that is different and some programming effort is required, since they only support a single pair_coeff * * command and need to support type mapping including support for a NULL atom type indicating atoms that are not to be included into the manybody computation.

Okay, got it! I’ll reach out to the DeepMD developers. Thank you!