aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2023-11-12 22:22:30 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2023-11-12 22:22:30 +0100
commite92727f871c2c8217251e34e52438f18c5f013bb (patch)
treeb6fd0c200d41cf5339e8e36a06d6b4d0c72daa3a
parent9828b97fb946104f15e537fc6a53653f1bceb27d (diff)
Import URLencode from utils, rebuild docs
This was caught by pkgdown apparently not loading the utils package by default.
-rw-r--r--NAMESPACE1
-rw-r--r--R/chent.R123
-rw-r--r--docs/pkgdown.yml2
-rw-r--r--docs/reference/Rplot001.pngbin1011 -> 20412 bytes
-rw-r--r--docs/reference/chent.html29
-rw-r--r--docs/reference/pai.html14
-rw-r--r--docs/reference/plot.chent.html18
-rw-r--r--docs/search.json2
8 files changed, 116 insertions, 73 deletions
diff --git a/NAMESPACE b/NAMESPACE
index e56a6c6..4529781 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -12,6 +12,7 @@ importFrom(grImport,PostScriptTrace)
importFrom(grImport,grid.picture)
importFrom(grImport,readPicture)
importFrom(rsvg,rsvg_ps)
+importFrom(utils,URLencode)
importFrom(utils,head)
importFrom(webchem,cid_compinfo)
importFrom(webchem,get_cid)
diff --git a/R/chent.R b/R/chent.R
index 8a4ad8a..6d18277 100644
--- a/R/chent.R
+++ b/R/chent.R
@@ -1,12 +1,13 @@
#' @title An R6 class for chemical entities with associated data
#'
-#' @description The class is initialised with an identifier. Chemical
-#' information is retrieved from the internet. Additionally, it can be
+#' @description The class is initialised with an identifier. Chemical
+#' information is retrieved from the internet. Additionally, it can be
#' generated using RDKit if RDKit and its python bindings are installed.
#'
#' @export
#' @format An \code{\link{R6Class}} generator object
#' @importFrom R6 R6Class
+#' @importFrom utils URLencode
#' @importFrom webchem get_cid cid_compinfo
#' @importFrom grImport PostScriptTrace readPicture
#' @importFrom yaml yaml.load_file
@@ -29,75 +30,75 @@ chent <- R6Class("chent",
#' @field identifier (`character(1)`)\cr
#' The identifier that was used to initiate the object, with attribute 'source'
identifier = NULL,
-
+
#' @field inchikey (`character(1)`)\cr
#' InChI Key, with attribute 'source'
inchikey = NULL,
-
+
#' @field smiles (`character()`)\cr
#' SMILES code(s), with attribute 'source'
smiles = NULL,
-
+
#' @field mw (`numeric(1)`)\cr
#' Molecular weight, with attribute 'source'
mw = NULL,
-
+
#' @field pubchem (`list()`)\cr
#' List of information retrieved from PubChem
pubchem = NULL,
-
+
#' @field rdkit
#' List of information obtained with RDKit
rdkit = NULL,
-
+
#' @field mol <rdkit.Chem.rdchem.Mol> object
mol = NULL,
-
+
#' @field svg SVG code
svg = NULL,
-
+
#' @field Picture Graph as a \code{\link{picture}} object obtained using grImport
Picture = NULL,
-
+
#' @field Pict_font_size Font size as extracted from the intermediate PostScript file
Pict_font_size = NULL,
-
+
#' @field pdf_height Height of the MediaBox in the pdf after cropping
pdf_height = NULL,
-
+
#' @field p0 Vapour pressure in Pa
p0 = NULL,
-
+
#' @field cwsat Water solubility in mg/L
cwsat = NULL,
#' @field PUF Plant uptake factor
PUF = NULL,
-
+
#' @field chyaml List of information obtained from a YAML file
chyaml = NULL,
-
+
#' @description
#' Creates a new instance of this [R6][R6::R6Class] class.
- #'
- #' @param identifier Identifier to be stored in the object
+ #'
+ #' @param identifier Identifier to be stored in the object
#' @param smiles Optional user provided SMILES code
#' @param inchikey Optional user provided InChI Key
#' @param pubchem Should an attempt be made to retrieve chemical
#' information from PubChem via the webchem package?
- #' @param pubchem_from Possibility to select the argument
+ #' @param pubchem_from Possibility to select the argument
#' that is used to query pubchem
- #' @param rdkit Should an attempt be made to retrieve chemical
+ #' @param rdkit Should an attempt be made to retrieve chemical
#' information from a local rdkit installation via python
#' and the reticulate package?
#' @param template An optional SMILES code to be used as template for RDKit
#' @param chyaml Should we look for a identifier.yaml file in the working
#' directory?
- initialize = function(identifier, smiles = NULL, inchikey = NULL,
+ initialize = function(identifier, smiles = NULL, inchikey = NULL,
pubchem = TRUE, pubchem_from = c('name', 'smiles', 'inchikey'),
rdkit = TRUE, template = NULL,
chyaml = TRUE) {
-
+
self$identifier <- identifier
names(self$identifier) <- make.names(identifier)
pubchem_from = match.arg(pubchem_from)
@@ -135,7 +136,7 @@ chent <- R6Class("chent",
}
invisible(self)
},
-
+
#' Try to get chemical information from PubChem
#' @param query Query string to be passed to [get_cid][webchem::get_cid]
#' @param from Passed to [get_cid][webchem::get_cid]
@@ -150,7 +151,7 @@ chent <- R6Class("chent",
self$get_pubchem(pubchem_result[[1, "cid"]])
}
},
-
+
#' Get chemical information from PubChem for a known PubChem CID
#' @param pubchem_cid CID
get_pubchem = function(pubchem_cid) {
@@ -192,7 +193,7 @@ chent <- R6Class("chent",
}
}
},
-
+
#' Get chemical information from RDKit if available
#' @param template Optional template specified as a SMILES code
get_rdkit = function(template = NULL) {
@@ -237,9 +238,9 @@ chent <- R6Class("chent",
self$Picture <- readPicture(xmlfile)
unlink(c(xmlfile, psfile, svgfile))
},
-
+
#' Obtain information from a YAML file
- #' @param repo Should the file be looked for in the current working
+ #' @param repo Should the file be looked for in the current working
#' directory, a local git repository under `~/git/chyaml`, or from
#' the web (not implemented).
#' @param chyaml The filename to be looked for
@@ -273,7 +274,7 @@ chent <- R6Class("chent",
message("web repositories not implemented")
}
},
-
+
#' Add a vapour pressure
#' @param p0 The vapour pressure in Pa
#' @param T Temperature
@@ -287,7 +288,7 @@ chent <- R6Class("chent",
attr(self$p0, "page") <- page
attr(self$p0, "remark") <- remark
},
-
+
#' Add a water solubility
#' @param cwsat The water solubility in mg/L
#' @param T Temperature
@@ -305,7 +306,7 @@ chent <- R6Class("chent",
attr(self$cwsat, "page") <- page
attr(self$cwsat, "remark") <- remark
},
-
+
#' Add a plant uptake factor
#' @param PUF The plant uptake factor, a number between 0 and 1
#' @param source An acronym specifying the source of the information
@@ -320,10 +321,10 @@ chent <- R6Class("chent",
attr(self$PUF, "page") <- page
attr(self$PUF, "remark") <- remark
},
-
+
#' @field TPs List of transformation products as chent objects
TPs = list(),
-
+
#' Add a transformation product to the internal list
#' @param x A [chent] object, or an identifier to generate a [chent] object
#' @param smiles A SMILES code for defining a [chent] object
@@ -338,7 +339,7 @@ chent <- R6Class("chent",
}
self$TPs[[id]] <- chent
},
-
+
#' @field transformations Data frame of observed transformations
transformations = data.frame(study_type = character(0),
TP_identifier = character(0),
@@ -346,12 +347,12 @@ chent <- R6Class("chent",
source = character(0),
page = character(0),
stringsAsFactors = FALSE),
-
+
#' Add a line in the internal dataframe holding observed transformations
#' @param study_type A characterisation of the study type
#' @param TP_identifier An identifier of one of the transformation products
#' in `self$TPs`
- #' @param max_occurrence The maximum observed occurrence of the
+ #' @param max_occurrence The maximum observed occurrence of the
#' transformation product, expressed as a fraction of the amount that would
#' result from stochiometric transformation
#' @param source An acronym specifying the source of the information
@@ -376,10 +377,10 @@ chent <- R6Class("chent",
page = page,
stringsAsFactors = FALSE))
},
-
+
#' @field soil_degradation Dataframe of modelling DT50 values
soil_degradation = NULL,
-
+
#' Add a line in the internal dataframe holding modelling DT50 values
#' @param soils Names of the soils
#' @param DT50_mod The modelling DT50 in the sense of regulatory pesticide
@@ -395,7 +396,7 @@ chent <- R6Class("chent",
#' @param temperature The temperature during the study in degrees Celsius
#' @param moisture The moisture during the study
#' @param category Is it a laboratory ('lab') or field study ('field')
- #' @param formulation Name of the formulation applied, if it was not
+ #' @param formulation Name of the formulation applied, if it was not
#' the technical active ingredient
#' @param model The degradation model used for deriving `DT50_mod`
#' @param chi2 The relative error as defined in FOCUS kinetics
@@ -437,10 +438,10 @@ chent <- R6Class("chent",
self$soil_degradation <- rbind(self$soil_degradation, new_soil_degradation)
}
},
-
+
#' @field soil_ff Dataframe of formation fractions
soil_ff = NULL,
-
+
# Add one or more formation fractions for degradation in soil
#' @param target The identifier(s) of the transformation product
#' @param soils The soil name(s) in which the transformation was observed
@@ -463,12 +464,12 @@ chent <- R6Class("chent",
self$soil_ff <- rbind(self$soil_ff, new_soil_ff)
}
},
-
+
#' @field soil_sorption Dataframe of soil sorption data
soil_sorption = NULL,
-
+
#' Add soil sorption data
- #' @param Kf The sorption constant in L/kg, either linear (then `N` is 1)
+ #' @param Kf The sorption constant in L/kg, either linear (then `N` is 1)
#' or according to Freundlich
#' @param Kfoc The constant from above, normalised to soil organic carbon
#' @param N The Freundlich exponent
@@ -498,9 +499,9 @@ chent <- R6Class("chent",
self$soil_sorption <- rbind(self$soil_sorption, new_soil_sorption)
}
},
-
+
#' Write a PDF image of the structure
- #' @param file The file to write to
+ #' @param file The file to write to
#' @param dir The directory to write the file to
#' @param template A template expressed as SMILES to use in RDKit
pdf = function(file = paste0(self$identifier, ".pdf"),
@@ -524,7 +525,7 @@ chent <- R6Class("chent",
m_line <- suppressWarnings(grep("MediaBox", head, value = TRUE))
self$pdf_height <- as.numeric(gsub("/MediaBox \\[.* (.*)\\]", "\\1", m_line))
},
-
+
#' Write a PNG image of the structure
#' @param antialias Passed to [png][grDevices::png]
png = function(file = paste0(self$identifier, ".png"),
@@ -541,7 +542,7 @@ chent <- R6Class("chent",
plot(self)
dev.off()
},
-
+
#' Write an EMF image of the structure using [emf][devEMF::emf]
#' @param file The file to write to
emf = function(file = paste0(self$identifier, ".emf"),
@@ -649,14 +650,14 @@ plot.chent = function(x, ...) {
pai <- R6Class("pai",
inherit = chent,
public = list(
-
+
#' @field iso ISO common name of the active ingredient according to ISO 1750
iso = NULL,
-
+
#' @field bcpc Information retrieved from the BCPC compendium available online
#' at <pesticidecompendium.bcpc.org>
bcpc = NULL,
-
+
#' Creates a new instance of this [R6][R6::R6Class] class.
#'
#' @description This class is derived from [chent]. It makes it easy
@@ -664,8 +665,8 @@ pai <- R6Class("pai",
#' ingredient, and additionally stores the ISO name as well as
#' the complete result of querying the BCPC compendium using
#' [bcpc_query][webchem::bcpc_query].
- #'
- #' @param iso The ISO common name to be used in the query of the
+ #'
+ #' @param iso The ISO common name to be used in the query of the
#' BCPC compendium
#'
#' @param identifier Alternative identifier used for querying pubchem
@@ -757,27 +758,27 @@ print.pai = function(x, ...) {
ppp <- R6Class("ppp",
public = list(
-
+
#' @field name The name of the product
name = NULL,
-
+
#' @field ais A list of active ingredients
ais = list(),
-
+
#' @field concentrations The concentration of the ais
concentrations = NULL,
-
+
#' @field concentration_units Defaults to g/L
concentration_units = NULL,
-
+
#' @field density The density of the product
density = NULL,
-
+
#' @field density_units Defaults to g/L
density_units = "g/L",
-
+
#' Creates a new instance of this [R6][R6::R6Class] class.
- #'
+ #'
#' @field ... Identifiers of the active ingredients
#' @field concentrations Concentrations of the active ingredients
#' @field concentration_units Defaults to g/L
@@ -794,7 +795,7 @@ ppp <- R6Class("ppp",
names(self$concentrations) <- names(self$ais)
self$concentration_units <- concentration_units
},
-
+
#' Printing method
print = function() {
cat("<pp> named", self$name, "\n")
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 44cd4ff..26105cf 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -2,7 +2,7 @@ pandoc: 2.17.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
articles: {}
-last_built: 2023-11-12T21:10Z
+last_built: 2023-11-12T21:21Z
urls:
reference: https://pkgdown.jrwb.de/chents/reference
article: https://pkgdown.jrwb.de/chents/articles
diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png
index 17a3580..0e4970e 100644
--- a/docs/reference/Rplot001.png
+++ b/docs/reference/Rplot001.png
Binary files differ
diff --git a/docs/reference/chent.html b/docs/reference/chent.html
index cb0b1eb..2cedc00 100644
--- a/docs/reference/chent.html
+++ b/docs/reference/chent.html
@@ -771,25 +771,42 @@ Write an EMF image of the structure using <a href="https://rdrr.io/pkg/devEMF/ma
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">oct</span> <span class="op">&lt;-</span> <span class="va">chent</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"1-octanol"</span>, smiles <span class="op">=</span> <span class="st">"CCCCCCCCO"</span>, pubchem <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Trying to get chemical information from RDKit using user SMILES</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> CCCCCCCCO</span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in URLencode(self$identifier):</span> could not find function "URLencode"</span>
+<span class="r-msg co"><span class="r-pr">#&gt;</span> Did not find chyaml file ./1-octanol.yaml</span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">oct</span><span class="op">)</span></span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'oct' not found</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;chent&gt;</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Identifier $identifier 1-octanol </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> InChI Key $inchikey </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SMILES string $smiles:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> user </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> "CCCCCCCCO" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Molecular weight $mw: 130.2 </span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">oct</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">oct</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'oct' not found</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="va">caffeine</span> <span class="op">&lt;-</span> <span class="va">chent</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"caffeine"</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> PubChem:</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> CN1C=NC2=C1C(=O)N(C(=O)N2C)C</span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in URLencode(self$identifier):</span> could not find function "URLencode"</span>
+<span class="r-msg co"><span class="r-pr">#&gt;</span> Did not find chyaml file ./caffeine.yaml</span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'caffeine' not found</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;chent&gt;</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Identifier $identifier caffeine </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SMILES string $smiles:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> PubChem_Canonical </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Molecular weight $mw: 194.2 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> PubChem synonyms (up to 10):</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "caffeine" "58-08-2" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [3] "Guaranine" "1,3,7-Trimethylxanthine"</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [5] "Methyltheobromine" "Theine" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [7] "Thein" "Cafeina" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [9] "Koffein" "Mateina" </span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'caffeine' not found</span>
+<span class="r-plt img"><img src="chent-1.png" alt="" width="700" height="433"></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
diff --git a/docs/reference/pai.html b/docs/reference/pai.html
index e3170af..05a300f 100644
--- a/docs/reference/pai.html
+++ b/docs/reference/pai.html
@@ -172,7 +172,19 @@ BCPC compendium</p></dd>
<span class="r-msg co"><span class="r-pr">#&gt;</span> PubChem:</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> CCNC1=NC(=NC(=N1)Cl)NC(C)C</span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in URLencode(self$identifier):</span> could not find function "URLencode"</span>
+<span class="r-msg co"><span class="r-pr">#&gt;</span> Did not find chyaml file ./atrazine.yaml</span>
+<span class="r-plt img"><img src="pai-1.png" alt="" width="700" height="433"></span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;pai&gt; with ISO common name $iso atrazine </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;chent&gt;</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Identifier $identifier atrazine </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SMILES string $smiles:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> PubChem_Canonical </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> "CCNC1=NC(=NC(=N1)Cl)NC(C)C" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Molecular weight $mw: 215.7 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> PubChem synonyms (up to 10):</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "atrazine" "1912-24-9" "Gesaprim" "Oleogesaprim" "Aktikon" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [6] "Atranex" "Chromozin" "Atazinax" "Atrasine" "Gesoprim" </span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
diff --git a/docs/reference/plot.chent.html b/docs/reference/plot.chent.html
index 1a07967..8d4c41e 100644
--- a/docs/reference/plot.chent.html
+++ b/docs/reference/plot.chent.html
@@ -69,13 +69,25 @@
<span class="r-msg co"><span class="r-pr">#&gt;</span> PubChem:</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Trying to get chemical information from RDKit using PubChem_Canonical SMILES</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> CN1C=NC2=C1C(=O)N(C(=O)N2C)C</span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in URLencode(self$identifier):</span> could not find function "URLencode"</span>
+<span class="r-msg co"><span class="r-pr">#&gt;</span> Did not find chyaml file ./caffeine.yaml</span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'caffeine' not found</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;chent&gt;</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Identifier $identifier caffeine </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SMILES string $smiles:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> PubChem_Canonical </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Molecular weight $mw: 194.2 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> PubChem synonyms (up to 10):</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "caffeine" "58-08-2" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [3] "Guaranine" "1,3,7-Trimethylxanthine"</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [5] "Methyltheobromine" "Theine" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [7] "Thein" "Cafeina" </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> [9] "Koffein" "Mateina" </span>
<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/NULL.html" class="external-link">is.null</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">$</span><span class="va">Picture</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span>
<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">caffeine</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span></span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in eval(expr, envir, enclos):</span> object 'caffeine' not found</span>
+<span class="r-plt img"><img src="plot.chent-1.png" alt="" width="700" height="433"></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
diff --git a/docs/search.json b/docs/search.json
index 62e1308..939bdfd 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -1 +1 @@
-[{"path":"https://pkgdown.jrwb.de/chents/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Johannes Ranke. Author, maintainer, copyright holder.","code":""},{"path":"https://pkgdown.jrwb.de/chents/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Ranke J (2023). chents: Chemical Entities R Objects. R package version 0.3.2, https://github.com/jranke/chents, https://pkgdown.jrwb.de/chents.","code":"@Manual{, title = {chents: Chemical Entities as R Objects}, author = {Johannes Ranke}, year = {2023}, note = {R package version 0.3.2, https://github.com/jranke/chents}, url = {https://pkgdown.jrwb.de/chents}, }"},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"chents","dir":"","previous_headings":"","what":"Chemical Entities as R Objects","title":"Chemical Entities as R Objects","text":"R package chents provides utilities working chemical entities R.","code":""},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"Chemical Entities as R Objects","text":"chemical information retrieved PubChem website using webchem package Python RDKit (> 2015.03) installed configured use ‘reticulate’, basic chemoinformatics functions additional chemical information computed 2D graph can plotted Additional information can read local .yaml file","code":""},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Chemical Entities as R Objects","text":"examples available reference jrwb.de.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":null,"dir":"Reference","previous_headings":"","what":"An R6 class for chemical entities with associated data — chent","title":"An R6 class for chemical entities with associated data — chent","text":"class initialised identifier. Chemical information retrieved internet. Additionally, can generated using RDKit RDKit python bindings installed.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"An R6 class for chemical entities with associated data — chent","text":"R6Class generator object","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"An R6 class for chemical entities with associated data — chent","text":"identifier (character(1)) identifier used initiate object, attribute 'source' inchikey (character(1)) InChI Key, attribute 'source' smiles (character()) SMILES code(s), attribute 'source' mw (numeric(1)) Molecular weight, attribute 'source' pubchem (list()) List information retrieved PubChem rdkit List information obtained RDKit mol <rdkit.Chem.rdchem.Mol> object svg SVG code Picture Graph picture object obtained using grImport Pict_font_size Font size extracted intermediate PostScript file pdf_height Height MediaBox pdf cropping p0 Vapour pressure Pa cwsat Water solubility mg/L PUF Plant uptake factor chyaml List information obtained YAML file TPs List transformation products chent objects Add transformation product internal list transformations Data frame observed transformations Add line internal dataframe holding observed transformations soil_degradation Dataframe modelling DT50 values Add line internal dataframe holding modelling DT50 values soil_ff Dataframe formation fractions soil_sorption Dataframe soil sorption data Add soil sorption data","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"An R6 class for chemical entities with associated data — chent","text":"chent$new() chent$try_pubchem() chent$get_pubchem() chent$get_rdkit() chent$get_chyaml() chent$add_p0() chent$add_cwsat() chent$add_PUF() chent$add_TP() chent$add_transformation() chent$add_soil_degradation() chent$add_soil_ff() chent$add_soil_sorption() chent$pdf() chent$png() chent$emf() chent$clone()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"An R6 class for chemical entities with associated data — chent","text":"Creates new instance R6 class.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$new( identifier, smiles = NULL, inchikey = NULL, pubchem = TRUE, pubchem_from = c(\"name\", \"smiles\", \"inchikey\"), rdkit = TRUE, template = NULL, chyaml = TRUE )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"identifier Identifier stored object smiles Optional user provided SMILES code inchikey Optional user provided InChI Key pubchem attempt made retrieve chemical information PubChem via webchem package? pubchem_from Possibility select argument used query pubchem rdkit attempt made retrieve chemical information local rdkit installation via python reticulate package? template optional SMILES code used template RDKit chyaml look identifier.yaml file working directory? Try get chemical information PubChem","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$try_pubchem(query, from = \"name\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"query Query string passed get_cid Passed get_cid Get chemical information PubChem known PubChem CID","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$get_pubchem(pubchem_cid)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"pubchem_cid CID Get chemical information RDKit available","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$get_rdkit(template = NULL)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"template Optional template specified SMILES code Obtain information YAML file","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$get_chyaml( repo = c(\"wd\", \"local\", \"web\"), chyaml = paste0(URLencode(self$identifier), \".yaml\") )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"repo file looked current working directory, local git repository ~/git/chyaml, web (implemented). chyaml filename looked Add vapour pressure","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_p0(p0, T = NA, source = NA, page = NA, remark = \"\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"p0 vapour pressure Pa T Temperature source acronym specifying source information page page information taken remark remark Add water solubility","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_cwsat(cwsat, T = NA, pH = NA, source = NA, page = NA, remark = \"\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-6","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"cwsat water solubility mg/L T Temperature pH pH value source acronym specifying source information page page information taken remark remark Add plant uptake factor","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_PUF( PUF = 0, source = \"focus_generic_gw_2014\", page = 41, remark = \"Conservative default value\" )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"PUF plant uptake factor, number 0 1 source acronym specifying source information page page information taken remark remark","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_TP(x, smiles = NULL, pubchem = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-8","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"x chent object, identifier generate chent object smiles SMILES code defining chent object pubchem chemical information obtained PubChem?","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_transformation( study_type, TP_identifier, max_occurrence, remark = \"\", source = NA, pages = NA )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"study_type characterisation study type TP_identifier identifier one transformation products self$TPs max_occurrence maximum observed occurrence transformation product, expressed fraction amount result stochiometric transformation remark remark source acronym specifying source information pages page information taken","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_soil_degradation( soils, DT50_mod, DT50_mod_ref, type = NA, country = NA, pH_orig = NA, pH_medium = NA, pH_H2O = NA, perc_OC = NA, temperature = NA, moisture = NA, category = \"lab\", formulation = NA, model = NA, chi2 = NA, remark = \"\", source, page = NA )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-10","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"soils Names soils DT50_mod modelling DT50 sense regulatory pesticide fate modelling DT50_mod_ref normalised modelling DT50 sense regulatory pesticide fate modelling type soil type country country (mainly field studies) pH_orig pH stated study pH_medium medium pH measured pH_H2O pH extrapolated pure water perc_OC percentage organic carbon soil temperature temperature study degrees Celsius moisture moisture study category laboratory ('lab') field study ('field') formulation Name formulation applied, technical active ingredient model degradation model used deriving DT50_mod chi2 relative error defined FOCUS kinetics remark remark source acronym specifying source information page page information taken","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_soil_ff(target, soils, ff = 1, remark = \"\", source, page = NA)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-11","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"target identifier(s) transformation product soils soil name(s) transformation observed ff formation fraction(s)","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_soil_sorption( soils, Kf, Kfoc, N, type = NA, pH_orig = NA, pH_medium = NA, pH_H2O = NA, perc_OC = NA, perc_clay = NA, CEC = NA, remark = \"\", source, page = NA )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"Kf sorption constant L/kg, either linear (N 1) according Freundlich Kfoc constant , normalised soil organic carbon N Freundlich exponent perc_clay percentage clay soil CEC cation exchange capacity Write PDF image structure","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$pdf( file = paste0(self$identifier, \".pdf\"), dir = \"structures/pdf\", template = NULL )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"file file write dir directory write file template template expressed SMILES use RDKit Write PNG image structure","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$png( file = paste0(self$identifier, \".png\"), dir = \"structures/png\", antialias = \"gray\" )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-14","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"antialias Passed png Write EMF image structure using emf","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$emf(file = paste0(self$identifier, \".emf\"), dir = \"structures/emf\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-15","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"file file write ","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"An R6 class for chemical entities with associated data — chent","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-16","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"oct <- chent$new(\"1-octanol\", smiles = \"CCCCCCCCO\", pubchem = FALSE) #> Trying to get chemical information from RDKit using user SMILES #> CCCCCCCCO #> Error in URLencode(self$identifier): could not find function \"URLencode\" print(oct) #> Error in eval(expr, envir, enclos): object 'oct' not found if (!is.null(oct$Picture)) { plot(oct) } #> Error in eval(expr, envir, enclos): object 'oct' not found caffeine <- chent$new(\"caffeine\") #> PubChem: #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C #> Error in URLencode(self$identifier): could not find function \"URLencode\" print(caffeine) #> Error in eval(expr, envir, enclos): object 'caffeine' not found if (!is.null(caffeine$Picture)) { plot(caffeine) } #> Error in eval(expr, envir, enclos): object 'caffeine' not found"},{"path":"https://pkgdown.jrwb.de/chents/reference/draw_svg.chent.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","title":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","text":"Draw SVG graph chent object using RDKit","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/draw_svg.chent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","text":"","code":"draw_svg.chent( x, width = 300, height = 150, filename = paste0(names(x$identifier), \".svg\"), subdir = \"svg\" )"},{"path":"https://pkgdown.jrwb.de/chents/reference/draw_svg.chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","text":"x chent object plotted width desired width pixels height desired height pixels filename filename subdir path file written","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":null,"dir":"Reference","previous_headings":"","what":"An R6 class for pesticidal active ingredients and associated data — pai","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"class initialised identifier generally ISO common name. Additional chemical information retrieved internet available.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"R6Class generator object","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"chents::chent -> pai","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"iso ISO common name active ingredient according ISO 1750 bcpc Information retrieved BCPC compendium available online <pesticidecompendium.bcpc.org> Creates new instance R6 class.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"chents::chent$add_PUF() chents::chent$add_TP() chents::chent$add_cwsat() chents::chent$add_p0() chents::chent$add_soil_degradation() chents::chent$add_soil_ff() chents::chent$add_soil_sorption() chents::chent$add_transformation() chents::chent$emf() chents::chent$get_chyaml() chents::chent$get_pubchem() chents::chent$get_rdkit() chents::chent$pdf() chents::chent$png() chents::chent$try_pubchem()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"pai$new() pai$clone()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"class derived chent. makes easy create chent ISO common name pesticide active ingredient, additionally stores ISO name well complete result querying BCPC compendium using bcpc_query.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"","code":"pai$new( iso, identifier = iso, smiles = NULL, inchikey = NULL, bcpc = TRUE, pubchem = TRUE, pubchem_from = \"auto\", rdkit = TRUE, template = NULL, chyaml = TRUE )"},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"iso ISO common name used query BCPC compendium identifier Alternative identifier used querying pubchem","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"","code":"pai$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"","code":"# On Travis, we get a certificate validation error, # likely because the system (xenial) is so old, # therefore don't run this example on Travis if (Sys.getenv(\"TRAVIS\") == \"\") { atr <- pai$new(\"atrazine\") print(atr) if (!is.null(atr$Picture)) { plot(atr) } } #> BCPC: #> PubChem: #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES #> CCNC1=NC(=NC(=N1)Cl)NC(C)C #> Error in URLencode(self$identifier): could not find function \"URLencode\""},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot method for chent objects — plot.chent","title":"Plot method for chent objects — plot.chent","text":"Plot method chent objects","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot method for chent objects — plot.chent","text":"","code":"# S3 method for chent plot(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot method for chent objects — plot.chent","text":"x chent object plotted ... arguments passed grid.picture","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot method for chent objects — plot.chent","text":"","code":"caffeine <- chent$new(\"caffeine\") #> PubChem: #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C #> Error in URLencode(self$identifier): could not find function \"URLencode\" print(caffeine) #> Error in eval(expr, envir, enclos): object 'caffeine' not found if (!is.null(caffeine$Picture)) { plot(caffeine) } #> Error in eval(expr, envir, enclos): object 'caffeine' not found"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":null,"dir":"Reference","previous_headings":"","what":"R6 class for a plant protection product with at least one active ingredient — ppp","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"Contains basic information active ingredients product","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"R6Class generator object.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"name name product ais list active ingredients concentrations concentration ais concentration_units Defaults g/L density density product density_units Defaults g/L Creates new instance R6 class. ... Identifiers active ingredients concentrations Concentrations active ingredients concentration_units Defaults g/L density density density_units Defaults g/L Printing method","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"... Identifiers active ingredients","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"ppp$new() ppp$print() ppp$clone()","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"","code":"ppp$new( name, ..., concentrations, concentration_units = \"g/L\", density = 1000, density_units = \"g/L\" )"},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"","code":"ppp$print()"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"","code":"ppp$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.chent.html","id":null,"dir":"Reference","previous_headings":"","what":"Printing method for chent objects — print.chent","title":"Printing method for chent objects — print.chent","text":"Printing method chent objects","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.chent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Printing method for chent objects — print.chent","text":"","code":"# S3 method for chent print(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/print.chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Printing method for chent objects — print.chent","text":"x chent object printed ... arguments compatibility S3 method","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.pai.html","id":null,"dir":"Reference","previous_headings":"","what":"Printing method for pai objects (pesticidal active ingredients) — print.pai","title":"Printing method for pai objects (pesticidal active ingredients) — print.pai","text":"Printing method pai objects (pesticidal active ingredients)","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.pai.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Printing method for pai objects (pesticidal active ingredients) — print.pai","text":"","code":"# S3 method for pai print(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/print.pai.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Printing method for pai objects (pesticidal active ingredients) — print.pai","text":"x chent object printed ... arguments compatibility S3 method","code":""}]
+[{"path":"https://pkgdown.jrwb.de/chents/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Johannes Ranke. Author, maintainer, copyright holder.","code":""},{"path":"https://pkgdown.jrwb.de/chents/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Ranke J (2023). chents: Chemical Entities R Objects. R package version 0.3.2, https://github.com/jranke/chents, https://pkgdown.jrwb.de/chents.","code":"@Manual{, title = {chents: Chemical Entities as R Objects}, author = {Johannes Ranke}, year = {2023}, note = {R package version 0.3.2, https://github.com/jranke/chents}, url = {https://pkgdown.jrwb.de/chents}, }"},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"chents","dir":"","previous_headings":"","what":"Chemical Entities as R Objects","title":"Chemical Entities as R Objects","text":"R package chents provides utilities working chemical entities R.","code":""},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"Chemical Entities as R Objects","text":"chemical information retrieved PubChem website using webchem package Python RDKit (> 2015.03) installed configured use ‘reticulate’, basic chemoinformatics functions additional chemical information computed 2D graph can plotted Additional information can read local .yaml file","code":""},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"examples","dir":"","previous_headings":"","what":"Examples","title":"Chemical Entities as R Objects","text":"examples available reference jrwb.de.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":null,"dir":"Reference","previous_headings":"","what":"An R6 class for chemical entities with associated data — chent","title":"An R6 class for chemical entities with associated data — chent","text":"class initialised identifier. Chemical information retrieved internet. Additionally, can generated using RDKit RDKit python bindings installed.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"An R6 class for chemical entities with associated data — chent","text":"R6Class generator object","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"An R6 class for chemical entities with associated data — chent","text":"identifier (character(1)) identifier used initiate object, attribute 'source' inchikey (character(1)) InChI Key, attribute 'source' smiles (character()) SMILES code(s), attribute 'source' mw (numeric(1)) Molecular weight, attribute 'source' pubchem (list()) List information retrieved PubChem rdkit List information obtained RDKit mol <rdkit.Chem.rdchem.Mol> object svg SVG code Picture Graph picture object obtained using grImport Pict_font_size Font size extracted intermediate PostScript file pdf_height Height MediaBox pdf cropping p0 Vapour pressure Pa cwsat Water solubility mg/L PUF Plant uptake factor chyaml List information obtained YAML file TPs List transformation products chent objects Add transformation product internal list transformations Data frame observed transformations Add line internal dataframe holding observed transformations soil_degradation Dataframe modelling DT50 values Add line internal dataframe holding modelling DT50 values soil_ff Dataframe formation fractions soil_sorption Dataframe soil sorption data Add soil sorption data","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"An R6 class for chemical entities with associated data — chent","text":"chent$new() chent$try_pubchem() chent$get_pubchem() chent$get_rdkit() chent$get_chyaml() chent$add_p0() chent$add_cwsat() chent$add_PUF() chent$add_TP() chent$add_transformation() chent$add_soil_degradation() chent$add_soil_ff() chent$add_soil_sorption() chent$pdf() chent$png() chent$emf() chent$clone()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"An R6 class for chemical entities with associated data — chent","text":"Creates new instance R6 class.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$new( identifier, smiles = NULL, inchikey = NULL, pubchem = TRUE, pubchem_from = c(\"name\", \"smiles\", \"inchikey\"), rdkit = TRUE, template = NULL, chyaml = TRUE )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"identifier Identifier stored object smiles Optional user provided SMILES code inchikey Optional user provided InChI Key pubchem attempt made retrieve chemical information PubChem via webchem package? pubchem_from Possibility select argument used query pubchem rdkit attempt made retrieve chemical information local rdkit installation via python reticulate package? template optional SMILES code used template RDKit chyaml look identifier.yaml file working directory? Try get chemical information PubChem","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$try_pubchem(query, from = \"name\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"query Query string passed get_cid Passed get_cid Get chemical information PubChem known PubChem CID","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$get_pubchem(pubchem_cid)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"pubchem_cid CID Get chemical information RDKit available","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$get_rdkit(template = NULL)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"template Optional template specified SMILES code Obtain information YAML file","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$get_chyaml( repo = c(\"wd\", \"local\", \"web\"), chyaml = paste0(URLencode(self$identifier), \".yaml\") )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-4","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"repo file looked current working directory, local git repository ~/git/chyaml, web (implemented). chyaml filename looked Add vapour pressure","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_p0(p0, T = NA, source = NA, page = NA, remark = \"\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-5","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"p0 vapour pressure Pa T Temperature source acronym specifying source information page page information taken remark remark Add water solubility","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_cwsat(cwsat, T = NA, pH = NA, source = NA, page = NA, remark = \"\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-6","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"cwsat water solubility mg/L T Temperature pH pH value source acronym specifying source information page page information taken remark remark Add plant uptake factor","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_PUF( PUF = 0, source = \"focus_generic_gw_2014\", page = 41, remark = \"Conservative default value\" )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-7","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"PUF plant uptake factor, number 0 1 source acronym specifying source information page page information taken remark remark","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_TP(x, smiles = NULL, pubchem = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-8","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"x chent object, identifier generate chent object smiles SMILES code defining chent object pubchem chemical information obtained PubChem?","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_transformation( study_type, TP_identifier, max_occurrence, remark = \"\", source = NA, pages = NA )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-9","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"study_type characterisation study type TP_identifier identifier one transformation products self$TPs max_occurrence maximum observed occurrence transformation product, expressed fraction amount result stochiometric transformation remark remark source acronym specifying source information pages page information taken","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_soil_degradation( soils, DT50_mod, DT50_mod_ref, type = NA, country = NA, pH_orig = NA, pH_medium = NA, pH_H2O = NA, perc_OC = NA, temperature = NA, moisture = NA, category = \"lab\", formulation = NA, model = NA, chi2 = NA, remark = \"\", source, page = NA )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-10","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"soils Names soils DT50_mod modelling DT50 sense regulatory pesticide fate modelling DT50_mod_ref normalised modelling DT50 sense regulatory pesticide fate modelling type soil type country country (mainly field studies) pH_orig pH stated study pH_medium medium pH measured pH_H2O pH extrapolated pure water perc_OC percentage organic carbon soil temperature temperature study degrees Celsius moisture moisture study category laboratory ('lab') field study ('field') formulation Name formulation applied, technical active ingredient model degradation model used deriving DT50_mod chi2 relative error defined FOCUS kinetics remark remark source acronym specifying source information page page information taken","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_soil_ff(target, soils, ff = 1, remark = \"\", source, page = NA)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-11","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"target identifier(s) transformation product soils soil name(s) transformation observed ff formation fraction(s)","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$add_soil_sorption( soils, Kf, Kfoc, N, type = NA, pH_orig = NA, pH_medium = NA, pH_H2O = NA, perc_OC = NA, perc_clay = NA, CEC = NA, remark = \"\", source, page = NA )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-12","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"Kf sorption constant L/kg, either linear (N 1) according Freundlich Kfoc constant , normalised soil organic carbon N Freundlich exponent perc_clay percentage clay soil CEC cation exchange capacity Write PDF image structure","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$pdf( file = paste0(self$identifier, \".pdf\"), dir = \"structures/pdf\", template = NULL )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-13","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"file file write dir directory write file template template expressed SMILES use RDKit Write PNG image structure","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$png( file = paste0(self$identifier, \".png\"), dir = \"structures/png\", antialias = \"gray\" )"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-14","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"antialias Passed png Write EMF image structure using emf","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$emf(file = paste0(self$identifier, \".emf\"), dir = \"structures/emf\")"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-15","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"file file write ","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"An R6 class for chemical entities with associated data — chent","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"usage-16","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"chent$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"arguments-16","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for chemical entities with associated data — chent","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An R6 class for chemical entities with associated data — chent","text":"","code":"oct <- chent$new(\"1-octanol\", smiles = \"CCCCCCCCO\", pubchem = FALSE) #> Trying to get chemical information from RDKit using user SMILES #> CCCCCCCCO #> Did not find chyaml file ./1-octanol.yaml print(oct) #> <chent> #> Identifier $identifier 1-octanol #> InChI Key $inchikey #> SMILES string $smiles: #> user #> \"CCCCCCCCO\" #> Molecular weight $mw: 130.2 if (!is.null(oct$Picture)) { plot(oct) } caffeine <- chent$new(\"caffeine\") #> PubChem: #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C #> Did not find chyaml file ./caffeine.yaml print(caffeine) #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem_Canonical #> \"CN1C=NC2=C1C(=O)N(C(=O)N2C)C\" #> Molecular weight $mw: 194.2 #> PubChem synonyms (up to 10): #> [1] \"caffeine\" \"58-08-2\" #> [3] \"Guaranine\" \"1,3,7-Trimethylxanthine\" #> [5] \"Methyltheobromine\" \"Theine\" #> [7] \"Thein\" \"Cafeina\" #> [9] \"Koffein\" \"Mateina\" if (!is.null(caffeine$Picture)) { plot(caffeine) }"},{"path":"https://pkgdown.jrwb.de/chents/reference/draw_svg.chent.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","title":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","text":"Draw SVG graph chent object using RDKit","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/draw_svg.chent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","text":"","code":"draw_svg.chent( x, width = 300, height = 150, filename = paste0(names(x$identifier), \".svg\"), subdir = \"svg\" )"},{"path":"https://pkgdown.jrwb.de/chents/reference/draw_svg.chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw SVG graph from a chent object using RDKit — draw_svg.chent","text":"x chent object plotted width desired width pixels height desired height pixels filename filename subdir path file written","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":null,"dir":"Reference","previous_headings":"","what":"An R6 class for pesticidal active ingredients and associated data — pai","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"class initialised identifier generally ISO common name. Additional chemical information retrieved internet available.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"R6Class generator object","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"chents::chent -> pai","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"iso ISO common name active ingredient according ISO 1750 bcpc Information retrieved BCPC compendium available online <pesticidecompendium.bcpc.org> Creates new instance R6 class.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"chents::chent$add_PUF() chents::chent$add_TP() chents::chent$add_cwsat() chents::chent$add_p0() chents::chent$add_soil_degradation() chents::chent$add_soil_ff() chents::chent$add_soil_sorption() chents::chent$add_transformation() chents::chent$emf() chents::chent$get_chyaml() chents::chent$get_pubchem() chents::chent$get_rdkit() chents::chent$pdf() chents::chent$png() chents::chent$try_pubchem()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"pai$new() pai$clone()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"class derived chent. makes easy create chent ISO common name pesticide active ingredient, additionally stores ISO name well complete result querying BCPC compendium using bcpc_query.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"","code":"pai$new( iso, identifier = iso, smiles = NULL, inchikey = NULL, bcpc = TRUE, pubchem = TRUE, pubchem_from = \"auto\", rdkit = TRUE, template = NULL, chyaml = TRUE )"},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"iso ISO common name used query BCPC compendium identifier Alternative identifier used querying pubchem","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"","code":"pai$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/pai.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"","code":"# On Travis, we get a certificate validation error, # likely because the system (xenial) is so old, # therefore don't run this example on Travis if (Sys.getenv(\"TRAVIS\") == \"\") { atr <- pai$new(\"atrazine\") print(atr) if (!is.null(atr$Picture)) { plot(atr) } } #> BCPC: #> PubChem: #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES #> CCNC1=NC(=NC(=N1)Cl)NC(C)C #> Did not find chyaml file ./atrazine.yaml #> <pai> with ISO common name $iso atrazine #> <chent> #> Identifier $identifier atrazine #> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem_Canonical #> \"CCNC1=NC(=NC(=N1)Cl)NC(C)C\" #> Molecular weight $mw: 215.7 #> PubChem synonyms (up to 10): #> [1] \"atrazine\" \"1912-24-9\" \"Gesaprim\" \"Oleogesaprim\" \"Aktikon\" #> [6] \"Atranex\" \"Chromozin\" \"Atazinax\" \"Atrasine\" \"Gesoprim\""},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot method for chent objects — plot.chent","title":"Plot method for chent objects — plot.chent","text":"Plot method chent objects","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot method for chent objects — plot.chent","text":"","code":"# S3 method for chent plot(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot method for chent objects — plot.chent","text":"x chent object plotted ... arguments passed grid.picture","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/plot.chent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot method for chent objects — plot.chent","text":"","code":"caffeine <- chent$new(\"caffeine\") #> PubChem: #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C #> Did not find chyaml file ./caffeine.yaml print(caffeine) #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem_Canonical #> \"CN1C=NC2=C1C(=O)N(C(=O)N2C)C\" #> Molecular weight $mw: 194.2 #> PubChem synonyms (up to 10): #> [1] \"caffeine\" \"58-08-2\" #> [3] \"Guaranine\" \"1,3,7-Trimethylxanthine\" #> [5] \"Methyltheobromine\" \"Theine\" #> [7] \"Thein\" \"Cafeina\" #> [9] \"Koffein\" \"Mateina\" if (!is.null(caffeine$Picture)) { plot(caffeine) }"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":null,"dir":"Reference","previous_headings":"","what":"R6 class for a plant protection product with at least one active ingredient — ppp","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"Contains basic information active ingredients product","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"R6Class generator object.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"name name product ais list active ingredients concentrations concentration ais concentration_units Defaults g/L density density product density_units Defaults g/L Creates new instance R6 class. ... Identifiers active ingredients concentrations Concentrations active ingredients concentration_units Defaults g/L density density density_units Defaults g/L Printing method","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"... Identifiers active ingredients","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"ppp$new() ppp$print() ppp$clone()","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"","code":"ppp$new( name, ..., concentrations, concentration_units = \"g/L\", density = 1000, density_units = \"g/L\" )"},{"path":[]},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"","code":"ppp$print()"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"","code":"ppp$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.chent.html","id":null,"dir":"Reference","previous_headings":"","what":"Printing method for chent objects — print.chent","title":"Printing method for chent objects — print.chent","text":"Printing method chent objects","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.chent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Printing method for chent objects — print.chent","text":"","code":"# S3 method for chent print(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/print.chent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Printing method for chent objects — print.chent","text":"x chent object printed ... arguments compatibility S3 method","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.pai.html","id":null,"dir":"Reference","previous_headings":"","what":"Printing method for pai objects (pesticidal active ingredients) — print.pai","title":"Printing method for pai objects (pesticidal active ingredients) — print.pai","text":"Printing method pai objects (pesticidal active ingredients)","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.pai.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Printing method for pai objects (pesticidal active ingredients) — print.pai","text":"","code":"# S3 method for pai print(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/print.pai.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Printing method for pai objects (pesticidal active ingredients) — print.pai","text":"x chent object printed ... arguments compatibility S3 method","code":""}]

Contact - Imprint