Package chemaxon.calculations.elemental
Class ElementalAnalysisFactory
java.lang.Object
chemaxon.calculations.elemental.ElementalAnalysisFactory
Provides static factory methods for creating
ElementalAnalysis instances from various input types.-
Method Summary
Modifier and TypeMethodDescriptionstatic ElementalAnalysiscreateAnalysis(Molecule molecule) Creates elemental analysis for the specified molecule.static ElementalAnalysiscreateAnalysis(Molecule molecule, boolean ignorePseudoLabels) Creates elemental analysis for the specified molecule with the given options.static ElementalAnalysiscreateAnalysis(Molecule molecule, Set<Integer> filteredAtomIndices, boolean ignorePseudoLabels) Creates an elemental analysis from the specified molecule with the given options.static ElementalAnalysiscreateAnalysis(String formula) Constructs an elemental analysis from molecular formula.
-
Method Details
-
createAnalysis
Creates elemental analysis for the specified molecule.- Parameters:
molecule- the input structure- Returns:
- an
ElementalAnalysisinstance
-
createAnalysis
Creates elemental analysis for the specified molecule with the given options.- Parameters:
molecule- the input structureignorePseudoLabels- indicates if pseudo atoms are ignored- Returns:
- an
ElementalAnalysisinstance
-
createAnalysis
public static ElementalAnalysis createAnalysis(Molecule molecule, Set<Integer> filteredAtomIndices, boolean ignorePseudoLabels) Creates an elemental analysis from the specified molecule with the given options.- Parameters:
molecule- the input structurefilteredAtomIndices- the set of atom indices to include in the analysis (if empty, all atoms are included)ignorePseudoLabels- indicates if pseudo atoms are ignored- Returns:
- an
ElementalAnalysisinstance
-
createAnalysis
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
ElementalAnalysisinstance - Throws:
chemaxon.calculations.elemental.internal.formula.InvalidFormulaException- if the parser cannot parse the formula string
-