Dear lammps users,

I had some questions on neighbor list and periodic boundary condition when I tried to understand the source code of pair_lj_cut.cpp. I really appreciate your help.

(1) With 3D periodic boundary condition and a simple cubic lattice system, I checked jnum for each particle i and found that every particle had different number of neighbors. I guess if particle j is in particle i's neighbor list, then i will not be in j's list. Is it right? Can someone explain a bit that ideally how the neighbor list is constructed?

(2) In pair_lj_cut.cpp, the relative distance between i and j (if they are neighbors) is calculated as

xtmp = x[i][0];

ytmp = x[i][1];

ztmp = x[i][2];

delx = xtmp-x[j][0];

dely = ytmp-x[j][1];

delz = ztmp-x[j][2];

rsq = delx*delx + dely*dely + delz*delz;

and there is no nearest periodic boundary image correction, why?

I was using lammps 22Jan08 release and the input and data files are attached. Thanks,

-Peng

data.lj (17.8 KB)

in.lj (542 Bytes)