code: public static IAtomContainerSet getAllMolecules(IReactionSet set) {
          IAtomContainerSet moleculeSet = set.getBuilder().newInstance(IAtomContainerSet.class);
          for (IReaction reaction : set.reactions()) {
              IAtomContainerSet molecules = ReactionManipulator.getAllMolecules(reaction);
              for (IAtomContainer ac : molecules.atomContainers()) {
                  boolean contain = false;
                  for (IAtomContainer atomContainer : moleculeSet.atomContainers()) {
                      if (atomContainer.equals(ac)) {
                          contain = true;
                          break;
                      }
                  }
                  if (!contain) moleculeSet.addAtomContainer(ac);
  
              }
          }
          return moleculeSet;
      }
docs: get all Molecules object from a set of Reactions.
  
  @param set The set of reaction to inspect
  @return    The IAtomContanerSet