Hi, I am trying to use the lammps with hdnnp to run the MD simulations, and a mix of potential is necessary as I am using the delta-learning machine learning NNP.
I set up the pair_style and pair_coffe as below:
variable nnDir1 string "/lustre1/u/yuechen/zengzz/2023/TiO2-water-defects/MLPs/optb88vdw/nnp-PPPPP"
variable nnDir2 string "/lustre1/u/yuechen/zengzz/2023/TiO2-water-defects/MLPs/delta-scan/nnp-PPPPP"
pair_style hybrid/overlay hdnnp dir ${nnDir1} showew no showewsum 10 resetew yes maxew 100000 cflength 1.8897261328 cfenergy 0.0015936014 hdnnp dir ${nnDir2} showew no showewsum 20 resetew yes maxew 100000 cflength 1.8897261328 cfenergy 0.0015936014
pair_coeff * * H O Ti # set up pair style coefficients
pair_coeff * * H O Ti # set up pair style coefficients
However, there is a error:
ERROR: Pair coeff for hybrid has invalid style (…/pair_hybrid_overlay.cpp:63)
Last command: pair_coeff * * H O Ti # set up pair style coefficients
I also tried some different settings for pair_coeff and all are failed to run. Could you give me some suggestions to solve it? Maybe a mixing of potential for the hdnnp pair style is not supported in lammps?
Thanks so much for your quick reply. I am not sure I understand your suggestions. I did some tests by changing the pari_coeff as like below:
(1) pair_coeff hdnnp 1 * * H O Ti
pair_coeff hdnnp 2 * * H O Ti
(2) pair_coeff hdnnp * * H O Ti
pair_coeff hdnnp * * H O Ti
Both cannot solve this issue. I noticed this from the documentation (pair_style hdnnp command — LAMMPS documentation): "This style does not support mixing. " so I was wondering whether I can use this mixing for hdnnp pair style.
Option 1 would be the correct syntax, but for that to work, the pair style must support being used in a hybrid pair style which is not typical for machine learning potentials, especially, if they depend on an external library. Most of those libraries are not aware that they are being used in LAMMPS and very few MD codes offer a similar feature to the hybrid pair styles in LAMMPS.
What could work is to use the rather recently added fix alchemy command — LAMMPS documentation
This requires a multi-replica simulation, where you basically run two synchronized simulations in two different partitions and then the fix will combine the results according to the per-partition weight variables.