pub fn ewald_real_space_energy(set: &AtomSet, alpha: f64, r_cut: f64) -> f64Expand 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 positionsalpha- Ewald convergence parameter (larger α → more work in reciprocal space)r_cut- real-space cutoff radius