code: private static List<List<Integer>> getUniqueBondSubgraphs(List<List<RMap>> subgraphs, IAtomContainer ac) {
          List<List<Integer>> bondList = new ArrayList<List<Integer>>();
          for (List<RMap> subgraph : subgraphs) {
              List<RMap> current = subgraph;
              List<Integer> ids = new ArrayList<Integer>();
              for (RMap aCurrent : current) {
                  RMap rmap = (RMap) aCurrent;
                  ids.add(rmap.getId1());
              }
              Collections.sort(ids);
              bondList.add(ids);
          }
  
          // get the unique set of bonds
          HashSet<List<Integer>> hs = new HashSet<List<Integer>>(bondList);
          bondList = new ArrayList<List<Integer>>(hs);
  
          List<List<Integer>> paths = new ArrayList<List<Integer>>();
          for (List<Integer> aBondList1 : bondList) {
              List<Integer> aBondList = aBondList1;
              List<Integer> tmp = new ArrayList<Integer>();
              for (Object anABondList : aBondList) {
                  int bondNumber = (Integer) anABondList;
                  for (IAtom atom : ac.getBond(bondNumber).atoms()) {
                      Integer atomInt = ac.indexOf(atom);
                      if (!tmp.contains(atomInt)) tmp.add(atomInt);
                  }
              }
              paths.add(tmp);
          }
          return paths;
      }
docs: Converts a set of bond mappings to a unique set of atom paths.
  
  This method accepts a <code>List</code> of bond mappings. It first
  reduces the set to a unique set of bond maps and then for each bond map
  converts it to a series of atoms making up the bonds.
  
  @param subgraphs A <code>List</code> of bon mappings
  @param ac        The molecule we are examining
  @return A unique <code>List</code> of atom paths