private static boolean isRingSystemSproutedWithNonRingDoubleBonds(IAtomContainer fullContainer,
            IAtomContainer isolatedRingSystem) {
        Iterator<IAtom> atoms = isolatedRingSystem.atoms().iterator();
        while (atoms.hasNext()) {
            IAtom atom = atoms.next();
            Iterator<IBond> neighborBonds = fullContainer.getConnectedBondsList(atom).iterator();
            while (neighborBonds.hasNext()) {
                IBond neighborBond = neighborBonds.next();
                if (!neighborBond.getFlag(CDKConstants.ISINRING)
                        && neighborBond.getOrder() == Order.DOUBLE
                        || neighborBond.getOrder() == Order.TRIPLE) {
                    if (!("N.sp2.3".equals(atom.getAtomTypeName()) && "O.sp2".equals(neighborBond
                                                                                         .getOther(atom).getAtomTypeName()))) return true;
                }
            }
        }
        return false;
    }
private static boolean isRingSystemSproutedWithNonRingDoubleBonds ( IAtomContainer fullContainer , IAtomContainer isolatedRingSystem ) { Iterator < IAtom > atoms = isolatedRingSystem . atoms ( ) . iterator ( ) ; while ( atoms . hasNext ( ) ) { IAtom atom = atoms . next ( ) ; Iterator < IBond > neighborBonds = fullContainer . getConnectedBondsList ( atom ) . iterator ( ) ; while ( neighborBonds . hasNext ( ) ) { IBond neighborBond = neighborBonds . next ( ) ; if ( ! neighborBond . getFlag ( CDKConstants . ISINRING ) && neighborBond . getOrder ( ) == Order . DOUBLE || neighborBond . getOrder ( ) == Order . TRIPLE ) { if ( ! ( "N.sp2.3" . equals ( atom . getAtomTypeName ( ) ) && "O.sp2" . equals ( neighborBond . getOther ( atom ) . getAtomTypeName ( ) ) ) ) return true ; } } } return false ; }
Determines if the isolatedRingSystem has attached double bonds, which are not part of the ring system itself,
and not part of any other ring system. Exceptions: a N.sp2.3 nitrogen with a double ring to an
oxygen outwards.