Dear LAMMPS users,
I would like to know how periodic boundary conditions are applied in pairwise interactions and neighbor list building.
For instance, in pair_lj_cut.cpp, I see that the difference in positions between atoms i and j is computed by delx, dely and delz which are basically (x[i] - x[j]), etc. The same is in neigh_full.cpp.
By the way, why the position of i is saved into xtmp, ytmp and ztmp before calculating the distance?