@ Override public double getBondOrderSum ( IAtom atom ) { double count = 0 ; for ( int i = 0 ; i < bondCount ; i ++ ) { if ( bonds [ i ] . contains ( atom ) ) { if ( bonds [ i ] . getOrder ( ) == IBond . Order . SINGLE ) { count += 1 ; } else if ( bonds [ i ] . getOrder ( ) == IBond . Order . DOUBLE ) { count += 2 ; } else if ( bonds [ i ] . getOrder ( ) == IBond . Order . TRIPLE ) { count += 3 ; } else if ( bonds [ i ] . getOrder ( ) == IBond . Order . QUADRUPLE ) { count += 4 ; } } } return count ; }
Returns the sum of the bond orders for a given Atom .