private boolean isMacroCycle ( IRing ring , IRingSet rs ) { if ( ring . getAtomCount ( ) < 8 ) return false ; for ( IBond bond : ring . bonds ( ) ) { boolean found = false ; for ( IAtomContainer other : rs . atomContainers ( ) ) { if ( ring == other ) continue ; if ( other . contains ( bond ) ) { found = true ; break ; } } if ( ! found ) return true ; } return false ; }
Check if a ring in a ring set is a macro cycle . We define this as a ring with > = 10 atom and has at least one bond that isn t contained in any other rings .