pub fn new(cutoff: f64) -> Wolf {
        assert!(cutoff > 0.0, "Got a negative cutoff in Wolf summation");
        let alpha = PI / cutoff;

        let alpha_cutoff = alpha * cutoff;
        let alpha_cutoff_2 = alpha_cutoff * alpha_cutoff;

        let energy_constant = erfc(alpha_cutoff) / cutoff;
        let force_constant = erfc(alpha_cutoff) / (cutoff * cutoff) + FRAC_2_SQRT_PI * alpha * f64::exp(-alpha_cutoff_2) / cutoff;
        Wolf {
            alpha: alpha,
            cutoff: cutoff,
            energy_constant: energy_constant,
            force_constant: force_constant,
            restriction: PairRestriction::None,
        }
    }
/// Create a new Wolf summation, using a real-space cutoff of `cutoff`.
Create a new Wolf summation, using a real-space cutoff of `cutoff`.
Create a new Wolf summation using a real - space cutoff of ` cutoff ` .
pub fn new(cutoff: f64) -> Wolf {
        assert!(cutoff > 0.0, "Got a negative cutoff in Wolf summation");
        let alpha = PI / cutoff;
        let alpha_cutoff = alpha * cutoff;
        let alpha_cutoff_2 = alpha_cutoff * alpha_cutoff;
        let energy_constant = erfc(alpha_cutoff) / cutoff;
        let force_constant = erfc(alpha_cutoff) / (cutoff * cutoff) + FRAC_2_SQRT_PI * alpha * f64::exp(-alpha_cutoff_2) / cutoff;
        Wolf {
            alpha: alpha,
            cutoff: cutoff,
            energy_constant: energy_constant,
            force_constant: force_constant,
            restriction: PairRestriction::None,
        }
    }
pub fn new ( cutoff : f64 ) -> Wolf { assert ! ( cutoff 0.0 " " ) ; let alpha = PI / cutoff ; let alpha_cutoff = alpha * cutoff ; let alpha_cutoff_2 = alpha_cutoff * alpha_cutoff ; let energy_constant = erfc ( alpha_cutoff ) / cutoff ; let force_constant = erfc ( alpha_cutoff ) / ( cutoff * cutoff ) + FRAC_2_SQRT_PI * alpha * f64 :: exp ( - alpha_cutoff_2 ) / cutoff ; Wolf { alpha : alpha , cutoff : cutoff , energy_constant : energy_constant , force_constant : force_constant , restriction : PairRestriction :: None , } }
Create a new Wolf summation, using a real-space cutoff of `cutoff`.
Create a new Wolf summation using a real - space cutoff of ` cutoff ` .
cutoff
f64