Setting different charges for same LAMMPS tipe when using different pair_coefficients

Hello all,

I am trying to set different charges for a same atom type (say type 1), depending on whether this atom type interacts with different other atoms types.

For example, I would like to:

  • set the charge of type 1 equal to 1.05 when using a pair_coeff 1 2 buck
  • set the charge of type 1 equal to 1.3 when using a pair_coeff 1 3 lj/cut

Do you have any suggestions on how this may be done?

Thank you in advance for your time and help,


That is a very, VERY bad idea since it is inconsistent. The charge of an atom is a per-atom property and not a per-pair-of-atom property. Thus it is not possible to implement this properly. Technically, it would be possibly with tabulated pair styles and possibly with pair style lepton, but then again, only when you use individual tables per pairs of atoms and no kspace style, since that expects per-atom charges.

Thank you for your reply. Actually, the idea comes from a published article that I would like to replicate for benchmarking purposes. I am not so familiar with tabulated pair styles, would you have any suggestion on how they may be used to set the different charges ?
Thank you in advance.

Please have a look at the pair_write command.

You can also consider using the lepton pair style. In that case, you don’t assign any charges at all, but include the coulomb interaction with the set charges directly into the expression.