Skip to main content

ewald_real_space_energy

Function ewald_real_space_energy 

Source
pub fn ewald_real_space_energy(set: &AtomSet, alpha: f64, r_cut: f64) -> f64
Expand description

Compute the real-space component of the Ewald sum for electrostatics.

Uses the complementary error function (erfc) for the short-range part. Returns the electrostatic potential energy in reduced units.

§Arguments

  • set - the atom set with charges and positions
  • alpha - Ewald convergence parameter (larger α → more work in reciprocal space)
  • r_cut - real-space cutoff radius