private boolean checkRingLink ( IRingSet ringSet , IAtomContainer ac , IAtom atom ) { List < IAtom > neighbours = ac . getConnectedAtomsList ( atom ) ; if ( ringSet . contains ( atom ) ) { return true ; } for ( IAtom neighbour : neighbours ) { if ( ringSet . contains ( neighbour ) ) { return true ; } } return false ; }
Check if atom or neighbour atom is part of a ring