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] , Eric R. Scott [aut] , Laura K. Meredith [aut] , S. Marshall Ledford [ctb], Tamás Stirling [ctb] |
Maintainer: | Kristina Riemer <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.1.2.9000 |
Built: | 2024-10-24 06:30:54 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"), 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"), 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
|
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 |
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).
## 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)
simpol1(fx_groups, meredith = TRUE)
fx_groups |
A data.frame or tibble with counts of functional groups
produced by |
meredith |
Logical; |
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 and coefficients:
Phosphoric acid (-2.23)
Phosphoric ester (-2.23)
Sulfate (-2.23)
Sulfonate (-2.23)
Thiol (-2.23)
Carbothioester (-1.20)
The fx_groups
tibble with the additional log10_P
column.
The method described in Pankow & Asher (2008) allows for calculations of logP at different temperatures. This implementation currently only calculates values at 20ºC.
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)