The Ewald sum is an approximate method used to calculate the long-range portion of a potential energy term (e.g., electrostatic) in classical simulations where periodic boundary conditions are used. Energy terms at distances less than a defined cutoff value are calculated directly in real space. However, for distances greater than this cutoff (extending to infinite distance), the energy terms are calculated in reciprocal space.