addMolecules: Add/subtract sum formulae

Description Usage Arguments Details Value Author(s) Examples

View source: R/Rdisop.R

Description

Simple arithmetic modifications of sum formulae.

Usage

1
2
addMolecules(formula1, formula2, elements = NULL, maxisotopes = 10)
subMolecules(formula1, formula2, elements = NULL, maxisotopes = 10)

Arguments

formula1

Sum formula

formula2

Sum formula

elements

list of allowed chemical elements, defaults to full periodic system of elements

maxisotopes

maximum number of isotopes shown in the resulting molecules

Details

addMolecules() adds the second argument to the first. subMolecules() subtracts the second argument from the first.

This can be useful to revert e.g. adduct/fragment formation found in ESI mass spectrometry, or to mimick simple chemical reactions. No chemical checks are performed.

Value

A list with the elements

formula

repeated sum formula

mass

exact monoisotopic mass of molecule

score

dummy value, always 1.0

isotopes

a list of isotopes

Author(s)

Steffen Neumann <sneumann@IPB-Halle.DE>

Examples

1
2
# For proton-Adduct of Ethanol:
subMolecules("C2H7O", "H")

Rdisop documentation built on Nov. 8, 2020, 5:40 p.m.