Dear Nong,
When you use the analytical derivatives to calculate the force, do you consider the restriction of periodic boundary condition? To be more specific, the simulation box in MD may not be very big, so the periodic atom i' may also be included in the neighborlist of atom i. The total energy of atoms in the neighborlist can be written as E(ri,ri',......,rj), due to the periodic boundary condition, ri' always equals to ri + n1a+n2b+n3c (a,b,c are three lattice vectors), so when when calculating dE/dri , we need to consider both ri and ri' because thees coordinates are related. Thank you.
Sincerely,