public static int getExplicitHydrogenCount ( IAtomContainer atomContainer , IAtom atom ) { int hCount = 0 ; for ( IAtom iAtom : atomContainer . getConnectedAtomsList ( atom ) ) { IAtom connectedAtom = iAtom ; if ( connectedAtom . getSymbol ( ) . equals ( "H" ) ) { hCount ++ ; } } return hCount ; }
Returns The number of explicit hydrogens for a given IAtom .