View source: R/formula_engine.R
| checkGoldenRules | R Documentation |
Evaluates whether a candidate chemical formula satisfies heuristic chemical rules based on Senior's valence rules (Senior 1951), Hydrogen-to-Carbon (H/C) ratios, heteroatom ratios (N/C, O/C, P/C, S/C, Halogen/C), and Double Bond Equivalents (DBE) as described by Kind & Fiehn (2007).
checkGoldenRules(formula, z = 0, min_hc = 0.1, max_hc = 6, max_dbe = 40)
formula |
Character string representing molecular formula (e.g. |
z |
Integer charge state (default: 0). |
min_hc |
Numeric minimum H/C ratio (default: 0.1). |
max_hc |
Numeric maximum H/C ratio (default: 6.0). |
max_dbe |
Numeric maximum DBE (default: 40.0). |
A list containing booleans indicating whether the formula passed Senior rules, H/C ratio, heteroatom ratios, DBE, nitrogen rule, and overall validity.
Kind, T., Fiehn, O. Seven Golden Rules for heuristic filtering of molecular formulas obtained by accurate mass spectrometry. BMC Bioinformatics 8, 105 (2007). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/1471-2105-8-105")}
Senior, J. K. Partitions and their connection with the problems of chemical structure. J. Chem. Phys. 19, 865-873 (1951).
checkGoldenRules("C6H12O6")
checkGoldenRules("C3H32N12O3") # chemically impossible formula
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.