code: protected IRingSet getRingSet(IAtomContainer atomContainer) {
  
          IRingSet ringSet = atomContainer.getBuilder().newInstance(IRingSet.class);
          try {
              IAtomContainerSet molecules = ConnectivityChecker.partitionIntoMolecules(atomContainer);
              for (IAtomContainer mol : molecules.atomContainers()) {
                  ringSet.add(Cycles.sssr(mol).toRingSet());
              }
  
              return ringSet;
          } catch (Exception exception) {
              logger.warn("Could not partition molecule: " + exception.getMessage());
              logger.debug(exception);
              return ringSet;
          }
      }
docs: Determine the ring set for this atom container.
  
  @param atomContainer the atom container to find rings in.
  @return the rings of the molecule