code: public static IMolecularFormulaSet remove(IMolecularFormulaSet formulaSet, MolecularFormulaRange formulaRange) {
  
          IMolecularFormulaSet newFormulaSet = formulaSet.getBuilder().newInstance(IMolecularFormulaSet.class);
  
          for (IMolecularFormula formula : formulaSet.molecularFormulas()) {
  
              boolean flagCorrect = true;
              Iterator<IIsotope> itEle = formulaRange.isotopes().iterator();
              for (IIsotope isotope : formulaRange.isotopes()) {
                  if (formula.getIsotopeCount(isotope) != 0) {
                      if ((formula.getIsotopeCount(isotope) < formulaRange.getIsotopeCountMin(isotope))
                              || (formula.getIsotopeCount(isotope) > formulaRange.getIsotopeCountMax(isotope))) {
                          flagCorrect = false;
                          break;
                      }
                  } else if (formulaRange.getIsotopeCountMin(isotope) != 0) {
                      flagCorrect = false;
                      break;
                  }
              }
              itEle = formula.isotopes().iterator();
              while (itEle.hasNext()) {
                  IIsotope isotope = itEle.next();
                  if (!formulaRange.contains(isotope)) {
                      flagCorrect = false;
                      break;
                  }
              }
              if (flagCorrect) // stored if each IElement occurrence is into the limits
                  newFormulaSet.addMolecularFormula(formula);
  
          }
          return newFormulaSet;
      }
docs: Remove all those IMolecularFormula which are not fit theirs IElement
  occurrence into a limits. The limits are given from formulaMax and formulaMin.
  In the minimal IMolecularFormula must contain all those IElement found in the
  minimal IMolecularFormula.
  
  @param formulaSet   IMolecularFormulaSet to look for
  @param formulaRange A IMolecularFormulaRange which contains the range representation of the IIsotope