pub fn pairs(&self) -> f64 {
        let energies = (0..self.system.size()).into_par_iter().map(|i| {
            let mut local_energy = 0.0;

            for j in (i + 1)..self.system.size() {
                let r = self.system.nearest_image(i, j).norm();
                let path = self.system.bond_path(i, j);
                local_energy += self.pair(path, r, i, j);
            }
            local_energy
        });
        return energies.sum();
    }
/// Compute the energy of all the pairs in the system
Compute the energy of all the pairs in the system
Compute the energy of all the pairs in the system
pub fn pairs(&self) -> f64 {
        let energies = (0..self.system.size()).into_par_iter().map(|i| {
            let mut local_energy = 0.0;
            for j in (i + 1)..self.system.size() {
                let r = self.system.nearest_image(i, j).norm();
                let path = self.system.bond_path(i, j);
                local_energy += self.pair(path, r, i, j);
            }
            local_energy
        });
        return energies.sum();
    }
pub fn pairs ( & self ) -> f64 { let energies = ( 0 .. self . system . size ( ) ) . into_par_iter ( ) . map ( | i | { let mut local_energy = 0.0 ; for j in ( i + 1 ) .. self . system . size ( ) { let r = self . system . nearest_image ( i , j ) . norm ( ) ; let path = self . system . bond_path ( i , j ) ; local_energy += self . pair ( path , r , i , j ) ; } local_energy } ) ; return energies . sum ( ) ; }
Compute the energy of all the pairs in the system
Compute the energy of all the pairs in the system
&self