where the sum is over all atoms b in the whole simulation box. The repeat index k ′ = k if the cell number C b for atom b is greater than or equal to the current cell number C a for atom a for which energy and force are to be calculated, and