Question regarding pair_coeff command

Hello everyone,

I have a question regarding the pair_coeff * * and pair_modify commands. It appears that once pair_coeff * * is used, mixing rules no longer apply, regardless of any further modifications. Below is a minimal working example:

region box block 0 1 0 1 0 1
create_box 2 box
mass * 1.0
pair_style lj/cut 1.0

pair_coeff * * 1.0 1.0
pair_coeff 1 1 1.0 1.0
pair_coeff 2 2 2.0 1.0
#pair_coeff 1 2 100.0 1.0

pair_modify mix geometric

run 0 post no

write_coeff mixed.coeffs

It seems that after using pair_coeff * *, mixing rules cannot be applied. For example:

pair_coeff 1 1 1.0 1.0
pair_coeff 2 2 2.0 1.0

pair_modify mix geometric

This works as expected. However, if I introduce the 1-2 interaction using either the pair_coeff * * command or the pair_coeff 1 2 command, the pair_modify command can no longer be executed. I was wondering whether this behavior is correct.

Please let me know if I am doing something wrong or if I have overlooked any relevant information in the [pair_modify](https://docs.lammps.org/pair_modify.html) documentation.

Hi @kv99,

This is documented behavior as using pair_modify * * will set coefficients for 1-1, 2-2 and 1-2 pair interactions. As the doc states:

The mix keyword affects pair coefficients for interactions between atoms of type I and J, when I != J and the coefficients are not explicitly set in the input script.

Since you define a 1-2 interaction through pair_coeff * *, the mixing rule does not apply.

2 Likes

Thanks a lot Germain! I experimented further with the system, and it makes sense now. It appears that pair_modify applies only to the non-specified interactions.

Best,
Karan