public static boolean deAromatize ( IRing ring ) { boolean allaromatic = true ; for ( int i = 0 ; i < ring . getBondCount ( ) ; i ++ ) { if ( ! ring . getBond ( i ) . getFlag ( CDKConstants . ISAROMATIC ) ) allaromatic = false ; } if ( ! allaromatic ) return false ; for ( int i = 0 ; i < ring . getBondCount ( ) ; i ++ ) { if ( ring . getBond ( i ) . getFlag ( CDKConstants . ISAROMATIC ) ) ring . getBond ( i ) . setOrder ( IBond . Order . SINGLE ) ; } boolean result = false ; IMolecularFormula formula = MolecularFormulaManipulator . getMolecularFormula ( ring ) ; // Map elementCounts = new MFAnalyser(ring).getFormulaHashtable(); if ( ring . getRingSize ( ) == 6 ) { if ( MolecularFormulaManipulator . getElementCount ( formula , new Element ( "C" ) ) == 6 ) { result = DeAromatizationTool . deAromatizeBenzene ( ring ) ; } else if ( MolecularFormulaManipulator . getElementCount ( formula , new Element ( "C" ) ) == 5 && MolecularFormulaManipulator . getElementCount ( formula , new Element ( "N" ) ) == 1 ) { result = DeAromatizationTool . deAromatizePyridine ( ring ) ; } } if ( ring . getRingSize ( ) == 5 ) { if ( MolecularFormulaManipulator . getElementCount ( formula , new Element ( "C" ) ) == 4 && MolecularFormulaManipulator . getElementCount ( formula , new Element ( "N" ) ) == 1 ) { result = deAromatizePyrolle ( ring ) ; } } return result ; }
Methods that takes a ring of which all bonds are aromatic and assigns single and double bonds . It does this in a non - general way by looking at the ring size and take everything as a special case .