Interface ElementalAnalysis
Calculates molecular formula, mass, MS mass and composition.
 
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...
 - Since:
- Marvin 16.4.18
- 
Method SummaryModifier and TypeMethodDescriptionCalculates the number of atoms in the molecule.atomCount(int z) Calculates the number of atoms of a given element in the molecule (including its isotopes).atomCount(int z, int m) Calculates the number of atoms of a given element in the molecule.Map<com.chemaxon.calculations.elemanal.formula.FormulaAtom, BigDecimal> Gets the elemental analysis, the relative percent composition of a pure chemical substance by element (w/w%).Calculates the weight of the MS molecule ion using the mass of the most frequent natural isotope for element atoms.Calculates the formal (total) charge of the molecule.formula()Calculates the molecular formula which is a string listing all atom types and their occurrence in the molecule.default Stringformula(FormulaGenerationRule... rules) Calculates the molecular formula which is a string listing all atom types and their occurrence in the molecule.formula(Set<FormulaGenerationRule> rules) Calculates the molecular formula which is a string listing all atom types and their occurrence in the molecule.Calculates the isotopic distributions for the molecule.mass()Calculates the molecular weight of the molecule.Mass of the molecule calculated using the isotope mass of the most abundant constituent element isotope of each element rounded to the nearest integer value and multiplied by the number of atoms of each element.Calculates the sum of the radicals of all atoms of the molecule.
- 
Method Details- 
atomCountBigDecimal atomCount()Calculates the number of atoms in the molecule.- Returns:
- number of atoms
 
- 
atomCountCalculates the number of atoms of a given element in the molecule (including its isotopes).- Parameters:
- z- atomic number of the atom (protons)
- Returns:
- number of the specified atoms
 
- 
atomCountCalculates the number of atoms of a given element in the molecule.- Parameters:
- z- atomic number of the atom (protons)
- m- mass number of the atom (protons + neutrons)
- Returns:
- number of the specified atoms
 
- 
massBigDecimal mass()Calculates the molecular weight of the molecule.The result is rounded according to the decimals of the lowest precision atomic mass value. - Returns:
- molecular weight of the molecule
 
- 
exactMassBigDecimal exactMass()Calculates the weight of the MS molecule ion using the mass of the most frequent natural isotope for element atoms.- Returns:
- weight of the molecule ion
 
- 
nominalMassBigDecimal nominalMass()Mass of the molecule calculated using the isotope mass of the most abundant constituent element isotope of each element rounded to the nearest integer value and multiplied by the number of atoms of each element.- Returns:
- nominal mass of the molecule
 
- 
formulaString formula()Calculates the molecular formula which is a string listing all atom types and their occurrence in the molecule.Note: Isotopes and charged elements are separated. - Returns:
- formula representation of elements
 
- 
formulaCalculates the molecular formula which is a string listing all atom types and their occurrence in the molecule.- Returns:
- formula representation of elements
- See Also:
 
- 
formulaCalculates the molecular formula which is a string listing all atom types and their occurrence in the molecule.- Returns:
- formula representation of elements
- See Also:
 
- 
formalChargeBigDecimal formalCharge()Calculates the formal (total) charge of the molecule.- Returns:
- the formal charge of the molecule
 
- 
sumOfRadicalsBigDecimal sumOfRadicals()Calculates the sum of the radicals of all atoms of the molecule.- Returns:
- the sum of the radicals of all atoms
 
- 
isotopeDistributionMap<BigDecimal,BigDecimal> isotopeDistribution()Calculates the isotopic distributions for the molecule.Takes charge into account. The maximum of distribution is normalized to 1. - Returns:
- the map of masses and distributions.
- Throws:
- ArithmeticException- if the molecule contains non-integer fragment multipliers, e.g. 2Na.1.5H2O
 
- 
compositionMap<com.chemaxon.calculations.elemanal.formula.FormulaAtom,BigDecimal> composition()Gets the elemental analysis, the relative percent composition of a pure chemical substance by element (w/w%).- Returns:
- molecular composition
 
 
-