MmffAromaticTypeMapping { static int[][] cyclesOfSizeFiveOrSix(IAtomContainer container, int[][] graph) { try { return Cycles.all(6).find(container, graph, 6).paths(); } catch (Intractable intractable) { return new int[0][]; } } MmffAromaticTypeMapping();   }
@Test public void intractableNumberOfCycles() throws Exception { IAtomContainer container = Mockito.mock(IAtomContainer.class); int[][] graphK8 = new int[8][7]; for (int i = 0; i < graphK8.length; i++) { int n = 0; for (int j = 0; j < graphK8.length; j++) { if (i == j) continue; graphK8[i][n++] = j; } } assertThat(MmffAromaticTypeMapping.cyclesOfSizeFiveOrSix(container, graphK8).length, is(0)); }