[lammps-users] pairstyle command

Hi,

I have a small question regarding pair_style.
The system has polymeric fluid and wall atoms each assigned different atom types.
I want to do something like this

interaction between polymeric atoms

pair_style lj/cut 1.12
pair_modify shift yes
pair_coeff 1 1 1.0 1.0 1.12

interaction between polymeric fluid and wall atoms

pair_style lj/cut 2.5
pair_modify shift no
pair_coeff 1 2 1.0 1.0 2.5
pair_coeff 2 2 1.0 1.0 0.0

run 10000

i.e., I want to use shift=yes for the interaction between polymeric atoms (to avoid overlaps) and shift=no for the interaction between polymers and wall atoms.
Now my question is does using ‘pair_modify shift = no’ at the second instance affect the one defined above?

Thanks
Srikanth Dhondi

Srikanth,

Yes, the second instance does affect the first. You are turning the shifting off and then back on again. Note that "pair_modify shift yes" does not affect the dynamics, only the potential energy.

Typically, you'll only want one pair_style command and one pair_modify command, unless you are doing a hybrid pair style, or running then switching pair styles then running again.

You probably want something like:

pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 1.12
pair_coeff 1 2 1.0 1.0 2.5
pair_coeff 2 2 1.0 1.0 0.0
run 10000

Paul

Paul,

Yeah, I thought the same. But when I use the second set of commands it produces
different dynamics to the first one. I don’t understand this. Any suggestions
would be great!

Cheers
Srikanth

Srikanth,

Your second set of commands changes more than just the shifting. If you only toggle the shifting, the dynamics should not change.

Paul