--- title: "Package Datasets" output: rmarkdown::html_vignette: mathjax: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" self_contained: TRUE toc: FALSE number_sections: FALSE link-citations: TRUE csl: iso690-numeric-en.csl vignette: > %\VignetteIndexEntry{Package Datasets} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} pkgdown: as_is: FALSE --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", webshot = "webshot", fig.width = 7.2, fig.height = 4.8 ) options( rmarkdown.html_vignette.check_title = FALSE ) ``` ```{r setup, include=FALSE} library(eprscope) library(icons) library(knitr) library(htmlwidgets) library(DT) ``` # Built-In Datasets There are two important datasets built into the `{eprscope}` 📦. The first one is the nuclear isotope table summarizing the essential properties of the nuclei in order to analyze the EPR spectra with HF (hyperfine) structure. While, the second one shows the solvent properties important for variable temperature (VT), double-resonance (ENDOR) and EPR spectroelectrochemical experiments. ## Nuclear Isotope Data Frame This dataset was taken from the open source [EasySpin](https://easyspin.org/easyspin/documentation/isotopetable.html) package, reformatted and column of Larmor-frequencies in $\mathrm{MHz}$ at $0.35\,\mathrm{mT}$ were added for better orientation in double-resonance ENDOR spectra, see the details in `?isotopes_ds` documentation as well as [R file in \`data-raw\` folder](https://github.com/jatanRT/eprscope/blob/master/data-raw/isotopes_ds.R). The data frame is not only used to analyze the ENDOR spectra however, it is also essential for the simulations of EPR spectra and their fitting onto the experimental ones. See the documentation of the `eval_sim_EPR_iso()`, `eval_sim_EPR_isoFit()` as well as `eval_nu_ENDOR()`. ```{r nuclear-dataset} # interactive data frame by `{DT}` package with option to select columns # and to save table as `.csv`, `.pdf` or `.xlsx` format DT::datatable(isotopes_ds, extensions = "Buttons", options = list( dom = "Bfrtip", buttons = c("colvis","csv","pdf","excel") ), caption = "Dataset with the following variables/columns: Proton number, isotope, stability (either stable, STB or radio-active, RA), isotope name, nuclear spin quantum number, nuclear g-value, natural abundance in %, nuclear quadrupolar moment in Barns and the ENDOR/Larmor frequency in MHz at 0.35 T. The negative sign of Larmor frequency values points to clockwise precession direction according to convention." ) %>% DT::formatRound("nu_ENDOR_MHz_035T",digits = 3) # rounding must be also performed by the `DT` pkg. ``` ## Solvent Properties When performing the EPR experiments, especially **X-band continuous wave (CW) spectroscopy in solution**, solvent plays an important role. Namely, prior to measurement one has to decide which type of cell will be applied depending on solvent polarity. For polar solvents, such as acetonitrile or dimethyl sulfoxide, either capillary (with $i.d. \leq 1\,\mathrm{mm}$ ) or special [quartz flat cell](https://sp-wilmadlabglass.com/product/standard-te102-aqueous-cells/) ( with a flat-part thickness $\approx (0.3-0.6)\,\mathrm{mm}$) must be used. While for non-polar or solvents with lower polarity, e.g. toluene, chloroform or tetrahydrofuran, a sample can be analyzed within any kind of cell including [common EPR quartz-tubes](https://sp-wilmadlabglass.com/product/4-mm-thin-wall-quartz-epr-sample-tube-250-mm-l/) with $i.d. \approx (2-4)\,\mathrm{mm}$. Additionally, the solvent properties like melting/boiling point as well as viscosity are essential for the variable temperature (VT) experiments and particularly for the CW ENDOR as well as for spectroelectrochemical ones. Table details can be found in `?solvents_ds` documentation and in [R file in \`data-raw\` folder](https://github.com/jatanRT/eprscope/blob/master/data-raw/solvents_ds.R). Solvent properties can be also obtained by the specialized `readEPR_solvent_props()` function. ```{r solvent-properties} # similar interactive table like before DT::datatable(solvents_ds, extensions = "Buttons", options = list( dom = "Bfrtip", buttons = c("colvis","csv","pdf","excel"), columnDefs = list(list(visible=FALSE, targets=c(7))) # hide solubility/miscibility column ), caption = "Dataset with the following variables/columns: solvent name, molecular formula, relative molecular weight, boiling point in °C, melting point in °C, density in g/mL, solubility in g/(100 g of water)-not shown, visibility can be switched by the 'column visibility', relative electric permittivity, flash point in °C and dynamic viscosity in cp." ) ``` # Datasets for Examples and Tests These involve the [ASCII text](https://www.computerhope.com/jargon/a/ascii.htm) data (with the extensions like `.txt` , `.asc` , `.csv` ), coming from the EPR spectrometer and correspond either to an EPR spectrum data frame[^1] or the accompanying ASCII text files with the (instrumental) parameters (with `.par` or `.DSC` / `.dsc` extensions) used to record the corresponding spectra. While the files containing parameters are generated automatically during the spectral data saving, the tabular ones, related to an EPR spectrum, must be generated by the instrument operator (usually by `File` ➝ `Export ASCII` workflow). Some of these files are compressed (as `.zip`) in order to save storage space within the package. Additionally, the `{eprscope}` 📦 contains `.mat` (*Matlab*) file from the *EasySpin* simulation as well as output from DFT quantum chemical computation or related structural data either with `.inp.log.zip` or `.sdf` extensions, respectively. All these file types are summarized within the following table. [^1]: Usually the following variables/columns are included in the ASCII tables of the corresponding EPR spectra: "**index**", "**Field [G]**"/"**X [G]**"/"**RF [MHz]**" and "**Intensity []**"/"**Intensity**" +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | File and Short Description | Examples in Functions/Tests | +============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+===============================+ | `Aminoxyl_radical_a.txt` | `eval_DeltaXpp_Spec()` | | | | | ASCII **text table file** corresponding to EPR spectrum of an aminoxyl/nitroxyl radical derivative measured in deionized H~2~O and recorded by the *Xenon* acquisition software. | `eval_sim_EPR_isoFit()` | | | | | | `plot_EPR_Specs()` | | | | | | `plot_theme_In_ticks()` | | | | | | `plot_theme_NoY_ticks()` | | | | | | `readEPR_Exp_Specs()` | | | | | | `test-eval_sim_EPR_iso` | | | | | | `test-eval_sim_EPR_isoFit` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `Aminoxyl_radical_a.DSC` | `readEPR_params_slct_quant()` | | | | | ASCII **text file including parameters** to record the EPR spectrum of an aminoxyl/nitroxyl radical derivative corresponding to the above-listed `Aminoxyl_radical_a.txt` The file was automatically generated by the *Xenon* acquisition software upon measurement data saving. | `test-eval_sim_EPR_iso` | | | | | | `test-eval_sim_EPR_isoFit` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `Aminoxyl_radical_a.mat` | `readMAT_params_file()` | | | | | **Matlab/EasySpin output file** containing all experimental parameters, EPR spectrum table form (*B* vs *Intensity*) as well as simulation and fitting parameters to reproduce the experimental spectrum saved in the above-listed `Aminoxyl_radical_a.txt` | | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `TMPD.sdf` | `draw_molecule_by_rcdk()` | | | | | **Structured data file** (based MOL-file format) containing structure of the N,N,N',N'-Tetramethyl-p-phenylenediamine (TMPD) radical cation. Structure (optimized geometry) was calculated by Density Functional Theory (DFT). | | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `TMPDAradCatEPRa.inp.log.zip` | `eval_gFactor_QCHcomp()` | | | | | **Compressed output file from *Gaussian* quantum chemical package** software. Standard *Gaussian* output from DFT calculations of EPR parameters (*g* and *a/A*) corresponding to TMPD^.+^ . See also `vignette("functionality")` . | `rearrange_aAiso_QCHorgau()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `TMPDA_specelchem_accu_b.asc` | `eval_extremeX_Spec()` | | | | | ASCII **text table file** corresponding to EPR spectrum of electrochemically generated TMPD^.+^ by the potentiostatic electrolysis of $1\,\mathrm{mM}$ TMPD solution in $0.3\,\mathrm{M}$ TBAPF~6~/DMSO at $0.308\,\mathrm{V}$ *vs* Ag-quasiref. electrode. Spectral data were recorded by the *WinEpr* acquisition software. | `eval_gFactor_Spec()` | | | | | | `plot_EPR_Specs2D_interact()` | | | | | | `plot_theme_Out_ticks()` | | | | | | `plot_EPR_Specs_integ()` | | | | | | `readEPR_Exp_Specs()` | | | | | | `present_EPR_Sim_Spec()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `TMPDA_specelchem_accu_b.par` | `readEPR_param_slct()` | | | | | ASCII **text file including parameters** to record the EPR spectrum of electrochemically generated TMPD^.+^ corresponding to the above-listed `TMPD_specelchem_accu_b.asc` . The file was automatically created by the *WinEpr* acquisition software upon data saving. | `readEPR_params_slct_sim()` | | | | | | `readEPR_params_tabs()` | | | | | | `present_EPR_Sim_Spec()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | | | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `PNT_ENDOR_a.txt` | `eval_DeltaXpp_Spec()` | | | | | ASCII **text table file** corresponding to CW EPR ENDOR spectrum of phenalenyl (**p**eri**n**aph**t**henyl) radical, commonly used as a standard for the CW ENDOR experiments. Spectrum recorded by the *Xenon* acquisition software. | `plot_EPR_Specs()` | | | | | | `plot_EPR_Specs2D_interact()` | | | | | | `plot_layout2D_interact()` | | | | | | `readEPR_Exp_Specs()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `PNT_ENDOR_a.DSC` | `readEPR_param_slct()` | | | | | ASCII **text file including parameters** to record the CW ENDOR spectrum of phenalenyl radical corresponding to the above-listed `PNT_ENDOR_a.txt` . This file was automatically generated by the *Xenon* acquisition software upon data saving. | | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `Triarylamine_radCat_decay_a.txt` | `eval_kinR_EPR_modelFit()` | | | | | ASCII **text table file including double integrals (Area) vs. time** and additional parameters like g-value, linewidth, lineshape of each CW EPR spectrum of a triarylamine radical cation, recorded right after its electrochemical oxidative generation and disconnecting the potentiostat. File was created by the *Xenon* acquisition software, where the integration of the simulated and fitted EPR spectra, of the experimental ones, was performed. Potentiostatic electrolysis (at 0.49 V vs Fc/Fc^+^) and EPR measurements were carried out in 0.2 M TBAPF~6~/CH~3~CN triarylamine solution. The individual spectral data are stored in `Triarylamine_radCat_decay_series.zip` . | `eval_kinR_EPR_ODE_model()` | | | | | | `plot_labels_xyz()` | | | | | | `plot_theme_NoY_ticks()` | | | | | | `readEPR_Exp_Specs()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `Triarylamine_radCat_decay_a.DSC` | `eval_kinR_EPR_modelFit()` | | | | | This file is identical with `Triarylamine_radCat_decay_series.DSC` . | `readEPR_param_slct()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `Triarylamine_radCat_decay_series.zip` | `plot_EPR_Specs()` | | | | | **Compressed ASCII text table file containing 100 EPR CW spectral data** recorded as time series upon checking the stability of a triarylamine radical cation. Details of the EPR spectroelectrochemical experiment are listed in description of the `Triarylamine_radCat_decay_a.txt` file. | `plot_EPR_Specs3D_interact()` | | | | | | `eval_integ_EPR_Spec()` | | | | | | `readEPR_Exp_Specs_kin()` | | | | | | `smooth_EPR_Spec_by_npreg()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `Triarylamine_radCat_decay_series.DSC` | `plot_EPR_Specs()` | | | | | **ASCII text file including parameters to record the EPR spectral time series described in details of** `Triarylamine_radCat_decay_a.txt` as well as `Triarylamine_radCat_decay_series.zip` . The file was automatically generated by the *Xenon* acquisition software upon data saving. | `plot_EPR_Specs3D_interact()` | | | | | | `eval_integ_EPR_Spec()` | | | | | | `smooth_EPR_Spec_by_npreg()` | | | | | | `readEPR_Exp_Specs_kin()` | | | | | | `readEPR_params_slct_kin()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `AcridineDeriv_Irrad_365nm.csv.zip` | `readEPR_Exp_Specs()` | | | | | **Compressed ASCII text table file (in `.csv` format)** corresponding to CW EPR spectrum of an acridine derivative radical irradiated by 365 nm LED to form the corresponding acridinium (+) redox state. Spectrum recorded on *Magnettech* ESR5000 [11-0422]. | | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `AcridineDeriv_Irrad_365nm.dsc` | `readEPR_params_slct_sim()` | | | | | **ASCII text file including parameters to record the CW EPR spectrum of an acridine derivative radical** described in `AcridineDeriv_Irrad_365nm.csv.zip` . The file was automatically generated by the *Magnettech/Bruker* acquisition software upon data saving. | `readEPR_params_tabs()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | `Triarylamine_ECh_CV_ivium.txt` | `plot_ECh_VoC_amperogram()` | | | | | **ASCII text file table consisting of potential, time, current columns/variables** which was generated by the *Ivium* potentiostat electrochemical acquisition software after recording the cyclic voltammetry (in anodic direction) of a triarylamine derivative in 0.2 M TBAPF~6~/CH~3~CN. | `eval_ECh_QNe_chronoamp()` | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+