Skip to content

Commit

Permalink
add Figs. S5 and S6
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed May 31, 2024
1 parent 4fda7dd commit b862efa
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 76 deletions.
2 changes: 2 additions & 0 deletions analyses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ all:
python plot_CIP.py -o ../FigureS2.pdf
python plot_pairs.py -o ../FigureS3.pdf
python plot_pot_hammet.py -o ../FigureS4.pdf
python plot_cplx_r.py -o ../FigureS5.pdf
python plot_cplx_Gx1.py -o ../FigureS6.pdf
74 changes: 74 additions & 0 deletions analyses/plot_cplx_Gx1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import pandas
import matplotlib.pyplot as plt
import numpy
import sys
import argparse

from matplotlib.ticker import AutoMinorLocator, MultipleLocator
from nitroxides.commons import AU_TO_ANG, AU_TO_KJMOL, G_NME4, G_BF4, RADII_BF4, RADII_NME4, C_NITROXIDE, dG_DH_cplx_Kx1

T = 298.15
R = 8.3145e-3 # kJ mol⁻¹

def plot_Kx1(ax, data: pandas.DataFrame, family: str, solvent: str, epsilon_r: float, color: str):
subdata_k01 = data[(data['family'] == family) & (data['solvent'] == solvent) & (data['has_anion'] == True)] # K_01 → N+ + A-
subdata_k21 = data[(data['family'] == family) & (data['solvent'] == solvent) & (data['has_cation'] == True)] # K_21 → N- + C+

dG_DH_k01_0 = dG_DH_cplx_Kx1(subdata_k01['z'] + 1, subdata_k01['z'], -1, subdata_k01['r_A'] / AU_TO_ANG, subdata_k01['r_AX'] / AU_TO_ANG, RADII_BF4[solvent] / AU_TO_ANG, epsilon_r, c_elt=0.1)
dG_DH_k21_0 = dG_DH_cplx_Kx1(subdata_k21['z'] - 1, subdata_k21['z'], 1, subdata_k21['r_A'] / AU_TO_ANG, subdata_k21['r_AX'] / AU_TO_ANG, RADII_NME4[solvent] / AU_TO_ANG, epsilon_r, c_elt=0.1)

dG_DH_k01 = dG_DH_cplx_Kx1(subdata_k01['z'] + 1, subdata_k01['z'], -1, subdata_k01['r_A'] / AU_TO_ANG, subdata_k01['r_AX'] / AU_TO_ANG, RADII_BF4[solvent] / AU_TO_ANG, epsilon_r)
dG_DH_k21 = dG_DH_cplx_Kx1(subdata_k21['z'] - 1, subdata_k21['z'], 1, subdata_k21['r_A'] / AU_TO_ANG, subdata_k21['r_AX'] / AU_TO_ANG, RADII_NME4[solvent] / AU_TO_ANG, epsilon_r)

dG_k01_0 = (subdata_k01['G_cplx'] - G_BF4[solvent] + dG_DH_k01_0) * AU_TO_KJMOL
dG_k21_0 = (subdata_k21['G_cplx'] - G_NME4[solvent] + dG_DH_k21_0) * AU_TO_KJMOL

dG_k01 = (subdata_k01['G_cplx'] - G_BF4[solvent] + dG_DH_k01) * AU_TO_KJMOL
dG_k21 = (subdata_k21['G_cplx'] - G_NME4[solvent] + dG_DH_k21) * AU_TO_KJMOL

ax.plot([int(x.replace('mol_', '')) for x in subdata_k01['name']], dG_k01, 'o', color=color, label=family.replace('Family.', ''))
ax.plot([int(x.replace('mol_', '')) for x in subdata_k21['name']], dG_k21, 's', color=color)
ax.plot([int(x.replace('mol_', '')) for x in subdata_k01['name']], dG_k01_0, 'o', markerfacecolor='none', markeredgecolor=color)
ax.plot([int(x.replace('mol_', '')) for x in subdata_k21['name']], dG_k21_0, 's', markerfacecolor='none', markeredgecolor=color)


parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input', default='../data/Data_cplx_Kx1.csv')
parser.add_argument('-o', '--output', default='Data_cplx_Gx1.pdf')

args = parser.parse_args()

data = pandas.read_csv(args.input)

figure = plt.figure(figsize=(10, 8))
ax1, ax2 = figure.subplots(2, 1, sharey=True, sharex=True)

plot_Kx1(ax1, data, 'Family.AMO', 'water', 80.,'tab:pink')
plot_Kx1(ax1, data, 'Family.P6O', 'water', 80.,'tab:blue')
plot_Kx1(ax1, data, 'Family.P5O', 'water', 80., 'black')
plot_Kx1(ax1, data, 'Family.IIO', 'water', 80., 'tab:green')
plot_Kx1(ax1, data, 'Family.APO', 'water', 80., 'tab:red')

ax1.legend(ncols=5)
ax1.set_xlim(0.5,61.5)
ax1.text(38, 0.5, "Water", fontsize=18)
ax1.xaxis.set_minor_locator(MultipleLocator(2))
ax1.grid(which='both', axis='x')
ax1.plot([0, 62], [0, 0], '-', color='grey')

plot_Kx1(ax2, data, 'Family.P6O', 'acetonitrile', 35.,'tab:blue')
plot_Kx1(ax2, data, 'Family.P5O', 'acetonitrile', 35., 'black')
plot_Kx1(ax2, data, 'Family.IIO', 'acetonitrile', 35., 'tab:green')
plot_Kx1(ax2, data, 'Family.APO', 'acetonitrile', 35., 'tab:red')

ax2.set_xlabel('Molecule id')
ax2.set_xlim(0.5,61.5)
ax2.text(38, 0.5, "Acetonitrile", fontsize=18)
ax2.xaxis.set_minor_locator(MultipleLocator(2))
ax2.grid(which='both', axis='x')
ax2.plot([0, 62], [0, 0], '-', color='grey')

[ax.set_ylabel('$\\Delta G^\\star_{pair}$ (kJ mol$^{-1}$)') for ax in [ax1, ax2]]

plt.tight_layout()
figure.savefig(args.output)
2 changes: 1 addition & 1 deletion analyses/plot_cplx_Kx1.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def helpline_K01(ax, data: pandas.DataFrame, solvent: str, epsilon_r: float, col
data = pandas.read_csv(args.input)

figure = plt.figure(figsize=(10, 8))
ax1, ax2 = figure.subplots(2, 1, sharey=True)
ax1, ax2 = figure.subplots(2, 1, sharey=True, sharex=True)

helpline_K01(ax1, data, 'water', 80, 'black')

Expand Down
2 changes: 1 addition & 1 deletion analyses/plot_cplx_Kx2.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def helpline_K02(ax, data: pandas.DataFrame, solvent: str, epsilon_r: float, col
data = pandas.read_csv(args.input)

figure = plt.figure(figsize=(10, 8))
ax1, ax2 = figure.subplots(2, 1, sharey=True)
ax1, ax2 = figure.subplots(2, 1, sharey=True, sharex=True)

helpline_K02(ax1, data, 'water', 80, 'black')

Expand Down
73 changes: 0 additions & 73 deletions analyses/plot_cplx_r_Kx1.py

This file was deleted.

2 changes: 1 addition & 1 deletion nitroxides.tex
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ \subsection{Impact of the electrolytes}
\begin{figure}[!h]
\centering
\includegraphics[width=\linewidth]{Figure11}
\caption{Value of the complexation equilibrium constants $K_{01}$ (round markers, $\bullet$) and $K_{21}$ (square markers, $\blacksquare$) for the 3 oxidation state of nitroxides, as computed at the $\omega$B97X-D/6-311+G(d) level in water (top) and acetonitrile (bottom) using SMD and $[X]=\SI{1}{\mole\per\liter}$. The dashed line is there to help visualization. }
\caption{Value of the complexation equilibrium constants $K_{01}$ (round markers, $\bullet$) and $K_{21}$ (square markers, $\blacksquare$), as computed at the $\omega$B97X-D/6-311+G(d) level in water (top) and acetonitrile (bottom) using SMD and $[X]=\SI{1}{\mole\per\liter}$. The dashed line is there to help visualization. }
\label{fig:Kx1}
\end{figure}

Expand Down
12 changes: 12 additions & 0 deletions nitroxides_SI.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,17 @@
\includegraphics [width=\linewidth]{FigureS4}
\caption{Correlation between absolute oxidation (left) and reduction (right) and the Hammet constant of their substituent for compounds of the P5O (black markers) and P6O (blue markers) families.}
\end{figure}

\begin{figure}[!h]
\centering
\includegraphics [width=\linewidth]{FigureS5}
\caption{Difference between the oxygen of the nitroxide redox center ($>$\ce{N=O}) and the center of the counteranion (\ce{A-}, $d_{OX}$) or countercation (\ce{C+}, $d_{red}$) as measured on the geometries optimized at the $\omega$B97X-D/6-311+G(d) level in water (top) and acetonitrile (bottom) using SMD.}
\end{figure}

\begin{figure}[!h]
\centering
\includegraphics [width=\linewidth]{FigureS6}
\caption{Value of the complexation free Gibs energy change for $K_{01}$ (round markers, $\bullet$) and $K_{21}$ (square markers, $\blacksquare$), as computed at the $\omega$B97X-D/6-311+G(d) level in water (top) and acetonitrile (bottom) using SMD at two concentration: $[X]=\SI{1}{\mole\per\liter}$ (filled markers) and $[X]=\SI{0.1}{\mole\per\liter}$ (empty markers). }
\end{figure}

\end{document}

0 comments on commit b862efa

Please sign in to comment.