In principle the sums in the expressions run over all N atoms. However, if the range of the interatomic potential is finite, i.e. the potentials V ( r ) ≡ ≡ 0 above some cutoff distance r c u t , the summing can be restricted to atoms within the cutoff distance of each other. By also using a cellular method for finding the neighbours, the MD algorithm can be an O(N) algorithm. Potentials with an infinite range can be summed up efficiently by Ewald summation and its further developments.