The Ewald sum is a technique for efficiently summing the interaction between an ion and all its periodic images. It was originally developed in the study of ionic crystals [Ewald 1921, Madelung 1918].
The basic model for a neutral periodic system is a system of charged point ions mutually interacting via the Coulomb potential. In Ewald method , firstly each ion is effectively neutralized (at long range) by the superposition of a spherical Gaussian cloud of opposite charge centered on the ion. The combined assembly of point ions and Gaussian charges becomes the Real Space part of the Ewald, which is now short-ranged. Second, is to superimpose a second set of Gaussian charges, this time with the same charges as the original point ions and again centered on the point ions (so nullifying the effect of the first set of Gaussians). The potential due to these Gaussians is obtained from Poisson's equation and is solved as a Fourier series in Reciprocal Space. Also there are other correction terms, such as the self-energy and surface dipole and so on. The expression for Coulomb energy is:

Here: where the “daggered" summation indicates omission of site pairs i, j belonging to the same molecule if n = 0. In our model the fourth and fifth summation is set to be zero, because we use the rigid body molecular and the whole system has zero net charge.

