@PublicAPI public interface ElementalAnalysis
API usage example:
// build the analysis ElementalAnalysis elemanal = ... double exactMass = elemanal.exactMass(); double mass = elemanal.mass(); BigDecimal massPrecision = elemanal.massPrecision(); BigDecimal atomCount1 = elemanal.atomCount(8); // oxygen atom count BigDecimal atomCount3 = elemanal.atomCount(8, 16); // oxygen isotope count with massno=16 String formula = elemanal.formula(); String composition = elemanal.composition(2); // precision=2 // now use the results... }
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
atomCount()
Calculates the number of atoms in the molecule.
|
java.math.BigDecimal |
atomCount(int z)
Calculates the number of atoms of a given element in the molecule
(including its isotopes).
|
java.math.BigDecimal |
atomCount(int z,
int m)
Calculates the number of atoms of a given element in the molecule.
|
java.util.Map<com.chemaxon.calculations.elemanal.formula.FormulaAtom,java.math.BigDecimal> |
composition()
Gets the elemental analysis, the relative percent composition of a pure
chemical substance by element (w/w%).
|
java.math.BigDecimal |
exactMass()
Calculates the weight of the MS molecule ion using the mass of the most
frequent natural isotope for element atoms.
|
java.lang.String |
formula()
Calculates the molecular formula which is a string listing all atom types
and their occurrence in the molecule.
|
java.util.Map<java.math.BigDecimal,java.math.BigDecimal> |
isotopeDistribution()
Calculates the isotopic distributions for the molecule.
|
java.math.BigDecimal |
mass()
Calculates the molecular weight of the molecule.
|
java.math.BigDecimal atomCount()
java.math.BigDecimal atomCount(int z)
z
- atomic number of the atom (protons)java.math.BigDecimal atomCount(int z, int m)
z
- atomic number of the atom (protons)m
- mass number of the atom (protons + neutrons)java.math.BigDecimal mass()
The result is rounded according to the decimals of the lowest precision atomic mass value.
java.math.BigDecimal exactMass()
java.lang.String formula()
Note: Isotopes and charged elements are separated.
java.util.Map<java.math.BigDecimal,java.math.BigDecimal> isotopeDistribution()
Takes charge into account. The maximum of distribution is normalized to 1.
java.lang.ArithmeticException
- if the molecule contains non-integer fragment multipliers, e.g. 2Na.1.5H2Ojava.util.Map<com.chemaxon.calculations.elemanal.formula.FormulaAtom,java.math.BigDecimal> composition()