fn k_space_energy(&mut self, configuration: &Configuration) -> f64 {
        self.eik_dot_r(configuration);

        let energy = self.factors.energy
            .par_iter()
            .zip_eq(&self.rho)
            .map(|(factor, rho)| factor * rho.norm2())
            .sum::<f64>();

        return energy / FOUR_PI_EPSILON_0;
    }
/// k-space contribution to the energy
k-space contribution to the energy
k - space contribution to the energy
fn k_space_energy(&mut self, configuration: &Configuration) -> f64 {
        self.eik_dot_r(configuration);
        let energy = self.factors.energy
            .par_iter()
            .zip_eq(&self.rho)
            .map(|(factor, rho)| factor * rho.norm2())
            .sum::<f64>();
        return energy / FOUR_PI_EPSILON_0;
    }
fn k_space_energy ( & mut self , configuration : & Configuration ) -> f64 { self . eik_dot_r ( configuration ) ; let energy = self . factors . energy . par_iter ( ) . zip_eq ( & self . rho ) . map ( | ( factor , rho ) | factor * rho . norm2 ( ) ) . sum :: < f64 > ( ) ; return energy / FOUR_PI_EPSILON_0 ; }
k-space contribution to the energy
k - space contribution to the energy
&mut self
configuration
&Configuration