Pair coeff for hybrid has invalid style

Hi,

I am using the following commands for pair style and air coefficents in my input script -

########################POTENTIAL PARAMETER########################

pair_style hybrid reax/c NULL checkqeq no safezone 1.6 mincap 100 tersoff
pair_coeff * * ffield.reax.CBN B C
pair_coeff 2 2 none
pair_coeff * * tersoff BNC.tersoff NULL C

#####################################################################

But when I run the input script it is showing -

ERROR: Pair coeff for hybrid has invalid style: ffield.reax.CBN (F:\LAMMPS\lammps-29Sep2021\src\pair_hybrid.cpp:497)
Last command: pair_coeff * * ffield.reax.CBN B C

Can anyone tell me how to solve it? Thanks in advance.

Regards,
Jobayer

BNC.tersoff (5.5 KB)
ffield.reax.CBN (8.4 KB)

Basically, what you did here is that you used pair_style hybrid in a wrong way. What I mean by that is you should confer the error and your input file with the manual

https://docs.lammps.org/pair_hybrid.html

Particularly, you should check the syntax for the pair_coeff that you specify two interparticle potentials, but you just include the files without telling LAMMPS to which potential shall you refer. The tersoff command is done probably correct, so that’s a hint.

Regards

@Lukasz_Baran1 ,

Thanks for your reply. I changed potential parameter in terms of what you have suggested -

pair_style hybrid reax/c NULL checkqeq no safezone 1.6 mincap 100 tersoff
pair_coeff * * reax/c ffield.reax.CBN B C
pair_coeff 2 2 none
pair_coeff * * tersoff BNC.tersoff NULL C

However, this also ends up in error -

ERROR: Incorrect args for pair coefficients (F:\LAMMPS\lammps-29Sep2021\src\REAXFF\pair_reaxff.cpp:275)
Last command: pair_coeff * * reax/c ffield.reax.CBN B C

Regards

@Jobayer

I am not an expert on these particular force fields and can’t verify your files/implementations but what I did notice now is that you’re using reax/c command which seems to be an obsolete version of the force field you wish to use with your current version of LAMMPS (I presume it is 29Sep2021) and now it is just called “reaxff” with likely the same syntax as previously.

Check the release notes for particular versions to verify whether I am not mistaken. For instance, take a look at the link below with the date before your version.

Other than that I don’t think I can help you any further.

Regards

This error typically happens when the number of atom types in the system and the atom type to element mapping do not have a matching number of entries.

Please also note that there must be no overlap between the mappings of different manybody potentials. For example your use of:

pair_coeff * * reax/c ffield.reax.CBN B C
pair_coeff * * tersoff BNC.tersoff NULL C

Is leading to bogus results, because atom type 2 is mapped in both cases. Even though it would appear that interactions are mapped pairwise for these potentials in LAMMPS, this is not the case and thus the second pair_coeff will remove required entries from the neighbor list of the ReaxFF calculation.

The following mapping, however,

pair_coeff * * reax/c ffield.reax.CBN B NULL
pair_coeff * * tersoff BNC.tersoff NULL C

would be valid.

That said, when using ReaxFF, you should be using ReaxFF for everything. This is due to the inner workings and complexity of ReaxFF.

@Lukasz_Baran1 ,

I appreciate you taking an interest in it !

Regards,
Jobayer

Dr. @akohlmey ,

It works! Thank you.

This is an important piece of information. I will certainly follow this from now on.

Respectfully,
Jobayer