| Title: | Calculate Volatility of Chemical Compounds |
|---|---|
| Description: | Calculate estimated relative volatility index values for organic compounds based on functional group contributions. Calculation uses the SIMPOL.1 method in Prankow and Asher (2008) <doi:10.5194/acp-8-2773-2008> or modified SIMPOL.1 method as in Meredith et al. (2023) <doi:10.5194/acp-8-2773-2008>. |
| Authors: | Kristina Riemer [aut, cre, cph] (ORCID: <https://orcid.org/0000-0003-3802-3331>), Eric R. Scott [aut] (ORCID: <https://orcid.org/0000-0002-7430-7879>), Laura K. Meredith [aut] (ORCID: <https://orcid.org/0000-0003-4244-4366>), S. Marshall Ledford [ctb], Tamás Stirling [ctb] |
| Maintainer: | Kristina Riemer <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 2.2.0.9000 |
| Built: | 2026-05-28 15:02:06 UTC |
| Source: | https://github.com/Meredith-Lab/volcalc |
Estimate relative volatility index value and category for specified compounds using group contribution methods.
calc_vol( input, from = c("mol_path", "smiles"), method = c("meredith", "simpol1"), temp_c = 20, environment = c("clean", "polluted", "soil"), validate = TRUE, return_fx_groups = FALSE, return_calc_steps = FALSE )calc_vol( input, from = c("mol_path", "smiles"), method = c("meredith", "simpol1"), temp_c = 20, environment = c("clean", "polluted", "soil"), validate = TRUE, return_fx_groups = FALSE, return_calc_steps = FALSE )
input |
A path to a .mol file or a SMILES string. |
from |
The form of |
method |
The method for calculating estimated volatility. See
|
temp_c |
numeric; For methods that allow it, specify temperature (in degrees C) at which log10(P) estimates are calculated. |
environment |
The environment for calculating relative volatility
categories. RVI thresholds for low, moderate, and high volatility are as
follows: |
validate |
logical; if |
return_fx_groups |
When |
return_calc_steps |
When |
is used for the calculated relative
volatility index (rvi). where is the estimated vapor pressure for
the compound, is molecular mass of the compound, is the
universal gas constant, and is temperature (293.14K or 20ºC). When
return_calc_steps = TRUE, the log of estimated vapor pressure, log10_P,
and , log_alpha, are also returned.
A tibble with relative volatility index (rvi) and volatility
category (category).
Donahue, N.M., Robinson, A.L., Stanier, C.O., Pandis, S.N., 2006. Coupled Partitioning, Dilution, and Chemical Aging of Semivolatile Organics. Environ. Sci. Technol. 40, 2635–2643. doi:10.1021/es052297c
Meredith L, Ledford S, Riemer K, Geffre P, Graves K, Honeker L, LeBauer D, Tfaily M, Krechmer J. 2023. Automating methods for estimating metabolite volatility. Frontiers in Microbiology. doi:10.3389/fmicb.2023.1267234
mol_paths <- mol_example() calc_vol(mol_paths) # Return functional group counts from get_fx_groups() calc_vol(mol_paths, return_fx_groups = TRUE) # Return intermediate calculations calc_vol(mol_paths, return_calc_steps = TRUE)mol_paths <- mol_example() calc_vol(mol_paths) # Return functional group counts from get_fx_groups() calc_vol(mol_paths, return_fx_groups = TRUE) # Return intermediate calculations calc_vol(mol_paths, return_calc_steps = TRUE)
Returns functional group counts relevant to calculating estimated volatility
for specified compounds. Users will not typically interact with this function
directly, but rather by using calc_vol().
get_fx_groups(compound_sdf, validate = TRUE)get_fx_groups(compound_sdf, validate = TRUE)
compound_sdf |
a ChemmineR::SDFset object returned by
|
validate |
logical; if |
For more details on how functional groups are defined, see the smarts_simpol1 data set.
It is unfortunately difficult to capture errors and warnings produced by
the command line tool OpenBabel used by ChemmineOB, a dependency of
volcalc. These errors and warnings are printed to the R console, but they
are not R errors and do not stop code from running and producing
potentially incorrect data. validate = TRUE checks the output of certain
OpenBabel procedures for the symptoms of these errors, namely missing
values for InChI and molecular formula. Unfortunately, since InChI
generation is not available with the Windows version of ChemmineOB, this
validation step cannot be performed on Windows and validate = TRUE will
simply print a warning that can be silenced by setting validate = FALSE.
A tibble with columns of basic compound info and functional group counts.
This function currently does not capture the carbon number on the acid-side of amide, one of the functional groups used in SIMPOL.1. Contributions of SMARTS strings or other methods to capture this "functional group" are welcome.
mol_path <- mol_example()[1] sdf <- ChemmineR::read.SDFset(mol_path) get_fx_groups(sdf)mol_path <- mol_example()[1] sdf <- ChemmineR::read.SDFset(mol_path) get_fx_groups(sdf)
Downloads mol files corresponding to individual compounds or compounds in a pathway from KEGG.
get_mol_kegg(compound_ids, pathway_ids, dir, force = FALSE)get_mol_kegg(compound_ids, pathway_ids, dir, force = FALSE)
compound_ids |
Character vector of KEGG compound IDs—5 digits prepended with a "C". |
pathway_ids |
Character vector of KEGG pathway or pathway module IDs—5 digits prepended with "map" or "M", respectively. |
dir |
Path to a folder to save .mol files in. Folder will be created if it does not already exist. |
force |
Logical; by default ( |
A tibble with the columns compound_ids, pathway_ids (if used),
and mol_paths (paths to downloaded .mol files).
For additional functionality for interacting with KEGG, try the
KEGGREST package, which this function was inspired by.
## Not run: get_mol_kegg(compound_ids = c("C16181", "C06074"), dir = tempdir()) get_mol_kegg(pathway_ids = "map00253", dir = tempdir()) ## End(Not run)## Not run: get_mol_kegg(compound_ids = c("C16181", "C06074"), dir = tempdir()) get_mol_kegg(pathway_ids = "map00253", dir = tempdir()) ## End(Not run)
volcalc comes bundled with some example .mol files in its inst/extdata
directory. This function provides easy access to them.
mol_example()mol_example()
File names are the KEGG identifiers. Compound names are as follows:
C00031: D-Glucose
C00157: Phosphatidylcholine
C08491: (-)-Jasmonic acid
C16181: beta-2,3,4,5,6-Pentachlorocyclohexanol
C16286: Geosmin
C16521: Isoprene
File paths to installed example .mol files.
#return paths to all example .mol files mol_example() #examine the contents of a file readLines(mol_example()[1])#return paths to all example .mol files mol_example() #examine the contents of a file readLines(mol_example()[1])
Implements the SIMPOL.1 group contribution method for predicting liquid vapor
pressure of organic compounds as described in Pankow & Asher (2008) and a
modified version described in Meredith et al. (2023). Users will not usually
use this function directly, but rather through calc_vol().
simpol1(fx_groups, meredith = TRUE, temp_c = 20)simpol1(fx_groups, meredith = TRUE, temp_c = 20)
fx_groups |
A data.frame or tibble with counts of functional groups
produced by |
meredith |
Logical; |
temp_c |
Numeric; the temperature at which to calculate volatility estimates in °C. |
The output includes a column for log10_P where
, or
the sum of the counts of functional groups () times the
coefficients for each functional group (). Units are in log10
atmospheres.
The modified method in Meredith et al. (2023) adds the following additional functional groups:
Using the same coefficient as nitrate
Phosphoric acid
Phosphoric ester
Sulfate
Sulfonate
Thiol
Using the same coefficient as ester
Carbothioester
The fx_groups tibble with the additional log10_P column.
The method described in Pankow & Asher (2008) was developed using data between 0 °C and 120 °C, so extrapolating beyond that range is not recommended.
Meredith L, Ledford S, Riemer K, Geffre P, Graves K, Honeker L, LeBauer D, Tfaily M, Krechmer J. 2023. Automating methods for estimating metabolite volatility. Frontiers in Microbiology. doi:10.3389/fmicb.2023.1267234
Pankow, J.F., Asher, W.E. 2008. SIMPOL.1: a simple group contribution method for predicting vapor pressures and enthalpies of vaporization of multifunctional organic compounds. Atmos. Chem. Phys. doi:10.5194/acp-8-2773-2008
mol_path <- mol_example()[3] sdf <- ChemmineR::read.SDFset(mol_path) fx_groups <- get_fx_groups(sdf) simpol1(fx_groups)mol_path <- mol_example()[3] sdf <- ChemmineR::read.SDFset(mol_path) fx_groups <- get_fx_groups(sdf) simpol1(fx_groups)
This dataframe documents how functional groups for the SIMPOL.1 and Meredith
et al. method are defined using SMARTS strings or ChemmineR functions.
smarts_simpol1smarts_simpol1
Either "simpol1" for functional groups only used with the SIMPOL.1 method, or "meredith" for additional groups used in the Meredith et al. method.
These correspond to matching column names in the results of get_fx_groups().
Functional group description from Table 5 of Pankow & Asher (2008)
SMARTS strings used to capture groups, when applicable
The function used to capture the functional group. When smarts is not NA, this is always "ChemmineR::smartsSearchOB". Other groups are captured with other ChemmineR functions or as calculations using other functional groups.
Notes including how any functional group counts are corrected when there is overlap. E.g. when one SMARTS pattern is a subset of another pattern, but the two groups are counted separately without overlap in the SIMPOL.1 method.
Meredith L, Ledford S, Riemer K, Geffre P, Graves K, Honeker L, LeBauer D, Tfaily M, Krechmer J. 2023. Automating methods for estimating metabolite volatility. Frontiers in Microbiology. doi:10.3389/fmicb.2023.1267234
Pankow, J.F., Asher, W.E. 2008. SIMPOL.1: a simple group contribution method for predicting vapor pressures and enthalpies of vaporization of multifunctional organic compounds. Atmos. Chem. Phys. doi:10.5194/acp-8-2773-2008