code: public Double isValidSum(IMolecularFormula formula) {
          double result = 1.0;
  
          IMolecularFormula formulaWith = isValid(formula);
          Map<Object, Object> properties = formulaWith.getProperties();
  
          Iterator<IRule> iterRules = rules.iterator();
          while (iterRules.hasNext()) {
              result *= (Double) properties.get(iterRules.next().getClass());
          }
          return result;
      }
docs: Validate if a IMolecularFormula is valid. The result more close to 1 means
  maximal probability to be valid. Opposite more close to 0 means minimal
  probability to be valid. To know the result in each IRule use
  {@link #isValid(IMolecularFormula)}
  
  @param  formula      The IMolecularFormula value
  @return              The percent of the validity
  @see                 #isValid(IMolecularFormula)