Skip to content

Commit

Permalink
"truly" use E^f in Fig. 15
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed Jun 7, 2024
1 parent 9af3ca0 commit aa9aa5c
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 47 deletions.
1 change: 1 addition & 0 deletions analyses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ all:
python plot_pot_vs_Hodgson.py -o ../FigureS4.pdf
python plot_pot_hammet.py -o ../FigureS5.pdf
python plot_cplx_Gx1.py -o ../FigureS6.pdf
python plot_pot_exp.py -R -o ../FigureS7.pdf

tab:
python plot_pot.py --table pot.tab
Expand Down
46 changes: 39 additions & 7 deletions analyses/plot_pot_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import argparse
import scipy

from nitroxides.commons import dG_DH, AU_TO_ANG, LabelPositioner, AU_TO_EV, EPSILON_R, E_SHE
from nitroxides.commons import dG_DH, AU_TO_ANG, LabelPositioner, AU_TO_EV, AU_TO_KJMOL, EPSILON_R, E_SHE, G_NME4, G_BF4, RADII_BF4, RADII_NME4, dG_DH_cplx_Kx1, EPSILON_R

LABELS = {'water': [], 'acetonitrile': []}
POINTS_POSITION ={'water': [], 'acetonitrile': []}
Expand All @@ -14,17 +14,46 @@

EXCLUDE = [57, 51, 59]

def prepare_data(data: pandas.DataFrame, data_exp: pandas.DataFrame, solvent):
T = 298.15
R = 8.3145e-3 # kJ mol⁻¹
F = 9.64853321233100184e4 # C mol⁻¹


def Ef_ox(E0: float,X: float, k01: float, k02: float, k11: float, k12: float):
return E0 + R * T / F * numpy.log((1+k11*X+k12*X**2) / (1+k01*X+k02*X**2))


def prepare_data(data: pandas.DataFrame, data_exp: pandas.DataFrame, data_Kx1: pandas.DataFrame, solvent, correct: bool = True):
subdata = data[data['solvent'] == solvent]
subdata.insert(1, 'compound', [int(n.replace('mol_', '')) for n in subdata['name']])
subdata = subdata.join(data_exp[data_exp['E_ox_exp_{}'.format(solvent)].notnull()].set_index('compound'), on='compound', how='inner')

subdata_Kx1 = data_Kx1[data_Kx1['solvent'] == solvent]
subdata = subdata.join(subdata_Kx1[['name', 'r_AX_ox', 'r_AX_rad', 'G_cplx_ox', 'G_cplx_rad']].set_index('name'), on='name', how='inner')

dG_DH_k01 = dG_DH_cplx_Kx1(subdata['z'] + 1, subdata['z'] + 1, 1, subdata['r_ox'] / AU_TO_ANG, subdata['r_AX_ox'] / AU_TO_ANG, RADII_BF4[solvent] / AU_TO_ANG, EPSILON_R[solvent], c_elt=0.1)
dG_DH_k11 = dG_DH_cplx_Kx1(subdata['z'], subdata['z'], 1, subdata['r_rad'] / AU_TO_ANG, subdata['r_AX_rad'] / AU_TO_ANG, RADII_NME4[solvent] / AU_TO_ANG, EPSILON_R[solvent], c_elt=0.1)

dG_k01 = (subdata['G_cplx_ox'] - G_BF4[solvent] + dG_DH_k01) * AU_TO_KJMOL
dG_k11 = (subdata['G_cplx_rad'] - G_NME4[solvent] + dG_DH_k11) * AU_TO_KJMOL

subdata.insert(1, 'dG_cplx_ox', dG_k01)
subdata.insert(1, 'dG_cplx_rad', dG_k11)

subdata.insert(1, 'k01', numpy.exp(-dG_k01 / (R * T)))
subdata.insert(1, 'k11', numpy.exp(-dG_k11 / (R * T)))

subdata['E_ox_exp_{}'.format(solvent)] /= 1000

dG_DH_ = dG_DH(subdata['z'] + 1, subdata['z'], subdata['r_ox'] / AU_TO_ANG, subdata['r_rad'] / AU_TO_ANG, EPSILON_R[solvent], 0.1) * AU_TO_EV
subdata.insert(1, 'E_ox_theo_{}'.format(solvent), subdata['E_ox'] - dG_DH_ - E_SHE[solvent])
dG_DH_ = dG_DH(subdata['z'] + 1, subdata['z'], subdata['r_ox'] / AU_TO_ANG, subdata['r_rad'] / AU_TO_ANG, EPSILON_R[solvent], c_elt=0.1) * AU_TO_EV

if correct:
subdata.insert(1, 'E_ox_theo_{}'.format(solvent), subdata['E_ox'] - dG_DH_ - E_SHE[solvent])
# subdata.insert(1, 'E_ox_theo_{}'.format(solvent), Ef_ox(subdata['E_ox'] - dG_DH_, 0.1, subdata['k01'], 0, subdata['k11'], 0) - E_SHE[solvent]) → some data are missing for the moment
else:
subdata.insert(1, 'E_ox_theo_{}'.format(solvent), subdata['E_ox'] - E_SHE[solvent])

return subdata[['compound', 'family', 'E_ox_theo_{}'.format(solvent), 'E_ox_exp_{}'.format(solvent)]]
return subdata[['compound', 'family', 'E_ox_theo_{}'.format(solvent), 'E_ox_exp_{}'.format(solvent), 'k01', 'k11']]


def plot_exp_vs_theo(ax, data: pandas.DataFrame, solvent: str, family: str, color: str):
Expand Down Expand Up @@ -63,18 +92,21 @@ def plot_corr(ax, data: pandas.DataFrame, solvent: str):
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input', default='../data/Data_pot.csv')
parser.add_argument('-i2', '--input2', default='../data/Data_pot_ox_exp.csv')
parser.add_argument('-i3', '--input3', default='../data/Data_cplx_Kx1.csv')
parser.add_argument('-r', '--reposition-labels', action='store_true')
parser.add_argument('-o', '--output', default='Data_pot_ox_exp.pdf')
parser.add_argument('-R', '--raw', action='store_true')

args = parser.parse_args()

data = pandas.read_csv(args.input)
data_exp = pandas.read_csv(args.input2)
data_Kx1 = pandas.read_csv(args.input3)

figure = plt.figure(figsize=(5, 9))
ax1, ax2 = figure.subplots(2, 1)

subdata_wa = prepare_data(data, data_exp, 'water')
subdata_wa = prepare_data(data, data_exp, data_Kx1, 'water', correct=not args.raw)

plot_exp_vs_theo(ax1, subdata_wa, 'water', 'Family.P6O', 'tab:blue')
plot_exp_vs_theo(ax1, subdata_wa, 'water', 'Family.P5O', 'black')
Expand All @@ -94,7 +126,7 @@ def plot_corr(ax, data: pandas.DataFrame, solvent: str):

positioner.add_labels(ax1)

subdata_ac = prepare_data(data, data_exp, 'acetonitrile')
subdata_ac = prepare_data(data, data_exp, data_Kx1, 'acetonitrile', correct=not args.raw)

plot_exp_vs_theo(ax2, subdata_ac, 'acetonitrile', 'Family.P6O', 'tab:blue')
plot_exp_vs_theo(ax2, subdata_ac, 'acetonitrile', 'Family.P5O', 'black')
Expand Down
39 changes: 19 additions & 20 deletions analyses/pot_exp_acetonitrile.pos
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
,label,x,y
0,2,0.4438765569262125,0.863574837692712
1,3,0.6380742125349317,0.9158479300242165
2,4,0.4990128117934539,1.0719899405624358
3,6,0.6023732713819644,0.8685674877080033
4,12,1.0239349110638034,1.0486768407787257
5,61,0.589239734873345,1.0041899563697234
6,15,0.6870675331884576,0.9639531638510436
7,58,0.6758656895238815,1.0723399504851525
8,59,0.6268593775023655,1.1219396529446857
9,23,0.7260609862688812,1.0545933041732607
10,24,0.6965460171829495,1.098701120295577
11,25,0.6308788347422332,0.9787325871562836
12,26,0.659682000261976,1.0422272120167466
13,27,0.7262888839864805,1.0210822039614267
14,33,0.7417052682040323,1.1397951321460615
15,60,0.7518951563656074,1.1125329355624394
16,36,0.6802621245781908,0.9986929933273532
17,51,0.5606225155388862,1.0991846864321788
18,54,0.8278892082092979,1.0913083929576781
19,55,0.8473861464286029,1.1864842797688635
0,2,0.47107081656256083,0.8626264562847373
1,3,0.6230082353797602,0.9097436873361786
2,4,0.5150577324929498,1.0777505761329897
3,6,0.57622874744584,0.8621035654793175
4,12,1.0268763344908078,1.0491506684024725
5,15,0.6886598816640135,0.965439278848284
6,58,0.6751958417970293,1.0764762306693323
7,59,0.6280358102900123,1.1212636224600396
8,23,0.7336737985377431,1.0461970279475303
9,24,0.7316620174253338,1.0750174779414738
10,25,0.6292338759738931,0.9800426591338034
11,26,0.661703136896908,1.043490004299524
12,27,0.7227473476140649,1.0152558467884893
13,33,0.7572007640617795,1.1371366491138988
14,60,0.7240714710440453,1.1078034374927888
15,36,0.6312510424732102,1.013406601014792
16,51,0.5937250173093498,1.0869825136490716
17,54,0.8203968994456231,1.0858583165511493
18,55,0.8439753693864817,1.165234303933909
24 changes: 12 additions & 12 deletions analyses/pot_exp_water.pos
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
,label,x,y
0,2,0.8016241939476328,0.7494547108349441
1,3,0.8921938703337926,0.7959887712792744
2,4,0.8364497746535255,0.8221175463499808
3,6,0.9097162361834388,0.828025178946801
4,11,0.9872895934870578,0.8970893702286521
5,12,1.0166476326054266,0.9080869664872327
6,13,0.8549317829674,0.7850659804605586
7,15,0.9643818057629958,0.8772758630808144
8,18,0.8727712323384526,0.8220489695851109
9,56,0.9103404528884366,0.8665625659413435
10,57,0.7833279815320551,0.8623753149610659
11,58,1.0305238936280707,0.9483210702134718
0,2,0.8124121697934003,0.7465247830424631
1,3,0.891946961740928,0.7959117676668113
2,4,0.8357142595897417,0.8199954910719995
3,6,0.910057900275304,0.8231421924373752
4,11,0.9889085505132582,0.8992988790020404
5,12,1.0206408835824246,0.9096848828819359
6,13,0.8517600630200663,0.7862212525596723
7,15,0.9616440515077036,0.8728792246412183
8,18,0.8681894571043665,0.8239660968167094
9,56,0.9096805893995387,0.8710278641417291
10,57,0.7795159782062109,0.8458979417174098
11,58,1.0325533195111207,0.9526216912921555
15 changes: 8 additions & 7 deletions nitroxides.tex
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ \subsection{Impact of ion-pair formation on redox potentials}
\item the redox potentials of the ion-pair complexes are smaller than the one of the free species.
\end{inparaenum}
Within these assumption, the following electrolyte concentration-dependent (formal) redox potentials are obtained:\begin{align}
E^f_{abs}(\ce{N+|N^.}) &= E^0_ {abs}(\ce{N+|N^.})+\frac{RT}{F}\,\ln\left[\frac{1+K_{11}\,[X]+K_{12}\,[X]^2}{1+K_{01}\,[X]+K_{02}\,[X]^2}\right],\\
E^f_{abs}(\ce{N^.|N-}) &= E^0_ {abs}(\ce{N^.|N-})+\frac{RT}{F}\,\ln\left[\frac{1+K_{21}\,[X]+K_{22}\,[X]^2}{1+K_{11}\,[X]+K_{12}\,[X]^2}\right],
E^f_{abs}(\ce{N+|N^.}) &= E^0_ {abs}(\ce{N+|N^.})+\frac{RT}{F}\,\ln\left[\frac{1+K_{11}\,[X]+K_{12}\,[X]^2}{1+K_{01}\,[X]+K_{02}\,[X]^2}\right],\label{eq:ef1}\\
E^f_{abs}(\ce{N^.|N-}) &= E^0_ {abs}(\ce{N^.|N-})+\frac{RT}{F}\,\ln\left[\frac{1+K_{21}\,[X]+K_{22}\,[X]^2}{1+K_{11}\,[X]+K_{12}\,[X]^2}\right],\label{eq:ef2}
\end{align}
in which $K_{ij}= \exp\left[-\frac{\Delta G_{cplx}^\star}{RT}\right]$, where $\Delta G_{cplx}^\star$ is the free Gibbs energy change [computed with Eq.~\eqref{eq:gtot}] for a given complexation reaction.

Expand Down Expand Up @@ -525,13 +525,14 @@ \subsection{Impact of the electrolytes} \label{sec:elect}
\clearpage
\subsection{Comparison to experiment} \label{sec:exp}

A comparison between theoretical (including all corrections discussed above) and experimental oxidation potentials is shown in Fig.~\ref{fig:expvstheo}.\todo{This is not really $E^f$ for the moment ;)} Excluding compounds bearing an \ce{NH2} group (\textbf{51}, \textbf{57}, and \textbf{59}) results in an excellent linear correlation ($R^2>0.9$). The computed potentials for these compounds are higher (by $>\SI{0.1}{\volt}$) than the fit line, suggesting that the amine group might be protonated under the experimental measurement conditions. This is indeed consistent with other cases (\textit{e.g.}, \textbf{25} vs \textbf{35}) discussed in Section \ref{sec:sar}. The remaining results indicate that the method used in this paper tends to overestimate the oxidation potentials in water and systematically underestimate them in acetonitrile, with a large mean average error (MAE), indicating that the value for $E^0_{abs}(\text{SHE)}$ might not be appropriate in this solvent.
A comparison between theoretical (including all corrections discussed above) and experimental oxidation potentials is shown in Fig.~\ref{fig:expvstheo}. Excluding compounds bearing an \ce{NH2} group (\textbf{51}, \textbf{57}, \textbf{59}, and \textbf{4} in acetontrile) results in an excellent linear correlation ($R^2 > 0.9$). The computed potentials for these compounds are higher (by $>\SI{0.1}{\volt}$) than the fit line, suggesting that the amine group might be protonated under the experimental measurement conditions. This is indeed consistent with other cases (\textit{e.g.}, \textbf{25} vs \textbf{35}) discussed in Section \ref{sec:sar}.

The remaining results indicate that the method used in this paper tends to overestimate the oxidation potentials in water and systematically underestimate them in acetonitrile, with a large mean average error (MAE). This suggests that the value for $E^0_{abs}(\text{SHE})$ might not be appropriate in this solvent. The impact of the different corrections (see Fig.~S7) is to decrease the potential, mainly due to the DH correction (given the value of the complexation equilibrium constants for the oxidation reaction, see Table \ref{tab:Kx1}), as seen in Fig.~\ref{fig:DH}. While this improves the slope and MAE in water, the opposite effect is observed in acetonitrile.

\begin{figure}[!h]
\centering
\includegraphics[width=.8\linewidth]{Figure15}
\caption{Comparison between experimental ($E^0_{rel} $ vs SHE, from Table S11) and computed relative oxidation potential ($E^f_{rel}$ vs SHE), as computed at the $\omega$B97X-D/6-311+G(d) level in water (left) and acetonitrile (right) using SMD and $[X]=\SI{0.1}{\mole\per\liter}$. The dashed line is a linear regression.}
\includegraphics[width=.75\linewidth]{Figure15}
\caption{Comparison between experimental ($E^0_{rel} $ vs SHE, from Table S11) and computed relative oxidation potential ($E^f_{rel}$, computed using \eqref{eq:ef1}, vs SHE), as computed at the $\omega$B97X-D/6-311+G(d) level in water (top) and acetonitrile (bottom) using SMD and $[X]=\SI{0.1}{\mole\per\liter}$. The dashed line is a linear regression.}
\label{fig:expvstheo}
\end{figure}

Expand All @@ -540,8 +541,8 @@ \subsection{Comparison to experiment} \label{sec:exp}

\begin{figure}[!h]
\centering
\includegraphics[width=.8\linewidth]{Figure16}
\caption{Comparison between experimental ($E^0_{rel} $ vs SHE, from Table S11) and corrected oxidation potential using the scheme of Matsui et al. \cite{matsuiDensityFunctionalTheory2013} [Eq.~\eqref{eq:matsui}, with the parameters $E_{abs}^0(\text{SHE})$, $f$, and $\mu$ obtained by a least-square procedure], as computed at the $\omega$B97X-D/6-311+G(d) level in water (left) and acetonitrile (right). The dashed line is a linear regression, obtained without the DH correction. }
\includegraphics[width=.75\linewidth]{Figure16}
\caption{Comparison between experimental ($E^0_{rel} $ vs SHE, from Table S11) and corrected oxidation potential using the scheme of Matsui et al. \cite{matsuiDensityFunctionalTheory2013} [Eq.~\eqref{eq:matsui}, with the parameters $E_{abs}^0(\text{SHE})$, $f$, and $\mu$ obtained by a least-square procedure, on calculated data without the DH correction], as computed at the $\omega$B97X-D/6-311+G(d) level in water (top) and acetonitrile (bottom). The dashed line is a linear regression. }
\label{fig:matsui}
\end{figure}

Expand Down
11 changes: 10 additions & 1 deletion nitroxides_SI.tex
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@
note{a} = {From Ref.~\citenum{goldsteinStructureActivityRelationship2006}.},
note{b} = {From Ref.~\citenum{morrisChemicalElectrochemicalReduction1991}, converted from SCE to SHE with +\SI{244}{\milli\volt} \cite{pavlishchukConversionConstantsRedox2000}.},
note{c}={From Ref.~\citenum{blincoExperimentalTheoreticalStudies2008}.},
note{d}={From Ref.~\citenum{zhangEffectHeteroatomFunctionality2018}, converted from Fc to SHE with +\SI{624}{\milli\volt} \cite{pavlishchukConversionConstantsRedox2000}.}
note{d}={From Ref.~\citenum{zhangEffectHeteroatomFunctionality2018}, converted from Fc to SHE with +\SI{624}{\milli\volt} \cite{pavlishchukConversionConstantsRedox2000}.},
label={tab:exp}
]{colspec={>{\bfseries}lX[c]X[c]c>{\bfseries}lX[c]X[c]}, width = 0.85\linewidth,rowhead=1}
\hline
& Water & Acetonitrile & & & Water & Acetonitrile\\
Expand All @@ -604,9 +605,17 @@
\hline
\end{longtblr}

\begin{figure}[!h]
\centering
\includegraphics[width=.75\linewidth]{FigureS7}
\caption{Comparison between experimental ($E^0_{rel} $ vs SHE, from Table \ref{tab:exp}) and computed relative oxidation potential ($E^f_{rel}$ vs SHE), as computed at the $\omega$B97X-D/6-311+G(d) level in water (top) and acetonitrile (bottom) using SMD and no correction due to DH or pair formation. The dashed line is a linear regression.}
\label{fig:expvstheo}
\end{figure}

\clearpage



\bibliographystyle{unsrt}
\bibliography{biblio}

Expand Down

0 comments on commit aa9aa5c

Please sign in to comment.