Error about all pair coeffs are not set

Hello everyone,
A two-layers boron nitride is constructed by lattice command shown as follows:
5E119365@...8043....jpg
Tersoff is used for the B/N interaction in the first layer, the B/N interaction in the second layer also employs tersoff. The interaction between first layer and second layer is lj potential. Pair_coeff is shown as follows:
36399637@...8044....jpg
But the result indicates that my input script is wrong. Athough I believe all pair coeffs has been set. It really confused me a long time.
020570AE@...8045....jpg
Did anyone meet the same question as me? Thanks a lot.

pair_style hybrid/overlay lj/cut 12 tersoff

pair_coeff * * tersoff BNL.tersoff B N NULL NULL

…followed by:

pair_style tersoff

pair_coeff * * tersoff BNL.tersoff B N

These two commands would likely overwrite (invalidate) your previous commands. What happens when you remove these last two commands?

5E119365@...8043....jpg

36399637@...8044....jpg

020570AE@...8045....jpg

5E119365@...8043....jpg

the second “pair_style” command wipes out the first. if you want two different groups of tersoff potentials, you need to specify tersoff twice in the pair_style hybrid line. and you want pair style hybrid, not hybrid/overlay.
there is an example for this scenario in the pair style hybrid docs, as you need to change the pair_coeff syntax if you specify a substyle multiple times in the pair style hybrid command.

axel.

5E119365@...8043....jpg

36399637@...8044....jpg

020570AE@...8045....jpg

020570AE@...8045....jpg