code: public IRingSet findAllRingsInIsolatedRingSystem(IAtomContainer atomContainer, int maxRingSize) throws CDKException {
  
          final EdgeToBondMap edges = EdgeToBondMap.withSpaceFor(atomContainer);
          final int[][] graph = GraphUtil.toAdjList(atomContainer, edges);
  
          AllCycles ac = new AllCycles(graph, maxRingSize, threshold.value);
  
          if (!ac.completed()) throw new CDKException("Threshold exceeded for AllRingsFinder");
  
          IRingSet ringSet = atomContainer.getBuilder().newInstance(IRingSet.class);
  
          for (int[] path : ac.paths()) {
              ringSet.addAtomContainer(toRing(atomContainer, edges, path));
          }
  
          return ringSet;
      }
docs: Compute all rings up to an including the {@literal maxRingSize}. No
  pre-processing is done on the container.
  
  @param atomContainer the molecule to be searched for rings
  @param maxRingSize   Maximum ring size to consider. Provides a possible
  breakout from recursion for complex compounds.
  @return a RingSet containing the rings in molecule
  @throws CDKException An exception thrown if the threshold was exceeded