Kspace paiwise interaction coming negative for like charges

Dear users,

I am trying to calculate the Coulombic interaction between pairwise atoms in Li2SiO3 using the trajectory file., There are positively charged lithium (Li) and silicon(Si) ions and two type of negatively charged cxygen (O1,O2) ions in the system. This is a 3-D periodic system, the pair_style is buck/coul/long, and kspace_style is ewald 0.00001. I used “group/group pair yes kspace yes” command to calculate the Coulombic interaction.

The long range part of the Coulombic interaction i.e. from the “kspace” in the result is coming negative for like charges (Li-Li, Li-Si) and positive for unlike charges (Li-O1,Si-O1,Li-O2,Si-O2), which contradicts the conventional sign method for energy. What is the problem I am doing here? Is there any way to calculate this kspace part correctly.

I am attaching the input file here.

in.Li2SiO3 (1.5 KB)


There is no physical meaning to the partition between short- and long-ranged components of Coulombic force in a molecular dynamics simulation. That distribution will change depending on the Coulombic cutoff used.

Furthermore, there is no physical meaning to the overall interaction energy between two periodic infinite* collections of charges when their total charge is nonzero, since the interaction energy of any periodic infinite collection of charges is only conditionally convergent, unless the boundary conditions used to evaluate the sum are carefully chosen.

It looks like you are trying to calculate some kind of Madelung constant. You will only get a consistent answer for the total Coulombic energy instead of separate pair and kspace components.

Thanks for the answer.

I also get the total Coulombic interaction (short + long range) negative for like charges which is due to this long rang part. Basically, I want to calculate the interaction between Li-Li ions in the Li2SiO3 system which is coming negative here.

Is there any way to calculate the Li-Li interactions in the system?

You should check the literature to determine what exactly you want to calculate. I do not know of any experimental observables that depend on this (mathematically poorly-defined) quantity. If you come across any papers that use it, those papers should tell you how to calculate it.

Unfortunately there are no such paper regarding this. I want see the Li-Li correlation in the system. How much an Li ion interacts with all the Li ions present in the system which is obvious a positive quantity. This is my motive.

No, it is not. You are computing the Coulomb interaction plus the Born-Mayer-Huggins non-bonded interaction in your compute group/group command and that combination can have a negative energy if there are atoms at short separation, even for like charged particles. It is a known issue with these kinds of potentials and thus special care must be taken during equilibration to avoid atoms pass over/through the barrier.

The input file is useless without the data and trajectory files that are used by the input.
Murphy’s Law suggests that the cause for unexpected behavior is always in the parts of an input deck that are not shown.

Okay. Thanks