code: private static IRingSet walkRingSystem(IRingSet rs, IRing ring, IRingSet newRs) {
          IRing tempRing;
          IRingSet tempRings = rs.getConnectedRings(ring);
          //        logger.debug("walkRingSystem -> tempRings.size(): " + tempRings.size());
          rs.removeAtomContainer(ring);
          for (IAtomContainer container : tempRings.atomContainers()) {
              tempRing = (IRing) container;
              if (!newRs.contains(tempRing)) {
                  newRs.addAtomContainer(tempRing);
                  newRs.add(walkRingSystem(rs, tempRing, newRs));
              }
          }
          return newRs;
      }
docs: Perform a walk in the given RingSet, starting at a given Ring and
  recursively searching for other Rings connected to this ring. By doing
  this it finds all rings in the RingSet connected to the start ring,
  putting them in newRs, and removing them from rs.
  
  @param  rs     The RingSet to be searched
  @param  ring   The ring to start with
  @param  newRs  The RingSet containing all Rings connected to ring
  @return        newRs The RingSet containing all Rings connected to ring