Class MolecularFormulas

java.lang.Object
com.chemaxon.calculations.elemanal.MolecularFormulas

@PublicAPI @Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public class MolecularFormulas extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Static utility methods related to molecular formula calculations.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs an elemental analysis from molecular formula.
    static com.chemaxon.calculations.elemanal.formula.MolecularFormula
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static com.chemaxon.calculations.elemanal.formula.MolecularFormula
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static com.chemaxon.calculations.elemanal.formula.MolecularFormula
    fromMolecule(Molecule molecule, boolean ignorePseudoLabels)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static com.chemaxon.calculations.elemanal.formula.MolecularFormula
    fromMolecule(Molecule molecule, Set<Integer> filteredAtoms, boolean ignorePseudoLabels)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • fromFormula

      public static com.chemaxon.calculations.elemanal.formula.MolecularFormula fromFormula(String formula)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • fromMolecule

      public static com.chemaxon.calculations.elemanal.formula.MolecularFormula fromMolecule(Molecule molecule, Set<Integer> filteredAtoms, boolean ignorePseudoLabels)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • fromMolecule

      public static com.chemaxon.calculations.elemanal.formula.MolecularFormula fromMolecule(Molecule molecule, boolean ignorePseudoLabels)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • fromMolecule

      public static com.chemaxon.calculations.elemanal.formula.MolecularFormula fromMolecule(Molecule molecule)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createAnalysis

      public static ElementalAnalysis createAnalysis(String formula)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs an elemental analysis from molecular formula.

      Multiple fragments with fractional stoichiometric coefficients are supported: CH3O.0.5Na.1.5H2O, NaCl.1.5H2O, AlCl3.1.5H2O
      If the molecular formula contains any unspecified symbol (e.g. R, Pol) the analysis do not take into consideration these symbols. The analysis returns the same result for formulas either with or without these symbols.

      Parameters:
      formula - molecular formula, e.g. C3H8NO2, Al2(CO3)3.2H2O
      Returns:
      an ElementalAnalysis instance
      Throws:
      com.chemaxon.calculations.elemanal.formula.tree.InvalidFormulaException - if the parser cannot parse the formula string