pub fn bonds(&self) -> f64 {
        let mut energy = 0.0;
        for molecule in self.system.molecules() {
            for bond in molecule.bonds() {
                let (i, j) = (bond.i(), bond.j());
                let r = self.system.nearest_image(i, j).norm();
                energy += self.bond(r, i, j);
            }
        }
        return energy;
    }
/// Compute the energy of all the bonds in the system
Compute the energy of all the bonds in the system
Compute the energy of all the bonds in the system
pub fn bonds(&self) -> f64 {
        let mut energy = 0.0;
        for molecule in self.system.molecules() {
            for bond in molecule.bonds() {
                let (i, j) = (bond.i(), bond.j());
                let r = self.system.nearest_image(i, j).norm();
                energy += self.bond(r, i, j);
            }
        }
        return energy;
    }
pub fn bonds ( & self ) -> f64 { let mut energy = 0.0 ; for molecule in self . system . molecules ( ) { for bond in molecule . bonds ( ) { let ( i , j ) = ( bond . i ( ) , bond . j ( ) ) ; let r = self . system . nearest_image ( i , j ) . norm ( ) ; energy += self . bond ( r , i , j ) ; } } return energy ; }
Compute the energy of all the bonds in the system
Compute the energy of all the bonds in the system
&self