diff options
| author | Johannes Ranke <johannes.ranke@jrwb.de> | 2026-03-05 11:09:31 +0100 |
|---|---|---|
| committer | Johannes Ranke <johannes.ranke@jrwb.de> | 2026-03-05 11:14:53 +0100 |
| commit | 4e092707e70adac492b74197e6ceef5cdd09cc8d (patch) | |
| tree | 0e3f46d0282c5ef5785394bc9f0b33a990e20b6e | |
| parent | 594d35837001f92dec9bda0e873ba6b7286162a0 (diff) | |
Bump version for improved pai printing method
Also, improve the example demonstrating pais not found at BCPC
| -rw-r--r-- | DESCRIPTION | 4 | ||||
| -rw-r--r-- | NEWS.md | 4 | ||||
| -rw-r--r-- | R/chent.R | 3 | ||||
| -rw-r--r-- | docs/404.html | 2 | ||||
| -rw-r--r-- | docs/authors.html | 10 | ||||
| -rw-r--r-- | docs/index.html | 64 | ||||
| -rw-r--r-- | docs/news/index.html | 6 | ||||
| -rw-r--r-- | docs/reference/chent.html | 17 | ||||
| -rw-r--r-- | docs/reference/figures/README-caffeine-1.png | bin | 0 -> 23057 bytes | |||
| -rw-r--r-- | docs/reference/figures/README-plot-caffeine-1.png | bin | 0 -> 6346 bytes | |||
| -rw-r--r-- | docs/reference/figures/README-unnamed-chunk-3-1.png | bin | 0 -> 17761 bytes | |||
| -rw-r--r-- | docs/reference/figures/README-unnamed-chunk-4-1.png | bin | 0 -> 6346 bytes | |||
| -rw-r--r-- | docs/reference/figures/README-unnamed-chunk-5-1.png | bin | 0 -> 7461 bytes | |||
| -rw-r--r-- | docs/reference/index.html | 2 | ||||
| -rw-r--r-- | docs/reference/pai.html | 51 | ||||
| -rw-r--r-- | docs/search.json | 2 | ||||
| -rw-r--r-- | log/build.log | 2 | ||||
| -rw-r--r-- | man/pai.Rd | 3 |
18 files changed, 114 insertions, 56 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index 6a2d597..9550f72 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: chents Type: Package Title: Chemical Entities as R Objects -Version: 0.4.0 -Date: 2025-10-22 +Version: 0.4.1 +Date: 2026-03-05 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "johannes.ranke@jrwb.de")) Description: Utilities for dealing with chemical entities and associated @@ -1,3 +1,7 @@ +## version 0.4.1 + +- R/chent.R: Improve print method for `pai` objects. + ## version 0.4.0 - R/chent.R: PubChem has changed the names of the SMILES codes they provide. The former isomeric smiles that was incorporated in our chent objects as "Pubchem_Isomeric" is now simply calles SMILES, and is incorporated in our objects as "PubChem". The SMILES code formerly given as "canonical" is now termed "connectivity SMILES" because it does not contain isotopic or stereochemical specifications. In the chents object, it is now available under the name "PubChem_Connectivity". This is a breaking change, so objects generated with versions < 0.4.0 may produce errors when used with current versions. @@ -656,6 +656,9 @@ plot.chent = function(x, ...) { #' if (!is.null(atr$Picture)) { #' plot(atr) #' } +#' # We can also define pais that are not found on the BCPC site +#' decanol <- pai$new("1-Decanol") +#' print(decanol) pai <- R6Class("pai", inherit = chent, public = list( diff --git a/docs/404.html b/docs/404.html index 9712405..80410c2 100644 --- a/docs/404.html +++ b/docs/404.html @@ -20,7 +20,7 @@ <a class="navbar-brand me-2" href="https://pkgdown.jrwb.de/chents/index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.1</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/authors.html b/docs/authors.html index f665ff7..d892a2a 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.1</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -44,15 +44,15 @@ <h2 id="citation">Citation</h2> <p><small class="dont-index">Source: <a href="https://github.com/jranke/chents/blob/HEAD/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small></p> - <p>Ranke J (2025). + <p>Ranke J (2026). <em>chents: Chemical Entities as R Objects</em>. -R package version 0.4.0, <a href="https://pkgdown.jrwb.de/chents">https://pkgdown.jrwb.de/chents</a>. +R package version 0.4.1, <a href="https://pkgdown.jrwb.de/chents">https://pkgdown.jrwb.de/chents</a>. </p> <pre>@Manual{, title = {chents: Chemical Entities as R Objects}, author = {Johannes Ranke}, - year = {2025}, - note = {R package version 0.4.0}, + year = {2026}, + note = {R package version 0.4.1}, url = {https://pkgdown.jrwb.de/chents}, }</pre> </div> diff --git a/docs/index.html b/docs/index.html index 6850f0a..d9d44ad 100644 --- a/docs/index.html +++ b/docs/index.html @@ -22,7 +22,7 @@ <a class="navbar-brand me-2" href="index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.1</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -51,35 +51,61 @@ </h1></div> <p><a href="https://pkgdown.jrwb.de/chents/"><img src="https://img.shields.io/badge/docs-jrwb.de-blue.svg" alt="Online documentation"></a> <a href="https://jranke.r-universe.dev/chents" class="external-link"><img src="https://jranke.r-universe.dev/badges/chents" alt="R-Universe status"></a> <a href="https://pkgdown.jrwb.de/chents/coverage/coverage.html"><img src="https://img.shields.io/badge/coverage-jrwb.de-blue.svg" alt="Code coverage"></a></p> <p>The R package <strong>chents</strong> provides some utilities for working with chemical entities in R.</p> -<div class="section level2"> -<h2 id="features">Features<a class="anchor" aria-label="anchor" href="#features"></a> -</h2> -<ul> -<li>Some chemical information is retrieved from the PubChem website using the webchem package</li> -<li>If Python and RDKit (> 2015.03) are installed and configured for use with ‘reticulate’, some basic chemoinformatics functions some additional chemical information is computed and a 2D graph can be plotted</li> -<li>Additional information can be read from a local .yaml file</li> -</ul> -</div> +<p>When first defining a chemical entity, some chemical information is retrieved from the <a href="https://pubchem.ncbi.nlm.nih.gov/" class="external-link">PubChem</a> website using the <a href="https://docs.ropensci.org/webchem/" class="external-link">webchem</a> package.</p> +<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/chents">chents</a></span><span class="op">)</span></span> +<span><span class="va">caffeine</span> <span class="op"><-</span> <span class="va"><a href="reference/chent.html">chent</a></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="co">#> Querying PubChem ...</span></span> +<span><span class="co">#> Trying to get chemical information from RDKit using PubChem SMILES</span></span> +<span><span class="co">#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C</span></span></code></pre></div> +<p>If Python and <a href="https://rdkit.org" class="external-link">RDKit</a> (> 2015.03) are installed and configured for use with the <a href="https://rstudio.github.io/reticulate/" class="external-link">reticulate</a> package, some additional chemical information including a 2D graph are computed.</p> +<p>The print method gives an overview of the information that was collected.</p> +<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><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="co">#> <chent></span></span> +<span><span class="co">#> Identifier $identifier caffeine </span></span> +<span><span class="co">#> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N </span></span> +<span><span class="co">#> SMILES string $smiles:</span></span> +<span><span class="co">#> PubChem </span></span> +<span><span class="co">#> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" </span></span> +<span><span class="co">#> Molecular weight $mw: 194.2 </span></span> +<span><span class="co">#> PubChem synonyms (up to 10):</span></span> +<span><span class="co">#> [1] "caffeine" "58-08-2" </span></span> +<span><span class="co">#> [3] "Guaranine" "1,3,7-Trimethylxanthine"</span></span> +<span><span class="co">#> [5] "Methyltheobromine" "Theine" </span></span> +<span><span class="co">#> [7] "Thein" "Cafeina" </span></span> +<span><span class="co">#> [9] "Koffein" "Mateina"</span></span></code></pre></div> +<p>There is a very simple plotting method for the chemical structure.</p> +<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><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></code></pre></div> +<p><img src="reference/figures/README-unnamed-chunk-4-1.png"><!-- --></p> +<p>Additional information can be (but is rarely ever) read from a local .yaml file. This information can be leveraged e.g. by the <a href="https://pkgdown.jrwb.de/pfm/reference/PEC_soil.html" class="external-link">PEC_soil</a> function of the ‘pfm’ package.</p> +<p>If you have a so-called ISO common name of a pesticide active ingredient, you can use the ‘pai’ class derived from the ‘chent’ class, which starts with querying the <a href="http://www.bcpcpesticidecompendium.org/" class="external-link">BCPC compendium</a> first.</p> +<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span><span class="va">lambda</span> <span class="op"><-</span> <span class="va"><a href="reference/pai.html">pai</a></span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"lambda-cyhalothrin"</span><span class="op">)</span></span> +<span><span class="co">#> Querying BCPC for lambda-cyhalothrin ...</span></span> +<span><span class="co">#> Querying PubChem ...</span></span> +<span><span class="co">#> Trying to get chemical information from RDKit using PubChem SMILES</span></span> +<span><span class="co">#> CC1([C@@H]([C@@H]1C(=O)O[C@@H](C#N)C2=CC(=CC=C2)OC3=CC=CC=C3)/C=C(/C(F)(F)F)\Cl)C</span></span> +<span><span class="co">#> RDKit mw is 449.856</span></span> +<span><span class="co">#> mw is 449.8</span></span> +<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">lambda</span><span class="op">)</span></span></code></pre></div> +<p><img src="reference/figures/README-unnamed-chunk-5-1.png"><!-- --></p> <div class="section level2"> <h2 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a> </h2> <p>You can conveniently install chents from the repository kindly made available by the R-Universe project:</p> -<pre><code><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"chents"</span>,</span> -<span> repos <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"https://jranke.r-universe.dev"</span>, <span class="st">"https://cran.r-project.org"</span><span class="op">)</span><span class="op">)</span></span></code></pre> +<div class="sourceCode" id="cb5"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" tabindex="-1"></a><span class="fu">install.packages</span>(<span class="st">"chents"</span>,</span> +<span id="cb5-2"><a href="#cb5-2" tabindex="-1"></a> <span class="at">repos =</span> <span class="fu">c</span>(<span class="st">"https://jranke.r-universe.dev"</span>, <span class="st">"https://cran.r-project.org"</span>))</span></code></pre></div> <p>In order to profit from the chemoinformatics, you need to install RDKit and its python bindings. On a Debian type Linux distribution, just use</p> -<pre><code>sudo apt install python3-rdkit</code></pre> +<div class="sourceCode" id="cb6"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" tabindex="-1"></a>sudo apt install python3<span class="sc">-</span>rdkit</span></code></pre></div> <p>If you use this package on Windows or MacOS, I would be happy to include installation instructions here if you share them with me, e.g. via a Pull Request.</p> </div> <div class="section level2"> <h2 id="configuration-of-the-python-version-to-use">Configuration of the Python version to use<a class="anchor" aria-label="anchor" href="#configuration-of-the-python-version-to-use"></a> </h2> <p>On Debian type Linux distributions, you can use the following line in your global or project specific <code>.Rprofile</code> file to tell the <code>reticulate</code> package to use the system Python version that will find the RDKit installed in the system location.</p> -<pre><code><span><span class="fu"><a href="https://rdrr.io/r/base/Sys.setenv.html" class="external-link">Sys.setenv</a></span><span class="op">(</span>RETICULATE_PYTHON<span class="op">=</span><span class="st">"/usr/bin/python3"</span><span class="op">)</span></span></code></pre> -</div> -<div class="section level2"> -<h2 id="examples">Examples<a class="anchor" aria-label="anchor" href="#examples"></a> -</h2> -<p>Some examples are available from the <a href="https://pkgdown.jrwb.de/chents/reference">reference on jrwb.de</a>. For example, in the <a href="https://pkgdown.jrwb.de/chents/reference/chent.html#ref-examples">example code section of the chent object docs</a> you can see how to generate an R object for caffeine, show some of the information retrieved from PubChem and plot it by virtue of RDKit.</p> +<div class="sourceCode" id="cb7"><pre class="sourceCode R"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" tabindex="-1"></a><span class="fu">Sys.setenv</span>(<span class="at">RETICULATE_PYTHON=</span><span class="st">"/usr/bin/python3"</span>)</span></code></pre></div> </div> </div> </main><aside class="col-md-3"><div class="links"> diff --git a/docs/news/index.html b/docs/news/index.html index eef5cdd..fd27893 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.1</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -33,6 +33,10 @@ </div> <div class="section level2"> +<h2 class="pkg-version" data-toc-text="0.4.1" id="version-041">version 0.4.1<a class="anchor" aria-label="anchor" href="#version-041"></a></h2> +<ul><li>R/chent.R: Improve print method for <code>pai</code> objects.</li> +</ul></div> + <div class="section level2"> <h2 class="pkg-version" data-toc-text="0.4.0" id="version-040">version 0.4.0<a class="anchor" aria-label="anchor" href="#version-040"></a></h2> <ul><li>R/chent.R: PubChem has changed the names of the SMILES codes they provide. The former isomeric smiles that was incorporated in our chent objects as “Pubchem_Isomeric” is now simply calles SMILES, and is incorporated in our objects as “PubChem”. The SMILES code formerly given as “canonical” is now termed “connectivity SMILES” because it does not contain isotopic or stereochemical specifications. In the chents object, it is now available under the name “PubChem_Connectivity”. This is a breaking change, so objects generated with versions < 0.4.0 may produce errors when used with current versions.</li> </ul></div> diff --git a/docs/reference/chent.html b/docs/reference/chent.html index a2bac4f..131d548 100644 --- a/docs/reference/chent.html +++ b/docs/reference/chent.html @@ -222,7 +222,7 @@ directory?</p></dd> <h3 id="method-try-pubchem-">Method <code>try_pubchem()</code><a class="anchor" aria-label="anchor" href="#method-try-pubchem-"></a></h3> <p>Try to get chemical information from PubChem</p><div class="section"> <h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> -<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">try_pubchem</span><span class="op">(</span><span class="va">query</span>, from <span class="op">=</span> <span class="st">"name"</span><span class="op">)</span></span></code></pre></div><p></p></div> +<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">chent</span><span class="op">$</span><span class="fu">try_pubchem</span><span class="op">(</span>query <span class="op">=</span> <span class="va">self</span><span class="op">$</span><span class="va">identifier</span>, from <span class="op">=</span> <span class="st">"name"</span><span class="op">)</span></span></code></pre></div><p></p></div> </div> <div class="section"> @@ -791,8 +791,8 @@ or according to Freundlich</p></dd> <div class="section level2"> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">caffeine</span> <span class="op"><-</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">#></span> PubChem:</span> -<span class="r-msg co"><span class="r-pr">#></span> Trying to get chemical information from RDKit using PubChem SMILES</span> +<span class="r-msg co"><span class="r-pr">#></span> Querying PubChem for name caffeine ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using PubChem SMILES</span> <span class="r-msg co"><span class="r-pr">#></span> CN1C=NC2=C1C(=O)N(C(=O)N2C)C</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-out co"><span class="r-pr">#></span> <chent></span> @@ -813,11 +813,16 @@ or according to Freundlich</p></dd> <span class="r-in"><span><span class="op">}</span></span></span> <span class="r-plt img"><img src="chent-1.png" alt="" width="700" height="433"></span> <span class="r-in"><span><span class="va">oct</span> <span class="op"><-</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">#></span> Trying to get chemical information from RDKit using user SMILES</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using user SMILES</span> <span class="r-msg co"><span class="r-pr">#></span> CCCCCCCCO</span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in if (!is.na(self$mw)) { if (round(self$rdkit$mw, 1) != round(self$mw, 1)) { message("RDKit mw is ", self$rdkit$mw) message("mw is ", self$mw) }} else { self$mw <- self$rdkit$mw attr(self$mw, "source") <- "rdkit"}:</span> argument is of length zero</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">#></span> <span class="error">Error:</span> object 'oct' not found</span> +<span class="r-out co"><span class="r-pr">#></span> <chent></span> +<span class="r-out co"><span class="r-pr">#></span> Identifier $identifier 1-octanol </span> +<span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey NA </span> +<span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> +<span class="r-out co"><span class="r-pr">#></span> user </span> +<span class="r-out co"><span class="r-pr">#></span> "CCCCCCCCO" </span> +<span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 130.2 </span> </code></pre></div> </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> diff --git a/docs/reference/figures/README-caffeine-1.png b/docs/reference/figures/README-caffeine-1.png Binary files differnew file mode 100644 index 0000000..aadb576 --- /dev/null +++ b/docs/reference/figures/README-caffeine-1.png diff --git a/docs/reference/figures/README-plot-caffeine-1.png b/docs/reference/figures/README-plot-caffeine-1.png Binary files differnew file mode 100644 index 0000000..21caae7 --- /dev/null +++ b/docs/reference/figures/README-plot-caffeine-1.png diff --git a/docs/reference/figures/README-unnamed-chunk-3-1.png b/docs/reference/figures/README-unnamed-chunk-3-1.png Binary files differnew file mode 100644 index 0000000..9646595 --- /dev/null +++ b/docs/reference/figures/README-unnamed-chunk-3-1.png diff --git a/docs/reference/figures/README-unnamed-chunk-4-1.png b/docs/reference/figures/README-unnamed-chunk-4-1.png Binary files differnew file mode 100644 index 0000000..21caae7 --- /dev/null +++ b/docs/reference/figures/README-unnamed-chunk-4-1.png diff --git a/docs/reference/figures/README-unnamed-chunk-5-1.png b/docs/reference/figures/README-unnamed-chunk-5-1.png Binary files differnew file mode 100644 index 0000000..d54f3a0 --- /dev/null +++ b/docs/reference/figures/README-unnamed-chunk-5-1.png diff --git a/docs/reference/index.html b/docs/reference/index.html index 5112aef..a8a9c05 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -7,7 +7,7 @@ <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.1</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> diff --git a/docs/reference/pai.html b/docs/reference/pai.html index 443769d..25ca564 100644 --- a/docs/reference/pai.html +++ b/docs/reference/pai.html @@ -15,7 +15,7 @@ bcpc_query."></head><body> <a class="navbar-brand me-2" href="../index.html">chents</a> - <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.0</small> + <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.4.1</small> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> @@ -184,23 +184,12 @@ and the reticulate package?</p></dd> <div class="section level2"> <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># On Travis, we get a certificate validation error,</span></span></span> -<span class="r-in"><span><span class="co"># likely because the system (xenial) is so old,</span></span></span> -<span class="r-in"><span><span class="co"># therefore don't run this example on Travis</span></span></span> -<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html" class="external-link">Sys.getenv</a></span><span class="op">(</span><span class="st">"TRAVIS"</span><span class="op">)</span> <span class="op">==</span> <span class="st">""</span><span class="op">)</span> <span class="op">{</span></span></span> -<span class="r-in"><span></span></span> -<span class="r-in"><span><span class="va">atr</span> <span class="op"><-</span> <span class="va">pai</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"atrazine"</span><span class="op">)</span></span></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">atr</span><span class="op">)</span></span></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">atr</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">atr</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="op">}</span></span></span> -<span class="r-in"><span></span></span> -<span class="r-in"><span><span class="op">}</span></span></span> -<span class="r-msg co"><span class="r-pr">#></span> BCPC:</span> -<span class="r-msg co"><span class="r-pr">#></span> PubChem:</span> -<span class="r-msg co"><span class="r-pr">#></span> Trying to get chemical information from RDKit using PubChem SMILES</span> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">atr</span> <span class="op"><-</span> <span class="va">pai</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"atrazine"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Querying BCPC for atrazine ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Querying PubChem for inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using PubChem SMILES</span> <span class="r-msg co"><span class="r-pr">#></span> CCNC1=NC(=NC(=N1)Cl)NC(C)C</span> -<span class="r-plt img"><img src="pai-1.png" alt="" width="700" height="433"></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">atr</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> <pai> with ISO common name $iso atrazine </span> <span class="r-out co"><span class="r-pr">#></span> <chent></span> <span class="r-out co"><span class="r-pr">#></span> Identifier $identifier atrazine </span> @@ -210,8 +199,32 @@ and the reticulate package?</p></dd> <span class="r-out co"><span class="r-pr">#></span> "CCNC1=NC(=NC(=N1)Cl)NC(C)C" </span> <span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 215.7 </span> <span class="r-out co"><span class="r-pr">#></span> PubChem synonyms (up to 10):</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "atrazine" "1912-24-9" "Gesaprim" "Atranex" "Oleogesaprim"</span> -<span class="r-out co"><span class="r-pr">#></span> [6] "Atazinax" "Atrasine" "Chromozin" "Gesoprim" "Hungazin" </span> +<span class="r-out co"><span class="r-pr">#></span> [1] "atrazine" "1912-24-9" "Gesaprim" "Aatrex" "Atranex" </span> +<span class="r-out co"><span class="r-pr">#></span> [6] "Atrazin" "Oleogesaprim" "Atazinax" "Atrasine" "Chromozin" </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">atr</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">atr</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-plt img"><img src="pai-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># We can also define pais that are not found on the BCPC site</span></span></span> +<span class="r-in"><span><span class="va">decanol</span> <span class="op"><-</span> <span class="va">pai</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"1-Decanol"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Querying BCPC for 1-Decanol ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Common name 1-Decanol is not known at the BCPC compendium, trying PubChem</span> +<span class="r-msg co"><span class="r-pr">#></span> Querying PubChem for name 1-Decanol ...</span> +<span class="r-msg co"><span class="r-pr">#></span> Get chemical information from RDKit using PubChem SMILES</span> +<span class="r-msg co"><span class="r-pr">#></span> CCCCCCCCCCO</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">decanol</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <pai> without ISO common name</span> +<span class="r-out co"><span class="r-pr">#></span> <chent></span> +<span class="r-out co"><span class="r-pr">#></span> Identifier $identifier 1-Decanol </span> +<span class="r-out co"><span class="r-pr">#></span> InChI Key $inchikey MWKFXSUHUHTGQN-UHFFFAOYSA-N </span> +<span class="r-out co"><span class="r-pr">#></span> SMILES string $smiles:</span> +<span class="r-out co"><span class="r-pr">#></span> PubChem </span> +<span class="r-out co"><span class="r-pr">#></span> "CCCCCCCCCCO" </span> +<span class="r-out co"><span class="r-pr">#></span> Molecular weight $mw: 158.3 </span> +<span class="r-out co"><span class="r-pr">#></span> PubChem synonyms (up to 10):</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "1-DECANOL" "Decan-1-ol" "Decyl alcohol" "112-30-1" </span> +<span class="r-out co"><span class="r-pr">#></span> [5] "n-Decyl alcohol" "n-Decanol" "Capric alcohol" "Nonylcarbinol" </span> +<span class="r-out co"><span class="r-pr">#></span> [9] "Antak" "Royaltac" </span> </code></pre></div> </div> </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> diff --git a/docs/search.json b/docs/search.json index 2255ced..5f22f90 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 (2025). chents: Chemical Entities R Objects. R package version 0.4.0, https://pkgdown.jrwb.de/chents.","code":"@Manual{, title = {chents: Chemical Entities as R Objects}, author = {Johannes Ranke}, year = {2025}, note = {R package version 0.4.0}, 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":"installation","dir":"","previous_headings":"","what":"Installation","title":"Chemical Entities as R Objects","text":"can conveniently install chents repository kindly made available R-Universe project: order profit chemoinformatics, need install RDKit python bindings. Debian type Linux distribution, just use use package Windows MacOS, happy include installation instructions share , e.g. via Pull Request.","code":"install.packages(\"chents\", repos = c(\"https://jranke.r-universe.dev\", \"https://cran.r-project.org\")) sudo apt install python3-rdkit"},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"configuration-of-the-python-version-to-use","dir":"","previous_headings":"","what":"Configuration of the Python version to use","title":"Chemical Entities as R Objects","text":"Debian type Linux distributions, can use following line global project specific .Rprofile file tell reticulate package use system Python version find RDKit installed system location.","code":"Sys.setenv(RETICULATE_PYTHON=\"/usr/bin/python3\")"},{"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. example, example code section chent object docs can see generate R object caffeine, show information retrieved PubChem plot virtue RDKit.","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":"R6::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 grImport::Picture object obtained using grImport package 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 transformations Data frame observed transformations soil_degradation Dataframe modelling DT50 values soil_ff Dataframe formation fractions soil_sorption Dataframe 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 = FALSE )"},{"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?","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-try-pubchem-","dir":"Reference","previous_headings":"","what":"Method try_pubchem()","title":"An R6 class for chemical entities with associated data — chent","text":"Try get chemical information PubChem","code":""},{"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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-get-pubchem-","dir":"Reference","previous_headings":"","what":"Method get_pubchem()","title":"An R6 class for chemical entities with associated data — chent","text":"Get chemical information PubChem known PubChem CID","code":""},{"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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-get-rdkit-","dir":"Reference","previous_headings":"","what":"Method get_rdkit()","title":"An R6 class for chemical entities with associated data — chent","text":"Get chemical information RDKit available","code":""},{"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 SMILES code used template RDKit","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-get-chyaml-","dir":"Reference","previous_headings":"","what":"Method get_chyaml()","title":"An R6 class for chemical entities with associated data — chent","text":"Obtain information YAML file","code":""},{"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 ","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-p-","dir":"Reference","previous_headings":"","what":"Method add_p0()","title":"An R6 class for chemical entities with associated data — chent","text":"Add vapour pressure","code":""},{"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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-cwsat-","dir":"Reference","previous_headings":"","what":"Method add_cwsat()","title":"An R6 class for chemical entities with associated data — chent","text":"Add water solubility","code":""},{"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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-puf-","dir":"Reference","previous_headings":"","what":"Method add_PUF()","title":"An R6 class for chemical entities with associated data — chent","text":"Add plant uptake factor","code":""},{"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":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-tp-","dir":"Reference","previous_headings":"","what":"Method add_TP()","title":"An R6 class for chemical entities with associated data — chent","text":"Add transformation product internal list","code":""},{"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 Optional user provided SMILES code pubchem chemical information obtained PubChem?","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-transformation-","dir":"Reference","previous_headings":"","what":"Method add_transformation()","title":"An R6 class for chemical entities with associated data — chent","text":"Add line internal dataframe holding observed transformations","code":""},{"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 pages information taken","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-soil-degradation-","dir":"Reference","previous_headings":"","what":"Method add_soil_degradation()","title":"An R6 class for chemical entities with associated data — chent","text":"Add line internal dataframe holding modelling DT50 values","code":""},{"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":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-soil-ff-","dir":"Reference","previous_headings":"","what":"Method add_soil_ff()","title":"An R6 class for chemical entities with associated data — chent","text":"Add one formation fractions degradation soil","code":""},{"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) remark remark source acronym specifying source information page page information taken","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-soil-sorption-","dir":"Reference","previous_headings":"","what":"Method add_soil_sorption()","title":"An R6 class for chemical entities with associated data — chent","text":"Add soil sorption data","code":""},{"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":"soils Names soils Kf sorption constant L/kg, either linear (N 1) according Freundlich Kfoc constant , normalised soil organic carbon N Freundlich exponent type soil type pH_orig pH stated study pH_medium medium pH measured pH_H2O pH extrapolated pure water perc_OC percentage organic carbon soil perc_clay percentage clay soil CEC cation exchange capacity remark remark source acronym specifying source information page page information taken","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-pdf-","dir":"Reference","previous_headings":"","what":"Method pdf()","title":"An R6 class for chemical entities with associated data — chent","text":"Write PDF image structure","code":""},{"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 optional SMILES code used template RDKit","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-png-","dir":"Reference","previous_headings":"","what":"Method png()","title":"An R6 class for chemical entities with associated data — chent","text":"Write PNG image structure","code":""},{"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":"file file write dir directory write file antialias Passed png","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-emf-","dir":"Reference","previous_headings":"","what":"Method emf()","title":"An R6 class for chemical entities with associated data — chent","text":"Write EMF image structure using emf","code":""},{"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 dir directory write file ","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":"caffeine <- chent$new(\"caffeine\") #> PubChem: #> Trying to get chemical information from RDKit using PubChem SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C print(caffeine) #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"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) } oct <- chent$new(\"1-octanol\", smiles = \"CCCCCCCCO\", pubchem = FALSE) #> Trying to get chemical information from RDKit using user SMILES #> CCCCCCCCO #> Error in if (!is.na(self$mw)) { if (round(self$rdkit$mw, 1) != round(self$mw, 1)) { message(\"RDKit mw is \", self$rdkit$mw) message(\"mw is \", self$mw) }} else { self$mw <- self$rdkit$mw attr(self$mw, \"source\") <- \"rdkit\"}: argument is of length zero print(oct) #> Error: object 'oct' 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 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":"format","dir":"Reference","previous_headings":"","what":"Format","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"R6::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>","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":"Create new pai object","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 = FALSE )"},{"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 smiles Optional user provided SMILES code inchikey Optional user provided InChI Key bcpc BCPC compendium queried? 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","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 SMILES #> CCNC1=NC(=NC(=N1)Cl)NC(C)C #> <pai> with ISO common name $iso atrazine #> <chent> #> Identifier $identifier atrazine #> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"CCNC1=NC(=NC(=N1)Cl)NC(C)C\" #> Molecular weight $mw: 215.7 #> PubChem synonyms (up to 10): #> [1] \"atrazine\" \"1912-24-9\" \"Gesaprim\" \"Atranex\" \"Oleogesaprim\" #> [6] \"Atazinax\" \"Atrasine\" \"Chromozin\" \"Gesoprim\" \"Hungazin\""},{"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 class '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 grImport::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 SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C print(caffeine) #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"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":"R6::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","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$clone()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"Creates new instance R6 class.","code":""},{"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":"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":"name name product ... Identifiers active ingredients concentrations Concentrations active ingredients concentration_units Defaults g/L density density density_units Defaults g/L","code":""},{"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-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$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"arguments-1","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 class '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 class '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/reference/print.ppp.html","id":null,"dir":"Reference","previous_headings":"","what":"Printing method for ppp objects (plant protection products) — print.ppp","title":"Printing method for ppp objects (plant protection products) — print.ppp","text":"Printing method ppp objects (plant protection products)","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.ppp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Printing method for ppp objects (plant protection products) — print.ppp","text":"","code":"# S3 method for class 'ppp' print(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/print.ppp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Printing method for ppp objects (plant protection products) — print.ppp","text":"x chent object printed ... arguments compatibility S3 method","code":""},{"path":"https://pkgdown.jrwb.de/chents/news/index.html","id":"version-040","dir":"Changelog","previous_headings":"","what":"version 0.4.0","title":"version 0.4.0","text":"R/chent.R: PubChem changed names SMILES codes provide. former isomeric smiles incorporated chent objects “Pubchem_Isomeric” now simply calles SMILES, incorporated objects “PubChem”. SMILES code formerly given “canonical” now termed “connectivity SMILES” contain isotopic stereochemical specifications. chents object, now available name “PubChem_Connectivity”. breaking change, objects generated versions < 0.4.0 may produce errors used current versions.","code":""},{"path":"https://pkgdown.jrwb.de/chents/news/index.html","id":"version-037","dir":"Changelog","previous_headings":"","what":"version 0.3.7","title":"version 0.3.7","text":"R/chent.R: attempt load chyaml file per default, format file resulting chyaml list object documented need inferred use pfm package.","code":""},{"path":"https://pkgdown.jrwb.de/chents/news/index.html","id":"version-036","dir":"Changelog","previous_headings":"","what":"version 0.3.6","title":"version 0.3.6","text":"R/chent.R: Set fields smiles, inchikey mw NA fields still NULL end initialization, source attribute set “user”, assuming initialisation carefully done pubchem rdkit skipped structure well-defined. Please refer ChangeLog commit messages November 2021, changed GNUmakefile include commit messages file .","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 (2026). chents: Chemical Entities R Objects. R package version 0.4.1, https://pkgdown.jrwb.de/chents.","code":"@Manual{, title = {chents: Chemical Entities as R Objects}, author = {Johannes Ranke}, year = {2026}, note = {R package version 0.4.1}, 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. first defining chemical entity, chemical information retrieved PubChem website using webchem package. Python RDKit (> 2015.03) installed configured use reticulate package, additional chemical information including 2D graph computed. print method gives overview information collected. simple plotting method chemical structure. Additional information can (rarely ever) read local .yaml file. information can leveraged e.g. PEC_soil function ‘pfm’ package. -called ISO common name pesticide active ingredient, can use ‘pai’ class derived ‘chent’ class, starts querying BCPC compendium first.","code":"library(chents) caffeine <- chent$new(\"caffeine\") #> Querying PubChem ... #> Trying to get chemical information from RDKit using PubChem SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C print(caffeine) #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"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\" plot(caffeine) lambda <- pai$new(\"lambda-cyhalothrin\") #> Querying BCPC for lambda-cyhalothrin ... #> Querying PubChem ... #> Trying to get chemical information from RDKit using PubChem SMILES #> CC1([C@@H]([C@@H]1C(=O)O[C@@H](C#N)C2=CC(=CC=C2)OC3=CC=CC=C3)/C=C(/C(F)(F)F)\\Cl)C #> RDKit mw is 449.856 #> mw is 449.8 plot(lambda)"},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Chemical Entities as R Objects","text":"can conveniently install chents repository kindly made available R-Universe project: order profit chemoinformatics, need install RDKit python bindings. Debian type Linux distribution, just use use package Windows MacOS, happy include installation instructions share , e.g. via Pull Request.","code":"install.packages(\"chents\", repos = c(\"https://jranke.r-universe.dev\", \"https://cran.r-project.org\")) sudo apt install python3-rdkit"},{"path":"https://pkgdown.jrwb.de/chents/index.html","id":"configuration-of-the-python-version-to-use","dir":"","previous_headings":"","what":"Configuration of the Python version to use","title":"Chemical Entities as R Objects","text":"Debian type Linux distributions, can use following line global project specific .Rprofile file tell reticulate package use system Python version find RDKit installed system location.","code":"Sys.setenv(RETICULATE_PYTHON=\"/usr/bin/python3\")"},{"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":"R6::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 grImport::Picture object obtained using grImport package 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 transformations Data frame observed transformations soil_degradation Dataframe modelling DT50 values soil_ff Dataframe formation fractions soil_sorption Dataframe 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 = FALSE )"},{"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?","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-try-pubchem-","dir":"Reference","previous_headings":"","what":"Method try_pubchem()","title":"An R6 class for chemical entities with associated data — chent","text":"Try get chemical information PubChem","code":""},{"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 = self$identifier, 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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-get-pubchem-","dir":"Reference","previous_headings":"","what":"Method get_pubchem()","title":"An R6 class for chemical entities with associated data — chent","text":"Get chemical information PubChem known PubChem CID","code":""},{"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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-get-rdkit-","dir":"Reference","previous_headings":"","what":"Method get_rdkit()","title":"An R6 class for chemical entities with associated data — chent","text":"Get chemical information RDKit available","code":""},{"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 SMILES code used template RDKit","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-get-chyaml-","dir":"Reference","previous_headings":"","what":"Method get_chyaml()","title":"An R6 class for chemical entities with associated data — chent","text":"Obtain information YAML file","code":""},{"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 ","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-p-","dir":"Reference","previous_headings":"","what":"Method add_p0()","title":"An R6 class for chemical entities with associated data — chent","text":"Add vapour pressure","code":""},{"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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-cwsat-","dir":"Reference","previous_headings":"","what":"Method add_cwsat()","title":"An R6 class for chemical entities with associated data — chent","text":"Add water solubility","code":""},{"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","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-puf-","dir":"Reference","previous_headings":"","what":"Method add_PUF()","title":"An R6 class for chemical entities with associated data — chent","text":"Add plant uptake factor","code":""},{"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":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-tp-","dir":"Reference","previous_headings":"","what":"Method add_TP()","title":"An R6 class for chemical entities with associated data — chent","text":"Add transformation product internal list","code":""},{"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 Optional user provided SMILES code pubchem chemical information obtained PubChem?","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-transformation-","dir":"Reference","previous_headings":"","what":"Method add_transformation()","title":"An R6 class for chemical entities with associated data — chent","text":"Add line internal dataframe holding observed transformations","code":""},{"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 pages information taken","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-soil-degradation-","dir":"Reference","previous_headings":"","what":"Method add_soil_degradation()","title":"An R6 class for chemical entities with associated data — chent","text":"Add line internal dataframe holding modelling DT50 values","code":""},{"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":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-soil-ff-","dir":"Reference","previous_headings":"","what":"Method add_soil_ff()","title":"An R6 class for chemical entities with associated data — chent","text":"Add one formation fractions degradation soil","code":""},{"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) remark remark source acronym specifying source information page page information taken","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-add-soil-sorption-","dir":"Reference","previous_headings":"","what":"Method add_soil_sorption()","title":"An R6 class for chemical entities with associated data — chent","text":"Add soil sorption data","code":""},{"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":"soils Names soils Kf sorption constant L/kg, either linear (N 1) according Freundlich Kfoc constant , normalised soil organic carbon N Freundlich exponent type soil type pH_orig pH stated study pH_medium medium pH measured pH_H2O pH extrapolated pure water perc_OC percentage organic carbon soil perc_clay percentage clay soil CEC cation exchange capacity remark remark source acronym specifying source information page page information taken","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-pdf-","dir":"Reference","previous_headings":"","what":"Method pdf()","title":"An R6 class for chemical entities with associated data — chent","text":"Write PDF image structure","code":""},{"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 optional SMILES code used template RDKit","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-png-","dir":"Reference","previous_headings":"","what":"Method png()","title":"An R6 class for chemical entities with associated data — chent","text":"Write PNG image structure","code":""},{"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":"file file write dir directory write file antialias Passed png","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/chent.html","id":"method-emf-","dir":"Reference","previous_headings":"","what":"Method emf()","title":"An R6 class for chemical entities with associated data — chent","text":"Write EMF image structure using emf","code":""},{"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 dir directory write file ","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":"caffeine <- chent$new(\"caffeine\") #> Querying PubChem for name caffeine ... #> Get chemical information from RDKit using PubChem SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C print(caffeine) #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"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) } oct <- chent$new(\"1-octanol\", smiles = \"CCCCCCCCO\", pubchem = FALSE) #> Get chemical information from RDKit using user SMILES #> CCCCCCCCO print(oct) #> <chent> #> Identifier $identifier 1-octanol #> InChI Key $inchikey NA #> SMILES string $smiles: #> user #> \"CCCCCCCCO\" #> Molecular weight $mw: 130.2"},{"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 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":"format","dir":"Reference","previous_headings":"","what":"Format","title":"An R6 class for pesticidal active ingredients and associated data — pai","text":"R6::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>","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":"Create new pai object","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 = FALSE )"},{"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 smiles Optional user provided SMILES code inchikey Optional user provided InChI Key bcpc BCPC compendium queried? 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","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":"atr <- pai$new(\"atrazine\") #> Querying BCPC for atrazine ... #> Querying PubChem for inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N ... #> Get chemical information from RDKit using PubChem SMILES #> CCNC1=NC(=NC(=N1)Cl)NC(C)C print(atr) #> <pai> with ISO common name $iso atrazine #> <chent> #> Identifier $identifier atrazine #> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"CCNC1=NC(=NC(=N1)Cl)NC(C)C\" #> Molecular weight $mw: 215.7 #> PubChem synonyms (up to 10): #> [1] \"atrazine\" \"1912-24-9\" \"Gesaprim\" \"Aatrex\" \"Atranex\" #> [6] \"Atrazin\" \"Oleogesaprim\" \"Atazinax\" \"Atrasine\" \"Chromozin\" if (!is.null(atr$Picture)) { plot(atr) } # We can also define pais that are not found on the BCPC site decanol <- pai$new(\"1-Decanol\") #> Querying BCPC for 1-Decanol ... #> Common name 1-Decanol is not known at the BCPC compendium, trying PubChem #> Querying PubChem for name 1-Decanol ... #> Get chemical information from RDKit using PubChem SMILES #> CCCCCCCCCCO print(decanol) #> <pai> without ISO common name #> <chent> #> Identifier $identifier 1-Decanol #> InChI Key $inchikey MWKFXSUHUHTGQN-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"CCCCCCCCCCO\" #> Molecular weight $mw: 158.3 #> PubChem synonyms (up to 10): #> [1] \"1-DECANOL\" \"Decan-1-ol\" \"Decyl alcohol\" \"112-30-1\" #> [5] \"n-Decyl alcohol\" \"n-Decanol\" \"Capric alcohol\" \"Nonylcarbinol\" #> [9] \"Antak\" \"Royaltac\""},{"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 class '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 grImport::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 SMILES #> CN1C=NC2=C1C(=O)N(C(=O)N2C)C print(caffeine) #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: #> PubChem #> \"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":"R6::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","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$clone()","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"R6 class for a plant protection product with at least one active ingredient — ppp","text":"Creates new instance R6 class.","code":""},{"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":"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":"name name product ... Identifiers active ingredients concentrations Concentrations active ingredients concentration_units Defaults g/L density density density_units Defaults g/L","code":""},{"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-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$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/chents/reference/ppp.html","id":"arguments-1","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 class '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 class '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/reference/print.ppp.html","id":null,"dir":"Reference","previous_headings":"","what":"Printing method for ppp objects (plant protection products) — print.ppp","title":"Printing method for ppp objects (plant protection products) — print.ppp","text":"Printing method ppp objects (plant protection products)","code":""},{"path":"https://pkgdown.jrwb.de/chents/reference/print.ppp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Printing method for ppp objects (plant protection products) — print.ppp","text":"","code":"# S3 method for class 'ppp' print(x, ...)"},{"path":"https://pkgdown.jrwb.de/chents/reference/print.ppp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Printing method for ppp objects (plant protection products) — print.ppp","text":"x chent object printed ... arguments compatibility S3 method","code":""},{"path":"https://pkgdown.jrwb.de/chents/news/index.html","id":"version-041","dir":"Changelog","previous_headings":"","what":"version 0.4.1","title":"version 0.4.1","text":"R/chent.R: Improve print method pai objects.","code":""},{"path":"https://pkgdown.jrwb.de/chents/news/index.html","id":"version-040","dir":"Changelog","previous_headings":"","what":"version 0.4.0","title":"version 0.4.0","text":"R/chent.R: PubChem changed names SMILES codes provide. former isomeric smiles incorporated chent objects “Pubchem_Isomeric” now simply calles SMILES, incorporated objects “PubChem”. SMILES code formerly given “canonical” now termed “connectivity SMILES” contain isotopic stereochemical specifications. chents object, now available name “PubChem_Connectivity”. breaking change, objects generated versions < 0.4.0 may produce errors used current versions.","code":""},{"path":"https://pkgdown.jrwb.de/chents/news/index.html","id":"version-037","dir":"Changelog","previous_headings":"","what":"version 0.3.7","title":"version 0.3.7","text":"R/chent.R: attempt load chyaml file per default, format file resulting chyaml list object documented need inferred use pfm package.","code":""},{"path":"https://pkgdown.jrwb.de/chents/news/index.html","id":"version-036","dir":"Changelog","previous_headings":"","what":"version 0.3.6","title":"version 0.3.6","text":"R/chent.R: Set fields smiles, inchikey mw NA fields still NULL end initialization, source attribute set “user”, assuming initialisation carefully done pubchem rdkit skipped structure well-defined. Please refer ChangeLog commit messages November 2021, changed GNUmakefile include commit messages file .","code":""}] diff --git a/log/build.log b/log/build.log index 8da2288..dd2106c 100644 --- a/log/build.log +++ b/log/build.log @@ -4,5 +4,5 @@ * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories Omitted ‘LazyData’ from DESCRIPTION -* building ‘chents_0.4.0.tar.gz’ +* building ‘chents_0.4.1.tar.gz’ @@ -19,6 +19,9 @@ print(atr) if (!is.null(atr$Picture)) { plot(atr) } +# We can also define pais that are not found on the BCPC site +decanol <- pai$new("1-Decanol") +print(decanol) } \section{Super class}{ \code{\link[chents:chent]{chents::chent}} -> \code{pai} |
