PlausibleFormula.

Share:

Description

PlausibleFormula will count the chemical elements within a provided formula and apply a rule set to evaluate if this formula is plausible. It is currently exported to allow the user to modify/substitute the result but may become an internal function in the future.

Usage

1
PlausibleFormula(x, ruleset = c("GCMS", "LCMS")[1])

Arguments

x

A chemical formula. No validity checks are performed.

ruleset

Currently either "GCMS" or "LCMS" as a keyword. In future potentially a link to a texfile containing the ruleset.

Details

The rules are developed based on comparison with ~1000 compounds found in the Golm Metabolome Database (GMD) for silylated metabolites detectable in GC-MS. The following elements will be counted and tested: c("C","H","N","O","P","S","Si").

Value

Either TRUE or FALSE. Use sapply(vector, PlausibleFormula) if necessary.

Examples

1
2
PlausibleFormula(x="C6H12O6")
PlausibleFormula(x="C5H13O14P3")