Changelog
Source:NEWS.md
eprscope 0.1.15
2025-08-11
Bug Fixes/Critical Updates
reading of spectrometer binary files (
.DTAand.spc) is currently under development (follow the commits at feat/read_binar_spectrs)functions to read instrumental spectrometer parameters:
readEPR_params_slct_...,readEPR_param_slctandreadEPR_params_tabswere completely updated in order to be ready for reading of binary spectrometer filesseveral fixes and/or updates in documentation (functions, including
Examples+ vignettes)magnetic flux density B-unit conversion (G ↔︎ mT) + B-range of the interactive/exported data frame of simulated and experimental EPR spectrum in the
shinyApp01/plot_eval_ExpSim_appare working properly right nowfixed bug in simultaneous reading of multiple files (see the
readEPR_Exp_Specs_multif) where due to missing Q values (sensitivity factors) the EPR intensity was not correctly normalized and thereforeNAvalues appearedif user wants to fix the value of a simulation parameter (see the
optim.params.initargument), during the optimization/fitting procedure by theeval_sim_EPR_isoFitfunction (i.e. the value will be not optimized by the least-squares method), one can easily point to index of theoptim.params.initvector by theoptim.params.fix.idargument to keep the corresponding simulation parameter constant during the fitting/optimization + this was additionally implemented in theeval_sim_EPR_isoFit_spacefunction (please, refer to the function documentation)
Updates
an option to export parameters of the interactively simulated EPR spectrum as an initial
.Rscript/code snippet was added toshinyApp01/plot_eval_ExpSim_appin order to be ready for theeval_sim_EPR_isoFitfunction, therefore user does not have to write the code → this may speed up the analysis of an EPR spectrumright now the covariance/correlation matrices can be returned as list components/values by several fitting/optimization functions like
eval_sim_EPR_isoFit,eval_kinR_EPR_modelFitandeval_kinR_Eyring_GHS+ these matrices can be very nicely visualized by the corrplot package and the correspondingcorrplotfunction (see examples in documentation of the above-mentioned functions)eval_integ_EPR_Specandquantify_EPR_Sim_seriescode cleaning → simplified EPR spectrum integration code based on B-unit
eprscope 0.1.14
2025-05-11
Bug Fixes/Critical Updates
the entire data frame/table of interactively simulated EPR spectrum within the
shinyApp01(see also theplot_eval_ExpSim_app) can be seamlessly exported either to.csvor to.xlsxformats, where in the previous version only several observations/rows (not the entire data frame) were exportedfixed bug in the
plot_EPR_Specswhere the plot title was not displayed properly (showing a large space between the panel and the title); now, if the user forgets to define theline.colorsargument, showing the EPR spectral series (e.g. kinetics), it automatically switches to predefined color vector and the correspondingmessageis displayed for both the discrete as well as for the continuous color schemesseveral fixes and/or updates in documentation (functions, including
Examples+ vignettes)if the
B.unitargument, within theeval_sim_EPR_isoequals to different units likeB.unit = "G",B.unit = "mT"orB.unit = "T", the intensity scale for the pseudo-Voigt line-shape was different, now it is normalized/standardized to that, corresponding toB.unit = "G", this is especially important for theeval_sim_EPR_isoFitwhere the initial multiplication intensity coefficient guesses should be comparable (regardless of theB.unit)simulated EPR spectra from different sources can be read by the
readEPR_Sim_Spec, taking into account original ASCII data files with several columns (not only two); therefore, now the.csvoutput of the simulated spectrum corresponding data frame from the shinyplot_eval_ExpSim_appcan be combined with thequantify_EPR_Sim_seriesto quantify rather noisy EPR spectral series and consequently to evaluate the radical kinetics
Updates
simplified (several arguments removed) general automatic reading (for the Xenon, WinEpr and Magnetech instrument acquisition toolboxes) for ASCII data/EPR spectral series by the
readEPR_Exp_Specs_kinas well as by thereadEPR_Exp_Specs_multiffunctions; additional arguments reduction/simplification in thequantify_EPR_Sim_seriesandeval_sim_EPR_isoFitfunctionssimplified code for the initial optimization parameter boundaries in the
eval_sim_EPR_isoFitpackage dependencies updated according to new functions/features (see below)
READMEupdated by detailed description of package pre-installation setup + R learning resource(s) addedlinear logarithmic model added to the
eval_kinR_Eyring_GHS(TST theory)the
functionalityvignette/article updated according to the new functions/features (see below)
New Functions/Files/Vignettes
when comparing several models/fits (of the same experimental data) a new general ranking function by Akaike and Bayesian information criteria (AIC and BIC) was created:
eval_ABIC_forFit, which has been also implemented in theeval_kinR_EPR_modelFit,eval_kinR_Eyring_GHS,eval_sim_EPR_isoFitas well as in the neweval_sim_EPR_isoFit_space(see below) functionsfor the same purpose (i.e. for comparison of several models/fits and looking for the best one), the new
plot_eval_RA_forFitwas created, serving as a general diagnostic tool for models/fits based on simple Residual Analysis or analysis of residuals, which correspond to difference between the experimental and predicted values by the model/fit: r (or ε) = yi - ŷi; the function returns several visual diagnostics (plots) together with the standard deviation (sd) of residuals/errors (r/ε); similarly as for theeval_ABIC_forFit, it has been already implemented in theeval_kinR_EPR_modelFit,eval_kinR_Eyring_GHS,eval_sim_EPR_isoFitas well as in the neweval_sim_EPR_isoFit_space(see below)the new
eval_sim_EPR_isoFit_spacefunction extends theeval_sim_EPR_isoFit, in order to explore broader range of the initial EPR simulation parameters and to estimate the uncertainties related to optimized ones; additionally, by using the parallel computation, the entire evaluation/iteration process is faster than by using the common sequential method; function returns a.gifanimation as well as several plots and data frames in order to show the detailed progress of the fit (corresponding to scanning of the initial parameter hyperspace)in order to demonstrate the essential syntax of R programming/statistical language, applied in the eprscope package, the new
firstStepvignette/article was created
eprscope 0.1.13
2025-03-22
Bug Fixes/Critical Updates
minimum sum of residual squares (
min.rss), coming from the final list ofeval_sim_EPR_isoFit, is now identical to that of the calculated from the final data framedfof the column/spectrumResidualsintensity (multiplet) pattern related to just one group of equivalent nuclei is displayed properly when running the
eval_sim_EPR_iso+ right now the function has no limitations, regarding the number of nuclei (within a group) or their corresponding spin quantum number I → calculation of multiplets (multinomial coefficients) was significantly updated using a recursive functionbibliography (
.bib) template, when running thecreate_qmdReport_proj, now possesses the right name inherited from thewd.subdir.namefixed bug in
plot_EPR_Specswhere the g-value scale was not displayed properly; now, if used either with theplot_theme_NoY_ticksorplot_theme_In_ticks, the back-ticks on the opposite axis are shown as expectedseveral fixes and/or updates in documentation (functions, including
Examples+ vignettes)
Updates
the maximum number of components in
quantify_EPR_Sim_serieswas increased from6to10; however one should be aware of such a high number of radicals when describing the EPR spectrum “envelope” (the sum of all components) because all the components/radicals must mirror the chemical reality of that mixturedata frame output from the
eval_sim_EPR_isoFitwhenoutput.list.forFitSp = TRUEwas replaced by the plot/spectrum, depending on thecheck.fit.plotargument, in order to be ready for the new complex fitting function (currently under development); this is also the reason why the list of suggested packages in theDESCRIPTIONhas been updatedcode in several functions → cleaned up in order to be more readable
right now, all functions based on optimization of EPR simulation parameters, like
optim_for_EPR_fitness,eval_simEPR_isoFit,quantify_EPR_sim_series, possess an option to display messages and progress of the optimization/fitting procedure (including the elapsed time) within the R console, for better interactivity;Examplesof those functions have been updated accordinglythe
Blimargument (defining the magnetic flux density, B region as a vector) was added/updated in several functions which return plots/spectra
New Functions/Files/Vignettes
-
R Shiny application with a simple user interface (UI):
plot_eval_ExpSim_app, providing not only interactive visualization of a CW EPR spectrum (and its corresponding instrumental parameters), but also the simulation in isotropic regime; all graphs/spectra and data frames/tables can be also exported to common formats like.csv,.pdf,.png,.jpegand excel
eprscope 0.1.12
2024-12-05
Bug Fixes/Critical Updates
READMEdocumentation → fixed/updated, because it did not contain the information about the JDK installation as well as that about the essential R packages + couple of learning or tutorial resources and comments were addedseveral fixes and/or updates in documentation (functions + vignettes)
the default intensity multiplication coefficient (parameter) boundaries within the
eval_sim_EPR_isoFitfunction are fixed and correctly set up + extended default boundaries for hyperfine coupling constants (A) addedfixed visualization of an EPR spectrum fit within the
eval_sim_EPR_isoFit+ the initial simulation (see updates) also includes a baseline correction (now it should also work for the consecutiveoptim.method(vector))increased decimal places of the magnetic flux density (B) and intensity by the reading of ASCII files, using the
read_EPR_Specsand related functionsfixed issue with the
originargument definition (regarding the spectrometer software labels/names) in reading functionsinitial
qvars for the"(a=1)A + (r=1)R --> [k1] B"model reaction (see also updates) are now correctly set upthe minimum sum of residual squares (RSS) value argument was renamed (
min.LSQ.sum→min.rss) and unified for all relevant fitting functionstube diameter within the
quantify_EPR_Absis now correctly definedfixed issue with the integral scale within the
eval_integ_EPR_Spec
Updates
code in several functions → cleaned up in order to be more readable, this also includes renaming of several arguments in those functions +
messagesandstops added on couple of places, within the code, for the sake of interactivity/awareness of operationsreorganization of files and folders related to vignettes
code for the integration of EPR spectra (see the
eval_integ_EPR_Specfunction) was simplified and supplemented with the option to integrate spectra having the [B] = T units, this also applies to thequantify_EPR_Sim_seriesfunctionthe initial simulated EPR spectrum was added to output graphics of the
eval_sim_EPR_isoFitvalue/list (for the case ofcheck.fit.plot = TRUE) in order to compare it with the final/best fit as well as with the experimental EPR spectrumnumber of letters in kinetic reaction schemes were decreased in order to be more readable + the last scheme (see also bug fixes above) as well as the time duration and resolution were simplified in order to better work with the numeric ODE integration (by the
deSolve::odefunction)option to select a method for the numeric ODE integration (argument
solve.ode.method) was added to both key functions analyzing the radical kineticsadded option to select a specific implementation of the
pswarm(“particle swarm”) optimization algorithm/method, within theoptim_for_EPR_fitness→ either“SPSO2007”(for small particle spaces and swarm sizes) or“SPSO2011”(for larger ones) can be set up + internal function updated (not provided as a user option), the number of “informants” (related to particles) was slightly increased by the corresponding exponent, k = 6 (see also documentation for thepso::psoptim)value/output list of the
eval_sim_EPR_isoFitwas extended to exclusively include vector of the optimized parameters (together with themin.rss) and data frame of the best EPR simulation fit in order to be ready for the new complex fitting function (currently under development)simple residual analysis (plots) added to the
eval_kinR_EPR_modelFitoutput/value list, including the Q-Q (“quantile-quantile”) plot (to check weather residuals are normally distributed) as well as the Residual plot (residuals vs predicted/fittedqvarRs, e.g. concentration) in order to check the kinetic model fit and precision of the optimized kinetic parameters
New Functions/Files/Vignettes
create_qmdReport_proj→ create file-folder structure of an EPR project to create a reproducible Quarto report (please, also refer to the https://quarto.org/ website)peak picking in EPR/ENDOR spectrum:
eval_peakPick_Spec, with the selection of positive or negative intensity peaks for both derivative as well as integrated forms of an EPR/ENDOR spectrumevaluate activation parameters of an elementary radical reaction, obtained by the “Eyring fit” of the experimental k vs T dependence, based on the essential transition state theory (TST) →
eval_kinR_Eyring_GHS
eprscope 0.1.11 (1st public release)
2024-08-29
Bug Fixes/Critical Updates
fixed reading of spectral time series within the
readEPR_Exp_Specsfunctionreading parameter strings from ‘parameter’ files within the
readEPR_param_slctfunction fixedthe g-value scale on x-axis within the plotting functions is now properly displayed
if the related
time(series)unit is converted in relevant data frames, the corresponding column is renamed in order to inherit the new unit (liketime_s) accordinglynow, the elements in
namesargument, within thereadEPR_Exp_Specs_multif, can also contain characters likec("a","b","c"), not just numbers, e.g.c("250","260","270")fixed visualization of legend labels within the
plot_EPR_Specsfunctionnatural abundance of interacting nuclei to calculate the intensities within the
eval_sim_EPR_isoand related functions/examples
Updates
polynomial to fit the distribution of (B1,Bm) within the cavity was extended in
quantify_EPR_Abs. Now, the degrees from 5 to 12 are availableadditionally, the above-corresponding (B1,Bm) theoretical distribution calculation was removed for now, and will be addressed in the future
intensity, B, and the
time.seriescolumn indices arguments, in general reading functionreadEPR_Exp_Specs, were renamed (using.id) in order to clearly point to headers incol.namesmagnettechoption added to reading functions to read the EPR spectra and parameters from these instruments, additionally, the ‘general’ reading functionreadEPR_Exp_Specswas updated to read files, from the most common EPR instruments, more easily by adding the auxiliarydata.structureargumentthe optimization algorithms, other than
diff-levenmarq, were removed from theeval_kinR_EPR_modelFitfor now, additional optimization methods will be implemented later onmany function documentations updated + several examples added + code-cleaning (by
stylerpackage) done in many functions +README,DESCRIPTIONand vignettes updated, accordinglyvignette to describe the EPR simulations and fitting was removed, for now (will be added later), however, the important points from that vignette are summarized in the relevant function documentations
stoichiometric coefficient notation as well as reaction model scheme for consecutive reactions within the
eval_kinR_ODE_modelupdated/extendedoption to use Tesla (
T) unit, now available in all g-value evaluationsline.typeoption added to all relevant plotting functionscalculation of confidence interval by the
eval_interval_cnfd_tVecsimplifiedto read the EPR instrumental parameters by
readEPR_params_slct, added option to read several parameters simultaneously (vectorized input)customized plot themes, like
plot_theme_In_ticks, were simplified, now, there is no need to add opposite axis-ticks by additional theme layer, those function can now also include additional arguments from generaltheme()function
New Functions/Files/Vignettes
perinaphthenyl (PNT) ENDOR spectral data added to package database for documentation examples (in plotting and reading functions)
setting up the continuous integrations like
R CMD checkandpkgdown(in order to build the site) via github actionsCONTRIBUTING.mdadded to package/sitenew vignette for datasets added
new family functions for EPR spectroelectrochemistry, including the function to plot voltammograms and chronoamperograms (
plot_ECh_VoC_amperogram) as well as to calculate the transferred charge and the corresponding number of electrons from chronoamperogram (eval_ECh_QNe_chronoamp)new dataset (
Triarylamine_radCat_decay_a) as an example of time series experimental data + new datasets coming frommagnettechinstrument:AcridineDeriv_Irrad_365nm
eprscope 0.1.10
2024-01-24
Bug Fixes/Critical Updates
calculation of normalization constant
quantify_EPR_Norm_const⇒ number of points added to calculated norm. constant by unitless receiver gainkinetic models by ODE ⇒
eval_kinR_ODE_model+eval_kinR_EPR_modelFitnow consider partial reaction orders and correct formulas for rates ⇒ derivations divided by stoichiometric coefficients according to IUPAC recommendations (see also https://doi.org/10.1021/ed083p510) + additionally, now the kinetic parameters can be optimized not only by the Levenberg-Marquardt algorithm but also by those including within theoptim_for_EPR_fitness(in case if the partial reaction orders are considered)eval_kinR_ODE_modelcan now compare/plot experimental data and model in order to ‘play’ with (manually optimize) partial reaction orders and/or stoichiometric coefficients to fit the experimental data e.g. like integrals or concentrations vs. time. Additionally, the A <– R –> B kinetic model was removed (also fromeval_kinR_EPR_modelFit) simply, because it “doubles” the R –> B model. The model can be added later on.several bugs in
quantify_EPR_Abs(e.g. like concentration calculation + default temperature definition) were fixed. The function was completely rewritten. Moreover, now the quantification possesses user’s/instrument’s defined polynomial (orders from 6 to 11) fitting of the spatial distribution of B1 and Bm as well as point sample calibration factor as arguments in order to be more flexible. Finally, the theoretical B1 and Bm distribution (see e.g. https://www.sciencedirect.com/science/article/pii/S1090780797912489) can be considered as well in order to estimate the radical concentration.remedy for the Breit-Rabi calculations of energies/frequencies/Bs in simulation => now the g-value for each level is corrected and B are calculated by the fixed-point iterations (see e.g https://doi.org/10.1016/j.jmr.2005.08.013). Simulations are not limited by the number of equivalent nuclei groups anymore (6 could be used up to now). Right now any number of groups maybe used in the actual simulation functions. All simulations are also continuously checked by the package tests/examples.
eval_sim_EPR_isoFitnow contains the option not only to fit the pseudo-Voight lines but also pure Lorentzian or pure Gaussian onto the experimental EPR spectra
Updates
README⇒ pkg. badges initiated + usage examples added +DESCRIPTION+ vignette demonstrating the basic functionality of the packageseveral documentations and examples
draw_molecule_by_rcdk⇒ renamed and focused just on one molecule + added option to place label of the molecule onto an arbitrary position of output image + documentation + examplesincreased accuracy of ENDOR frequencies in nuclei
isotopes_dsdatasetcouple of variables/arguments (e.g. like
B<->B.val) renamed in order to be consistent throughout the packageto select/remove the columns from
data frameobjects by dplyr thedplyr::all_of()function is now mostly applied in the package codeextended tolerance to find half of the max. intensity in order to evaluate FWHM
functions to read the EPR spectra like
readEPR_Exp_Specs,readEPR_Exp_Specs_kinas well asreadEPR_Exp_Specs_multifwere simplified and now contain the option to take additional arguments from the essentialdata.table::fread()which are not predefined in those functions in order to be more flexible upon reading
New Functions/Files/Vignettes
added files required to run examples as well as those incl. in vignette(s) ⇒ they are related to EPR spectra of electrochemically generated tetramethyl-phenylenediamine (TMPD) radical cation
smoothing of EPR spectra by
{npreg}package ⇒smooth_EPR_Spec_by_npregwhich is based on the evaluation of polynomial splinesfitting of the experimental EPR spectra by simulations ⇒
eval_sim_EPR_isoFitwhere several optimization methods can be applied ⇒ all incl. inoptim_for_EPR_fitness+ baseline correction (either “constant” or “linear” or “quadratic”) is now included in the fitting procedurenew tutorial vignette for simulations
EPR_Simulationswas initiated/set uptesting environment by the testthat pkg. set up and initiated + added tests for simulations and conversions
added files/spectral data corresponding to an EPR spectrum of aminoxyl radical for examples and testing
eprscope 0.1.9
2023-10-18
Bug Fixes
main function to read EPR spectral data (
readEPR_Exp_Specs) is now forced to usefileargument ⇒ that isdata.table::fread(file = path_to_ASC)conversion of
timetovarwithin a cyclic change inconvert_time2varchanged tolerance to find intensity values around
0in g-factor evaluation (eval_gFactor_Spec) in order to take into account different spectral data resolutionsgeneral integration function (
eval_integ_EPR_Spec) now includes the proper scaling of sigmoid integrals + fixedIntensitybug in vector output for the integrated form of EPR spectratemperature parameter in instrumental
.DSCor.parfiles is sometimes missing ⇒ now thereadEPR_params_tabschecks whether the temperature parameter is present and creates the table accordingly (with or without the temperature)
Updates
README,DESCRIPTIONand “Introduction””vignettedocumentation references set up
Code for the absolute quantification of paramag. centers/radicals was simplified within the
quantify_EPR_absfunction.Function to draw molecules was rewritten to read both
.sdffiles andsmilescharacters + it was renamed todraw_molecules_by_rcdk.Reading the simulated spectra (
readEPR_Sim_Spec) has now the option to readASCIIdata from various sources like ⇒ “easyspin”, “xenon”, “simfonia” (winepr) or “csv”.Instrumental parameters (related to recording of EPR spectra,
readEPR_params_tab) can be converted into interactive table based on {DT} package.Both
solventsandisotopesdatasets were renamed to..._ds.several documentations and examples
The
Intensityselection based on different character strings is now replaced by thelineSpecs.formargument throughout the corresponding functions.The
simulationsection/family was renamed toSimulation and Optimization.Presentation of simulated and experimental spectra (
presentEPR_Sim_Spec) has now option to display overlayed spectra.
New Functions
read properties of solvents (from the corresponding datasets) ⇒
readEPR_solvent_propsconvert magnetic flux density (B) values according to input-output units ⇒
convert_Bsimulation of isotropic EPR spectra in both derivative & integrated spectral forms ⇒
eval_sim_EPR_isosimulation of isotropic EPR spectra corresponding to linear combination of several components evaluated by the latter function ⇒
eval_sim_EPR_iso_comboread instrumental parameters required for the simulations that is now implemented in both sim. functions ⇒
readEPR_params_slct_sim
eprscope 0.1.8
2023-05-15
Added functions to evaluate radical kinetics incl. fitting procedures to experimental data (integral intensities).
Added basic package data structure and vignettes. Package data now include the isotope database,
isotope_db, to gather the basic properties of nuclei mainly for analysis in EPR/ENDOR spectroscopy. For such purpose the new functioneval_nu_ENDORwas written. It provides calculation of ENDOR/Larmor frequencies for selected nuclei at specific saturation magnetic flux densities, Bsat.All functions (incl. documentation) are now linked by sections/families.