generate.formula {rcdk} | R Documentation |
This function generate a list of cdkFormula
objects given a mass.
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)
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. |
Objects of class MassToFormulaTool, from the IMolecularFormula
package
Miguel Rojas-Cherto (miguelrojasch@yahoo.es)
get.formula
,
set.charge.formula
,
get.isotopes.pattern
,
isvalid.formula
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) }