private Set < IChemObject > getAromatics ( IAtomContainer mol ) { Set < IChemObject > oldArom = new HashSet <> ( ) ; for ( IAtom atom : mol . atoms ( ) ) if ( atom . getFlag ( CDKConstants . ISAROMATIC ) ) oldArom . add ( atom ) ; for ( IBond bond : mol . bonds ( ) ) if ( bond . getFlag ( CDKConstants . ISAROMATIC ) ) oldArom . add ( bond ) ; return oldArom ; }
Helper method to find all existing aromatic chem objects .