public static double calculateAverageBondLength ( IChemModel model ) { // empty models have to have a scale IAtomContainerSet moleculeSet = model . getMoleculeSet ( ) ; if ( moleculeSet == null ) { IReactionSet reactionSet = model . getReactionSet ( ) ; if ( reactionSet != null ) { return calculateAverageBondLength ( reactionSet ) ; } return 0.0 ; } return calculateAverageBondLength ( moleculeSet ) ; }
Calculate the average bond length for the bonds in a chem model .