[lammps-users] Pair style hybrid cannot use same pair style twice

Hi,

I would like to simulate the metal friction lubricated by polymer.

Firstly, I use hybrid potential to push apart overlapping polymer atoms.
It run successfully. The potential is as follows:

pair_style hybrid eam/fs soft 4.9535 lj/cut 10.1125
pair_coeff * * eam/fs Fe_mm.eam.fs Fe Fe NULL
pair_coeff 3 3 soft 0.004352 0.087035 4.9535
pair_coeff 1*2 3 lj/cut 0.017407 4.0450 10.1125

After pushing apart overlapping polymer atoms, I would like to run the
simulation with the following potential.

pair_style hybrid eam/fs lj/cut 10.1125 lj/cut 10.1125
pair_coeff * * eam/fs Fe_mm.eam.fs Fe Fe NULL
pair_coeff 3 3 lj/cut 0.004352 4.0450 10.1125
pair_coeff 1*2 3 lj/cut 0.017407 4.0450 10.1125

I got the ERROR message: Pair style hybrid cannot use same pair style
twice. The manual said that "The sub−style arguments of pair_style
hybrid cannot be duplicated". However, I have changed the sub arguments
from "soft" to "lj/cut". Could you please help me to check this matter?

Regards,

Eric

Hi Hongtao,

You’re getting that error because you’re using lj/cut twice. It should only be written once in the pair_style part. See below

pair_style hybrid eam/fs lj/cut 10.1125

in the pair_coeff part you can use lj/cut as many times as you want though.

Jaime