From 79123acfdd9a9b905a5b177e2b7aa0d604e52267 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 19 Nov 2021 00:22:03 +0100 Subject: Add plot example, update static docs --- docs/reference/chent.html | 368 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 296 insertions(+), 72 deletions(-) (limited to 'docs/reference/chent.html') diff --git a/docs/reference/chent.html b/docs/reference/chent.html index 3d0928c..941eabb 100644 --- a/docs/reference/chent.html +++ b/docs/reference/chent.html @@ -8,21 +8,29 @@ An R6 class for chemical entities with associated data — chent • chents + - + - - + + + + + + + - + + - + - - + + + @@ -30,12 +38,12 @@ - + - +python bindings are installed." /> + @@ -49,9 +57,10 @@ python bindings are installed and configured for use with PythonInR." /> + - +
@@ -73,7 +82,7 @@ python bindings are installed and configured for use with PythonInR." /> -
+
@@ -107,49 +116,262 @@ python bindings are installed and configured for use with PythonInR." />
-

The class is initialised with an identifier. Chemical information is retrieved from the internet. Additionally, it can be generated using RDKit if RDKit and its -python bindings are installed and configured for use with PythonInR.

- +python bindings are installed.

-
chent
- + +

Format

An R6Class generator object

- -

Fields

+

Public fields

- -
+

identifier

The identifier that was used to initiate the object, with attribute 'source'

-
inchikey

InChI Key, with attribute 'source'

-
smiles

SMILES code, with attribute 'source'

-
mw

Molecular weight, with attribute 'source'

-
pubchem

List of information retreived from PubChem

-
rdkit

List of information obtained with RDKit, if installed and -configured for use with PythonInR

-
svg

SVG code

-
Picture

Graph as a picture object obtained using grImport

-
Pict_font_size

Font size as extracted from the intermediate PostScript file

-
pdf_height

Height of the MediaBox in the pdf after cropping

-
p0

Vapour pressure in Pa

-
cwsat

Water solubility in mg/L

-
chyaml

List of information obtained from a YAML file

-
soil_degradation

Dataframe of modelling DT50 values

-
soil_ff

Dataframe of formation fractions

-
soil_sorption

Dataframe of soil sorption data

-
PUF

Plant uptake factor

-
+ +
inchikey

InChI Key, with attribute 'source'

+ +
smiles

SMILES code, with attribute 'source'

+ +
mw

Molecular weight, with attribute 'source'

+ +
pubchem

List of information retreived from PubChem

+ +
rdkit

List of information obtained with RDKit

+ +
mol

<rdkit.Chem.rdchem.Mol> object

+ +
svg

SVG code

+ +
Picture

Graph as a picture object obtained using grImport

+ +
Pict_font_size

Font size as extracted from the intermediate PostScript file

+ +
pdf_height

Height of the MediaBox in the pdf after cropping

+ +
p0

Vapour pressure in Pa

+ +
cwsat

Water solubility in mg/L

+ +
chyaml

List of information obtained from a YAML file

+ +
soil_degradation

Dataframe of modelling DT50 values

+ +
soil_ff

Dataframe of formation fractions

+ +
soil_sorption

Dataframe of soil sorption data

+ +
PUF

Plant uptake factor

+ +

+

Methods

+ +

Public methods

+ + +


+

Method new()

+ +

Usage

+

chent$new(
+  identifier,
+  smiles = NULL,
+  smiles_source = "user",
+  inchikey = NULL,
+  inchikey_source = "user",
+  pubchem = TRUE,
+  pubchem_from = c("name", "smiles", "inchikey"),
+  rdkit = TRUE,
+  template = NULL,
+  chyaml = TRUE
+)

+ +


+

Method try_pubchem()

+ +

Usage

+

chent$try_pubchem(query, from = "name")

+ +


+

Method get_pubchem()

+ +

Usage

+

chent$get_pubchem(pubchem_cid)

+ +


+

Method get_rdkit()

+ +

Usage

+

chent$get_rdkit(template = NULL)

+ +


+

Method get_chyaml()

+ +

Usage

+

chent$get_chyaml(
+  repo = c("wd", "local", "web"),
+  chyaml = paste0(URLencode(self$identifier), ".yaml")
+)

+ +


+

Method add_p0()

+ +

Usage

+

chent$add_p0(p0, T = NA, source = NA, page = NA, remark = "")

+ +


+

Method add_cwsat()

+ +

Usage

+

chent$add_cwsat(cwsat, T = NA, pH = NA, source = NA, page = NA, remark = "")

+ +


+

Method add_PUF()

+ +

Usage

+

chent$add_PUF(
+  PUF = 0,
+  source = "focus_generic_gw_2014",
+  page = 41,
+  remark = "Conservative default value"
+)

+ +


+

Method add_TP()

+ +

Usage

+

chent$add_TP(x, smiles = NULL, pubchem = FALSE)

+ +


+

Method add_transformation()

+ +

Usage

+

chent$add_transformation(
+  study_type,
+  TP_identifier,
+  max_occurrence,
+  remark = "",
+  source = NA,
+  pages = NA
+)

+ +


+

Method add_soil_degradation()

+ +

Usage

+

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
+)

+ +


+

Method add_soil_ff()

+ +

Usage

+

chent$add_soil_ff(target, soils, ff = 1, remark = "", source, page = NA)

+ +


+

Method add_soil_sorption()

+ +

Usage

+

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
+)

+ +


+

Method pdf()

+ +

Usage

+

chent$pdf(
+  file = paste0(self$identifier, ".pdf"),
+  dir = "structures/pdf",
+  template = NULL
+)

+ +


+

Method png()

+ +

Usage

+

chent$png(
+  file = paste0(self$identifier, ".png"),
+  dir = "structures/png",
+  antialias = "gray"
+)

+ +


+

Method emf()

+ +

Usage

+

chent$emf(file = paste0(self$identifier, ".emf"), dir = "structures/emf")

+ +


+

Method clone()

+

The objects of this class are cloneable with this method.

Usage

+

chent$clone(deep = FALSE)

+ +

Arguments

+

+
deep

Whether to make a deep clone.

+ +

+ +

Examples

-
oct <- chent$new("1-octanol", smiles = "CCCCCCCCO")
#> PubChem:
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
#> -#> Initialize Python Version 2.7.13 (default, Sep 26 2018, 18:42:22) -#> [GCC 6.3.0 20170516]
#> Trying to get chemical information from RDKit using User SMILES -#> CCCCCCCCO
#> Did not find chyaml file ./1-octanol.yaml
print(oct)
#> <chent> +
oct <- chent$new("1-octanol", smiles = "CCCCCCCCO") +
#> PubChem:
#> Trying to get chemical information from RDKit using user SMILES +#> CCCCCCCCO
#> Did not find chyaml file ./1-octanol.yaml
print(oct) +
#> <chent> #> Identifier $identifier 1-octanol #> InChI Key $inchikey KBPLFHHGFOOTCA-UHFFFAOYSA-N #> SMILES string $smiles: @@ -157,12 +379,16 @@ configured for use with PythonInR

#> "CCCCCCCCO" "CCCCCCCCO" #> Molecular weight $mw: 130.2 #> PubChem synonyms (up to 10): -#> [1] "957" "1-octanol" "Octan-1-ol" "octanol" -#> [5] "111-87-5" "N-octanol" "Capryl alcohol" "Octyl alcohol" -#> [9] "caprylic alcohol" "n-Octyl alcohol"
if (!is.null(oct$Picture)) { - plot(oct) -}
caffeine <- chent$new("caffeine")
#> PubChem:
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
#> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
#> Trying to get chemical information from RDKit using PubChem_Canonical SMILES -#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
#> Did not find chyaml file ./caffeine.yaml
print(caffeine)
#> <chent> +#> [1] "1-octanol" "Octan-1-ol" "octanol" "111-87-5" +#> [5] "N-octanol" "Octyl alcohol" "Capryl alcohol" "caprylic alcohol" +#> [9] "n-Octyl alcohol" "Heptyl carbinol"
if (!is.null(oct$Picture)) { + plot(oct) +} +
+caffeine <- chent$new("caffeine") +
#> PubChem:
#> Trying to get chemical information from RDKit using PubChem_Canonical SMILES +#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
#> Did not find chyaml file ./caffeine.yaml
print(caffeine) +
#> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: @@ -170,41 +396,39 @@ configured for use with PythonInR

#> "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" #> Molecular weight $mw: 194.2 #> PubChem synonyms (up to 10): -#> [1] "2519" "caffeine" -#> [3] "58-08-2" "Guaranine" -#> [5] "1,3,7-Trimethylxanthine" "Thein" -#> [7] "Cafeina" "Methyltheobromine" -#> [9] "Koffein" "Mateina"
if (!is.null(caffeine$Picture)) { - plot(caffeine) -}
+#> [1] "caffeine" "58-08-2" +#> [3] "1,3,7-Trimethylxanthine" "Guaranine" +#> [5] "Thein" "Methyltheobromine" +#> [7] "Cafeina" "Theine" +#> [9] "Koffein" "Mateina"
if (!is.null(caffeine$Picture)) { + plot(caffeine) +} +
- + + + -- cgit v1.2.1