ERROR: Pair_modify special setting for pair hybrid incompatible with global special_bonds setting (../pair_hybrid.cpp:474)

Dear LAMMPS users,

I’m getting the following error:

ERROR: Pair_modify special setting for pair hybrid incompatible with global special_bonds setting (…/pair_hybrid.cpp:474)

The relative lines in my script and some of the pair_coeffs:

pair_style hybrid lj/sf/dipole/sf 12.0 lj/sf/dipole/sf 12.0
special_bonds amber
pair_modify pair lj/sf/dipole/sf 1 special lj/coul 0.0 1.0 1.0

pair_coeff 1 1 lj/sf/dipole/sf 1 0.550 3.050
pair_coeff 1 2 lj/sf/dipole/sf 1 0.725 4.225
pair_coeff 1 3 lj/sf/dipole/sf 1 0.943 4.125

pair_coeff 1 7 lj/sf/dipole/sf 1 0.268 3.775
pair_coeff 1 8 lj/sf/dipole/sf 1 0.268 3.775

pair_coeff 7 7 lj/sf/dipole/sf 2 0.131 4.500
pair_coeff 8 8 lj/sf/dipole/sf 2 0.131 4.500
pair_coeff 9 9 lj/sf/dipole/sf 2 0.131 4.500
pair_coeff 7 8 lj/sf/dipole/sf 2 0.024 6.100

I’m mixing two different force fields and I want to use the same pair_style (lj/sf/dipole/sf), but they differ in the weighting of the 1-2, 1-3 and 1-4 interactions. One of them I want lj/coul 0.0 1.0 1.0 and the other in the same way as amber.
I searched in the errors section of the manual and I found “Cannot override a setting of 0.0 or 1.0 or change a setting between 0.0 and 1.0.” I don’t know where is the problem. The above scripts lines should work. In the manual I found a similar example:

special_bonds amber
pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0

Can anybody help me?
Thank you in advance.

Dear LAMMPS users,

I'm getting the following error:

ERROR: Pair_modify special setting for pair hybrid incompatible with
global special_bonds setting (../pair_hybrid.cpp:474)

The relative lines in my script and some of the pair_coeffs:

pair_style hybrid lj/sf/dipole/sf 12.0 lj/sf/dipole/sf 12.0
special_bonds amber
pair_modify pair lj/sf/dipole/sf 1 special lj/coul 0.0 1.0 1.0

pair_coeff 1 1 lj/sf/dipole/sf 1 0.550 3.050
pair_coeff 1 2 lj/sf/dipole/sf 1 0.725 4.225
pair_coeff 1 3 lj/sf/dipole/sf 1 0.943 4.125
....
pair_coeff 1 7 lj/sf/dipole/sf 1 0.268 3.775
pair_coeff 1 8 lj/sf/dipole/sf 1 0.268 3.775
....
pair_coeff 7 7 lj/sf/dipole/sf 2 0.131 4.500
pair_coeff 8 8 lj/sf/dipole/sf 2 0.131 4.500
pair_coeff 9 9 lj/sf/dipole/sf 2 0.131 4.500
pair_coeff 7 8 lj/sf/dipole/sf 2 0.024 6.100
....

I'm mixing two different force fields and I want to use the same
pair_style (lj/sf/dipole/sf), but they differ in the weighting of the 1-2,
1-3 and 1-4 interactions. One of them I want lj/coul 0.0 1.0 1.0 and the
other in the same way as amber.
I searched in the errors section of the manual and I found "Cannot
override a setting of 0.0 or 1.0 or change a setting between 0.0 and 1.0."
I don't know where is the problem. The above scripts lines should work. In
the manual I found a similar example:

special_bonds amber
pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0

​this looks similar, but is different in a significant setting.

special_bonds amber

is equivalent to:

special_bonds lj 0.0 0.0 0.5 coul 0.0 0.0 0.833333333333

since both 0.5 and 0.8333333333333 a neither 0.0 nor 1.0, they *can* be
overridden (with 0.0).
however, what you are trying to do is to override 0.0, which violates the
requirements for overriding special_bonds settings in hybrid styles.

in order to avoid the restriction, you have to make sure, that your 1-3
exclusion factor is not exactly 0.0 (or 1.0) in the global setting. this is
achieved by, e.g.:

special_bonds lj 0.0 1.0e-20 0.5 coul 0.0 1.0e-20 0.833333333333

since 1.0e-20 is not exactly 0.0, but within the accuracy of the forcefield
clearly equivalent to 0.0, this should make your simulation work.

Can anybody help me?

​BTW: this should be explained in the manual. have a closer look at the
docs for the pair_modify command.​

​axel.​