[lammps-users] The Coulomb potential of two atoms with opposite signs is positive with Kspace

Dear Lammps users:

I am trying to calculate the Coulomb potential between two atoms, they are negatively charged chloride ions and positively charged sodium ions. The system is 3-D periodic, the pair_style is lj/cut/coul/long, and kspace_style is ewald 0.0001. I use “group/group pair yes kspace yes” to calculate Coulomb potentail(van der Waals potential is zero).

When the distance between two atoms is 5 Angstrom(the cutoff is 4 Angstrom), the result potential is positive, I don’t know what that mean, I find that potential come from Kspace, does it have a clear physical meaning? Can someone give me some help?

Thanks, and my input file is attached.

Test.data (682 Bytes)

Test.in (1.58 KB)

Dear Lammps users:

I am trying to calculate the Coulomb potential between two atoms, they are negatively charged chloride ions and positively charged sodium ions. The system is 3-D periodic, the pair_style is lj/cut/coul/long, and kspace_style is ewald 0.0001. I use “group/group pair yes kspace yes” to calculate Coulomb potentail(van der Waals potential is zero).

When the distance between two atoms is 5 Angstrom(the cutoff is 4 Angstrom), the result potential is positive, I don’t know what that mean, I find that potential come from Kspace, does it have a clear physical meaning? Can someone give me some help?

have you noticed the warning that LAMMPS prints:

WARNING: Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero (src/compute_group_group.cpp:151)

the physical (or rather mathematical) explanation is that whenever you do a fourier transform of a charge density with a net charge (i.e. a periodic function with an offset), the non-periodic term (the offset) would cause a divergence (i.e. the result would be infinity). since this constant term does not impact the forces (the derivative), it will be ignored during the fourier transform, but that will alter the physics of your system and you will be computing a system that is embedded into a diluted compensating charge. hence the change in energy.

axel.

Dear Axel

Thanks for your reply!But I still have questions. In my opinio, the warning which you mentioned above, is dealt by “correction term” in source code.

What’s more, according to your view, the “compute group/group” can’t calculate the energy of group which is non-electric neutral, so how do I calculate the energy in this case by LAMMPS?

Thank you anyway!

Sincerely

Peng Shen

Dear Axel

Thanks for your reply!But I still have questions. In my opinio, the warning which you mentioned above, is dealt by “correction term” in source code.

this is not a “correction term”, the divergent contribution is simply ignored resulting in a change of the energy (but not the forces since the forces between a point charge and its periodic images cancel exactly for each “layer” of images). people call this a compensation to describe the physical equivalent, but there is no additional computation, let alone a correction.

What’s more, according to your view, the “compute group/group” can’t calculate the energy of group which is non-electric neutral, so how do I calculate the energy in this case by LAMMPS?

what you want to compute is ill-defined when using a lattice sum. effectively, you want to compute the interaction energy between two divergent terms. if you have an infinite lattice of a single positive charge (which has the energy of infinity) interacting with the infinitely large lattice of a single negative change (which also has the energy of infinity). by leaving out the divergent term (which is equivalent to a compensation charge) you also have the interaction between the two compensation charges included.

so what would be the interaction between two infinities be?

axel.