Questions about ewald.cpp

Hi LAMMPS,

I met some questions about ewald.cpp. Firstly, when we use gaussian charge distribution, the short range force has a form of erfc function. And in the ewald.cpp, we try to use extract(‘cut_coul’, itmp) to get a cut-off radius. But how do we calculate the short range term in real space.

Secondly, I am confused about the virial calculation per atom ug[k]*vg[k][j]*partial_peratom. How does this formula comes. Is there any reference.

Thanks for your patience and help.

Best,
Shiyi Qin

Ewald (and PPPM) in LAMMPS is a kspace-style designed to

be used with a pair_style command that performs the

short-range real-space part. Such pair styles have the

word “long” in their style name. E.g. pair lj/cut/coul/long.

Stan can answer the Q about per-atom energy/virial contributions

from Ewald/PPPM.

Steve

This document describes per-atom energy in Kspace, and the per-atom virial is similar. http://lammps.sandia.gov/doc/PDF/kspace.pdf

Do you have a specific question?