| calc_dbe | R Documentation |
Calculates the Double Bond Equivalent (DBE) for a given neutral molecular formula.
DBE is a measure of unsaturation, representing the total number of rings and pi bonds
in a molecule. This function uses the masses data table to determine valence information
for each element in the input molecular formula.
calc_dbe(mfd, masses = ume::masses, verbose = FALSE, ...)
mfd |
data.table with molecular formula data as derived from
|
masses |
A data.table. Defaults to |
verbose |
logical; if |
... |
Additional arguments passed to methods. |
This function computes DBE based on the molecular formula specified in mfd.
mfd can be a data.table or a character string or character vector of molecular formula strings.
For each isotope in the formula, DBE is calculated as the sum of (valence - 2) multiplied by the count of that isotope, divided by 2, and then adding 1. Elements with a valence of 2 are excluded from the DBE calculation.
The function will stop and print an error if any elements in mfd have missing valence information
in masses.
A numeric vector of the same length as the number of rows in mfd,
where each entry represents the calculated DBE for the corresponding molecular formula.
The result vector is named 'dbe'.
Other calculations:
calc_data_summary(),
calc_eval_params(),
calc_exact_mass(),
calc_ideg(),
calc_ma(),
calc_neutral_mass(),
calc_nm(),
calc_norm_int(),
calc_number_assignment(),
calc_number_occurrence(),
calc_recalibrate_ms()
# Example with user-defined data
calc_dbe("C6H10O6")
calc_dbe("C6H10Br2")
calc_dbe(c("C3[13C1]H10O4", "C6H10O6"))
# Example with demo data from UME package
calc_dbe(mfd = mf_data_demo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.