PageRenderTime 41ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/rcdk/man/generateformula.Rd

http://github.com/rajarshi/cdkr
Unknown | 42 lines | 41 code | 1 blank | 0 comment | 0 complexity | 98d39d8e213b05877306b6ada0124f66 MD5 | raw file
  1. \name{generate.formula}
  2. \alias{generate.formula}
  3. \title{
  4. Generate a cdkFormula object.
  5. }
  6. \description{
  7. This function generate a list of \code{cdkFormula} objects given a mass.
  8. }
  9. \usage{
  10. generate.formula(mass, window=0.01, elements=list(c("C",0,50),c("H",0,50),
  11. c("N",0,50),c("O",0,50),
  12. c("S",0,50)),
  13. validation=FALSE, charge=0.0)
  14. }
  15. \arguments{
  16. \item{mass}{The mass value from which to be generate the formulas.},
  17. \item{window}{The window accuracy in the same units as mass.},
  18. \item{elements}{Elements to take into account.},
  19. \item{validation}{TRUE, if the method should only generate valid
  20. formulas. If FALSE, nonsensical formulae my be generated which must
  21. be filtered out by the user},
  22. \item{charge}{The charge value of the formula.}
  23. }
  24. \value{
  25. Objects of class MassToFormulaTool, from the \code{IMolecularFormula} package
  26. }
  27. \examples{
  28. mfSet <- generate.formula(18.03383,charge=1,
  29. elements=list(c("C",0,50),c("H",0,50),c("N",0,50)))
  30. for (i in mfSet) {
  31. print(i)
  32. }
  33. }
  34. \keyword{programming}
  35. \seealso{
  36. \code{\link{get.formula}},
  37. \code{\link{set.charge.formula}},
  38. \code{\link{get.isotopes.pattern}},
  39. \code{\link{isvalid.formula}}
  40. }
  41. \author{Miguel Rojas-Cherto (\email{miguelrojasch@yahoo.es})}