Calculates molecular weight from given formula. Enumerate possible formulas for a given weight.