/** * Initiate the MolecularFormulaGenerator. * * @param minMass * Lower boundary of the target mass range * @param maxMass * Upper boundary of the target mass range * @param mfRange * A range of elemental compositions defining the search space * @throws IllegalArgumentException * In case some of the isotopes in mfRange has undefined exact * mass or in case illegal parameters are provided (e.g., * negative mass values or empty MolecularFormulaRange) * @see MolecularFormulaRange */ public MolecularFormulaGenerator(final IChemObjectBuilder builder, final double minMass, final double maxMass, final MolecularFormulaRange mfRange) { checkInputParameters(builder,minMass,maxMass,mfRange); this.formulaGenerator = isIllPosed(minMass, maxMass, mfRange) ? new FullEnumerationFormulaGenerator(builder, minMass, maxMass, mfRange) : new RoundRobinFormulaGenerator(builder, minMass, maxMass, mfRange); }