### abstract

- The convergence of the electrostatic energy in calculations using periodic boundary conditions is considered in the context of periodic solids and localized aperiodic systems in the gas and condensed phases. Conditions for the absolute convergence of the total energy in periodic boundary conditions are obtained, and their implications for calculations of the properties of polarized solids under the zero-field assumption are discussed. For aperiodic systems the exact electrostatic energy functional in periodic boundary conditions is obtained. The convergence in such systems is considered in the limit of large supercells, where, in the gas phase, the computational effort is proportional to the volume. It is shown that for neutral localized aperiodic systems in either the gas or condensed phases, the energy can always be made to converge as O(${\mathit{L}}^{\mathrm{\ensuremath{-}}5}$) where L is the linear dimension of the supercell. For charged systems, convergence at this rate can be achieved after adding correction terms to the energy to account for spurious interactions induced by the periodic boundary conditions. These terms are derived exactly for the gas phase and heuristically for the condensed phase.