[lammps-users] kspace precision value

Dear LAMMPS,

I am using pair_style lj/cut/coul/long with kspace_style ewald for my simulation. When I changed the precision value for the ewald sum (I've tried 1.0e-4, 1.0e-5, 1.0e-6, 1.0e-7, 1.0e-8, 1.0e-20), the magnitudes for the potential energies gets larger, and the reported values for the G vector gets larger. Is this normal/expected behavior?

I am trying to understand the relationship between the precision value and the G vector (as well as kcount, kmax, kmax3d) with what Allen&Tildesley call kappa and the number of k-vectors used in a standard Ewald calculation. I've looked over the source code a bit, but I cannot figure out exactly what's going on. For a while I thought that G vector (g_ewald) might correspond to kappa, but then I saw some lines which didn't make sense to me ...

If anyone has a explanation for how I can make these connections, I'd really appreciate it.

Thanks!
Joyce

Joyce,

LAMMPS’s g_ewald is the same as A&T’s kappa (see Eq. 5.20). But LAMMPS uses a different method for picking the actual value of g_ewald that is used in the Ewald calculation:

g_ewald = (1.35 - 0.15*log(precision))/cutoff;

instead of:

kappa = 5/L

You’re probably looking at “E_long” instead of “PotEng”. As expected, the long-range energy, E_long, grows when shrinking the tolerance. E_coul shrinks by approximately the same amount as E_long grows, so PotEng remains very nearly constant. As you shrink the tolerance, LAMMPS is using more and more k-space vectors, pushing more and more of calculation from real to reciprocal space, so this effect is expected. Now if you’re truly seeing PotEng grow, there is probably an issue, but my tests here with the peptide problem in the examples folder showed no such effect.

For efficiency, you’ll probably want to go to PPPM instead of Ewald.

Paul