generate.formula {rcdk}R Documentation

Generate a cdkFormula object.

Description

This function generate a list of cdkFormula objects given a mass.

Usage

generate.formula(mass, window=0.01, elements=list(c("C",0,50),c("H",0,50),c("N",0,50),c("O",0,50),c("S",0,50)), validation=FALSE, charge=0.0)

Arguments

mass The mass value from which to be generate the formulas.
window The window accuracy in the same units as mass.
elements Elements to take into account.
validation TRUE, if the method should only generate valid formulas. If FALSE, nonsensical formulae my be generated which must be filtered out by the user
charge The charge value of the formula.

Value

Objects of class MassToFormulaTool, from the IMolecularFormula package

Author(s)

Miguel Rojas-Cherto (miguelrojasch@yahoo.es)

See Also

get.formula, set.charge.formula, get.isotopes.pattern, isvalid.formula

Examples

mfSet <- generate.formula(18.03383,charge=1,elements=list(c("C",0,50),c("H",0,50),c("N",0,50)))
for (i in mfSet) {
  print(i)
}

[Package rcdk version 2.9.2 Index]