public static double evalSimpleIndex ( IAtomContainer atomContainer , List < List < Integer > > fragLists ) { double sum = 0 ; for ( List < Integer > fragList : fragLists ) { double prod = 1.0 ; for ( Integer atomSerial : fragList ) { IAtom atom = atomContainer . getAtom ( atomSerial ) ; int nconnected = atomContainer . getConnectedBondsCount ( atom ) ; prod = prod * nconnected ; } if ( prod != 0 ) sum += 1.0 / Math . sqrt ( prod ) ; } return sum ; }
Evaluates the simple chi index for a set of fragments .