The long-range interaction energy is the sum of interaction energies between the charges of a central unit cell and all the charges of the lattice. Hence, it can be represented as a double integral over two charge density fields representing the fields of the unit cell and the crystal lattice E ℓ ℓ r = ∬ ∬ d r d r ′ ′ ρ ρ TOT ( r ) ρ ρ u c ( r ′ ′ ) φ φ ℓ ℓ r ( r − − r ′ ′ ) where the unit-cell charge density field ρ ρ u c ( r ) is a sum over the positions r k of the charges q k in the central unit cell ρ ρ u c ( r ) = d e f ∑ ∑ c h a r g e s k q k δ δ ( r − − r k ) and the total charge density field ρ ρ TOT ( r ) is the same sum over the unit-cell charges q k and their periodic images ρ ρ TOT ( r ) = d e f ∑ ∑ n 1 , n 2 , n 3 ∑ ∑ c h a r g e s k q k δ δ ( r − − r k − − n 1 a 1 − − n 2 a 2 − − n 3 a 3 )