GetMoleculeMass: Calculates the mass/charge ratio of a molecule.

View source: R/RcppExports.R

GetMoleculeMassR Documentation

Calculates the mass/charge ratio of a molecule.

Description

GetMoleculeMass parses the molecular formula and returns the mass/charge ratio of the molecule/atom/ion.

Usage

GetMoleculeMass(molecule)

Arguments

molecule

Molecule string.

Details

The formula parser for the molecule string understands the (case sensitive) element labels and round and curly brackets (square brackets are reserved for isotope specification). Numbers (multipliers) have to follow either directly the element symbol or a closing bracket. Specific isoptopes are specified in square brackets with the mass number before the element label (e.g. [2H], [14C] or [235U]). Charge indicators (+, -) have to be the last characters in the formula string, multiple charges require multiple charge symbols (e.g. doubly charged calcium is Ca++ and not Ca2+ which is the correct syntax for a singly charged calcium dimer).

Value

Mass/charge ratio.

See Also

Other Chemistry functions: DecomposeMass2(), DecomposeMass(), GetIsotopePattern2(), GetIsotopePattern()

Examples

GetMoleculeMass("CO2")
GetMoleculeMass("CO2++")
GetMoleculeMass("[13C]O2+")
GetMoleculeMass("[13C][18O]2")

pasturm/TofDaqR documentation built on March 29, 2024, 12:10 a.m.