pub fn dihedrals(&self) -> f64 {
        let mut energy = 0.0;
        for molecule in self.system.molecules() {
            for dihedral in molecule.dihedrals() {
                let (i, j, k, m) = (dihedral.i(), dihedral.j(), dihedral.k(), dihedral.m());
                let phi = self.system.dihedral(i, j, k, m);
                energy += self.dihedral(phi, i, j, k, m);
            }
        }
        return energy;
    }
/// Compute the energy of all the dihedral angles in the system
Compute the energy of all the dihedral angles in the system
Compute the energy of all the dihedral angles in the system
pub fn dihedrals(&self) -> f64 {
        let mut energy = 0.0;
        for molecule in self.system.molecules() {
            for dihedral in molecule.dihedrals() {
                let (i, j, k, m) = (dihedral.i(), dihedral.j(), dihedral.k(), dihedral.m());
                let phi = self.system.dihedral(i, j, k, m);
                energy += self.dihedral(phi, i, j, k, m);
            }
        }
        return energy;
    }
pub fn dihedrals ( & self ) -> f64 { let mut energy = 0.0 ; for molecule in self . system . molecules ( ) { for dihedral in molecule . dihedrals ( ) { let ( i , j , k , m ) = ( dihedral . i ( ) , dihedral . j ( ) , dihedral . k ( ) , dihedral . m ( ) ) ; let phi = self . system . dihedral ( i , j , k , m ) ; energy += self . dihedral ( phi , i , j , k , m ) ; } } return energy ; }
Compute the energy of all the dihedral angles in the system
Compute the energy of all the dihedral angles in the system
&self