aboutsummaryrefslogblamecommitdiff
path: root/man/chent.Rd
blob: d94452ecbf81189a802e74da91962fb1a53b543c (plain) (tree)
1
2
3
4
5
6
7
8
9
                                            
                                        


                                                              

                                         

             

                                                                                   













                                                   
 


                                        









                                                                                                      
 


                                                            
 

                           
                                                                                      
 



                                                                                          



                                             

                                                                   






                                                                  










































                                                                              
 
 















































































































































































































                                                                                                                                                  
 
 
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chent.R
\name{chent}
\alias{chent}
\title{An R6 class for chemical entities with associated data}
\format{
An \code{\link{R6Class}} generator object
}
\description{
The class is initialised with an identifier. Chemical information is retrieved from
the internet. Additionally, it can be generated using RDKit if RDKit and its
python bindings are installed.
}
\examples{
oct <- chent$new("1-octanol", smiles = "CCCCCCCCO")
print(oct)
if (!is.null(oct$Picture)) {
  plot(oct)
}

caffeine <- chent$new("caffeine")
print(caffeine)
if (!is.null(caffeine$Picture)) {
  plot(caffeine)
}
}
\keyword{data}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{identifier}}{The identifier that was used to initiate the object, with attribute 'source'}

\item{\code{inchikey}}{InChI Key, with attribute 'source'}

\item{\code{smiles}}{SMILES code, with attribute 'source'}

\item{\code{mw}}{Molecular weight, with attribute 'source'}

\item{\code{pubchem}}{List of information retreived from PubChem}

\item{\code{rdkit}}{List of information obtained with RDKit}

\item{\code{mol}}{<rdkit.Chem.rdchem.Mol> object}

\item{\code{svg}}{SVG code}

\item{\code{Picture}}{Graph as a \code{\link{picture}} object obtained using grImport}

\item{\code{Pict_font_size}}{Font size as extracted from the intermediate PostScript file}

\item{\code{pdf_height}}{Height of the MediaBox in the pdf after cropping}

\item{\code{p0}}{Vapour pressure in Pa}

\item{\code{cwsat}}{Water solubility in mg/L}

\item{\code{chyaml}}{List of information obtained from a YAML file}

\item{\code{soil_degradation}}{Dataframe of modelling DT50 values}

\item{\code{soil_ff}}{Dataframe of formation fractions}

\item{\code{soil_sorption}}{Dataframe of soil sorption data}

\item{\code{PUF}}{Plant uptake factor}
}
\if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-new}{\code{chent$new()}}
\item \href{#method-try_pubchem}{\code{chent$try_pubchem()}}
\item \href{#method-get_pubchem}{\code{chent$get_pubchem()}}
\item \href{#method-get_rdkit}{\code{chent$get_rdkit()}}
\item \href{#method-get_chyaml}{\code{chent$get_chyaml()}}
\item \href{#method-add_p0}{\code{chent$add_p0()}}
\item \href{#method-add_cwsat}{\code{chent$add_cwsat()}}
\item \href{#method-add_PUF}{\code{chent$add_PUF()}}
\item \href{#method-add_TP}{\code{chent$add_TP()}}
\item \href{#method-add_transformation}{\code{chent$add_transformation()}}
\item \href{#method-add_soil_degradation}{\code{chent$add_soil_degradation()}}
\item \href{#method-add_soil_ff}{\code{chent$add_soil_ff()}}
\item \href{#method-add_soil_sorption}{\code{chent$add_soil_sorption()}}
\item \href{#method-pdf}{\code{chent$pdf()}}
\item \href{#method-png}{\code{chent$png()}}
\item \href{#method-emf}{\code{chent$emf()}}
\item \href{#method-clone}{\code{chent$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-new"></a>}}
\if{latex}{\out{\hypertarget{method-new}{}}}
\subsection{Method \code{new()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{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
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-try_pubchem"></a>}}
\if{latex}{\out{\hypertarget{method-try_pubchem}{}}}
\subsection{Method \code{try_pubchem()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$try_pubchem(query, from = "name")}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-get_pubchem"></a>}}
\if{latex}{\out{\hypertarget{method-get_pubchem}{}}}
\subsection{Method \code{get_pubchem()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$get_pubchem(pubchem_cid)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-get_rdkit"></a>}}
\if{latex}{\out{\hypertarget{method-get_rdkit}{}}}
\subsection{Method \code{get_rdkit()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$get_rdkit(template = NULL)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-get_chyaml"></a>}}
\if{latex}{\out{\hypertarget{method-get_chyaml}{}}}
\subsection{Method \code{get_chyaml()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$get_chyaml(
  repo = c("wd", "local", "web"),
  chyaml = paste0(URLencode(self$identifier), ".yaml")
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_p0"></a>}}
\if{latex}{\out{\hypertarget{method-add_p0}{}}}
\subsection{Method \code{add_p0()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$add_p0(p0, T = NA, source = NA, page = NA, remark = "")}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_cwsat"></a>}}
\if{latex}{\out{\hypertarget{method-add_cwsat}{}}}
\subsection{Method \code{add_cwsat()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$add_cwsat(cwsat, T = NA, pH = NA, source = NA, page = NA, remark = "")}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_PUF"></a>}}
\if{latex}{\out{\hypertarget{method-add_PUF}{}}}
\subsection{Method \code{add_PUF()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$add_PUF(
  PUF = 0,
  source = "focus_generic_gw_2014",
  page = 41,
  remark = "Conservative default value"
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_TP"></a>}}
\if{latex}{\out{\hypertarget{method-add_TP}{}}}
\subsection{Method \code{add_TP()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$add_TP(x, smiles = NULL, pubchem = FALSE)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_transformation"></a>}}
\if{latex}{\out{\hypertarget{method-add_transformation}{}}}
\subsection{Method \code{add_transformation()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$add_transformation(
  study_type,
  TP_identifier,
  max_occurrence,
  remark = "",
  source = NA,
  pages = NA
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_soil_degradation"></a>}}
\if{latex}{\out{\hypertarget{method-add_soil_degradation}{}}}
\subsection{Method \code{add_soil_degradation()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{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
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_soil_ff"></a>}}
\if{latex}{\out{\hypertarget{method-add_soil_ff}{}}}
\subsection{Method \code{add_soil_ff()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$add_soil_ff(target, soils, ff = 1, remark = "", source, page = NA)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-add_soil_sorption"></a>}}
\if{latex}{\out{\hypertarget{method-add_soil_sorption}{}}}
\subsection{Method \code{add_soil_sorption()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{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
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-pdf"></a>}}
\if{latex}{\out{\hypertarget{method-pdf}{}}}
\subsection{Method \code{pdf()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$pdf(
  file = paste0(self$identifier, ".pdf"),
  dir = "structures/pdf",
  template = NULL
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-png"></a>}}
\if{latex}{\out{\hypertarget{method-png}{}}}
\subsection{Method \code{png()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$png(
  file = paste0(self$identifier, ".png"),
  dir = "structures/png",
  antialias = "gray"
)}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-emf"></a>}}
\if{latex}{\out{\hypertarget{method-emf}{}}}
\subsection{Method \code{emf()}}{
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$emf(file = paste0(self$identifier, ".emf"), dir = "structures/emf")}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{chent$clone(deep = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}

Contact - Imprint