Question about mixed pair_coeff terms from sixthpower mixing rule in PCFF


After I set the coefficients of atomic pairs (I = J) at input file, why does it show that it does not generate coefficients between atoms of different types (I != J) after running? The force field I use is PCFF, the pair_style is lj/class2/coul/long, and the mixing rule uses sixthpower.

Generated 0 of 21 mixed pair_coeff terms from sixthpower mixing rule
Setting up Verlet run …

And when I change lj/class2/coul/long to lj/cut/coul/long, it can be generated. Why? I haven’t even changed the pair coefficients, only the pair style.

Generated 21 of 21 mixed pair_coeff terms from sixthpower mixing rule
Setting up Verlet run …


LAMMPS generates the missing cross parameters based on a mixing rule (by default, its geometric). If all cross parameters are specified explicitly, LAMMPS does not generate any.


Dear Simon, thanks for your reply, but I didn’t specify any cross parameters. What makes me wonder most is why LAMMPS can generate parameters normally when I only change the pair_style without changing other parameters. Why lj/cut/coul/long can generate successfully, but lj/class2/coul/long can not.

Then I suppose this is due to this particularity of class2 potential :

If the pair_coeff command is not used to define coefficients for a particular I != J type pair, the mixing rule for and for all class2 potentials is to use the sixthpower formulas documented by the pair_modify command. The pair_modify mix setting is thus ignored for class2 potentials for epsilon and sigma. However it is still followed for mixing the cutoff distance.

This is an important point. Because the class2 styles bypass the usual mixing procedure, the reported diagnostic message is not correct. This will be corrected in a future LAMMPS release.

You can always verify the results of mixing by using the write_coeffs command and check the generated file.

Dear Akohlmey, thanks for your reply. The pair_style I used is hybrid, and it seems that the write_coeff command cannot output pair_coeff when hybrid. So you mean that for the class2 style, even if the reported diagnostic message is incorrect, the parameters have already been mixed correctly, right?


Please set up a minimal test input without hybrid and only class2 and you should see.

Please also note that when using a hybrid pair style mixing can be restricted and sometimes not what you expect. Thus it would be safer to take the output from your test with explicit I,J pair_coeff settings and adapt it for hybrid and include this in your input rather than depending on the mixing.

It helps me a lot, thank you very much!

Best wishes!!!