-
Notifications
You must be signed in to change notification settings - Fork 0
/
supporting-information.org
19250 lines (18804 loc) · 799 KB
/
supporting-information.org
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#+title: Simulating temperature programmed desorption of oxygen on Pt(111) using DFT derived coverage dependent desorption barriers
#+OPTIONS: toc:nil author:nil
#+latex_header: \usepackage[utf8]{inputenc}
#+latex_header: \usepackage{fixltx2e}
#+latex_header: \usepackage{url}
#+latex_header: \usepackage{graphicx}
#+latex_header: \usepackage{color}
#+latex_header: \usepackage{amsmath}
#+latex_header: \usepackage{textcomp}
#+latex_header: \usepackage{marvosym}
#+latex_header: \usepackage{wasysym}
#+latex_header: \usepackage{latexsym}
#+latex_header: \usepackage{amssymb}
#+latex_header: \usepackage{minted}
#+latex_header: \usepackage{longtable}
#+latex_header: \usepackage[numbers,sort&compress]{natbib}
#+latex_header: \usepackage[linktocpage,
#+latex_header: pdfstartview=FitH,
#+latex_header: colorlinks,
#+latex_header: linkcolor=blue,
#+latex_header: anchorcolor=blue,
#+latex_header: citecolor=blue,
#+latex_header: filecolor=blue,
#+latex_header: menucolor=blue,
#+latex_header: urlcolor=blue]{hyperref}
#+latex_header: \tolerance=1000
#+lATEX_HEADER: \usepackage{attachfile}
#+LaTeX_HEADER: \author{Spencer D. Miller \and Vladimir V. Pushkarev \and Andrew J. Gellman \and John R. Kitchin}
\maketitle
\tableofcontents
* Supporting information
This section describes the data used in preparation of the figures in the manuscript. We also describe the leading edge analysis we performed. The actual data is in the last sections, and largely consist of tables of data. When the native document format (org-mode) is used, it is straightforward to use these tables as data sources, which is done in the sections on figure generation and the leading edge analysis.
Manuscript file in native format: attachfile:tpd-scaling.org
Supporting information file in native format: attachfile:supporting-information.org
Note that this attached file contains data not included in the pdf version because the size of the data tables leads to a 900 page supporting information file in PDF.
** Manuscript figure generation
This section contains all of the code and data used to generate the figures for the manuscript.
*** Figure 1
#+BEGIN_SRC python
from numpy import *
from pylab import *
import scipy.io
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['figure.figsize'] = (3,4);
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.91;
rcParams['figure.subplot.right'] = 0.9;
rcParams['figure.subplot.left'] = 0.22;
rcParams['axes.labelsize'] = 12;
axe = subplot(111)
axe.yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
#Reads in matlab file creating a dictionary with the following entires
data = scipy.io.loadmat('analysis/coverage-normalized.mat')
for i in range(data['T'].shape[1]):
t = data['T'][0,i][0]
m = data['M'][0,i][0]
plot(t,m,'k')
#Set Plot Axis;
ylim(0,2*10**-3);
xlim(500,1000);
axe = gca();
xlabel('Temperature (K)')
ylabel('Des. Rate (ML/K)')
for ext in ['png','eps','pdf']:
savefig('figures/fig1.{0}'.format(ext), dpi=300)
show()
#+END_SRC
#+RESULTS:
[[./figures/fig1.png]]
*** Figure 2
#+BEGIN_SRC python
from scipy.io import loadmat, savemat
from scipy.integrate import odeint
from scipy.optimize import leastsq
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['figure.figsize'] = (6,4);
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.91;
rcParams['figure.subplot.right'] = 0.9;
rcParams['figure.subplot.left'] = 0.22;
rcParams['axes.labelsize'] = 12;
rcParams['legend.fontsize'] = 11
data = loadmat('analysis/coverage-normalized.mat')
# Here is the ode that simulates 2nd order desorption
def myodefunc(theta, T, Ed0, alpha):
kb = 8.617e-5; # gas constant
beta = 2 # heating rate
Ed = Ed0 + alpha*theta # coverage dependent desorption barrier
k = 3 * 10**12*np.exp(-Ed / kb / T) # rate constant for desorption
dthetadT = -k / beta * theta**2
return dthetadT
# a low coverage line
plt.figure()
axe = plt.subplot(121)
axe.yaxis.set_major_formatter(plt.ScalarFormatter(useMathText=True))
for i in range(16):
theta0 = data['theta0'][0,i]
T = data['T'][0, i][0]
M = data['M'][0, i][0]
# initial parameters
Ed0 = 1.956
alpha = -0.584
X, infodict = odeint(myodefunc, theta0,
T, args=(Ed0, alpha),
full_output=True)
# this is the solution
theta = X[:, 0].T
## ### now, plot
plt.title( 'a)')
plt.plot(T, M, 'k')
plt.plot(T, -myodefunc(theta, T, Ed0, alpha),'r')
plt.ylim([0, 2.5e-3])
plt.legend(['Experimental','Simulated'])
plt.xlabel('Temperature (K)')
plt.ylabel('Desorption rate (ML/K)')
# a high coverage line
axe = plt.subplot(122)
axe.yaxis.set_major_formatter(plt.ScalarFormatter(useMathText=True))
for i in range(16):
theta0 = data['theta0'][0,i]
T = data['T'][0,i][0]
M = data['M'][0,i][0]
# initial parameters
Ed0 = 1.979
alpha = -0.819
X, infodict = odeint(myodefunc, theta0,
T, args=(Ed0, alpha),
full_output=True)
# this is the solution
theta = X[:,0].T
## ### now, plot
## ##
plt.plot(T,M,'k')
plt.plot(T,-myodefunc(theta, T, Ed0, alpha),'r')
plt.ylim([0, 2.5e-3])
plt.legend(['Experimental','Simulated'])
plt.title('b)')
plt.xlabel('Temperature (K)')
plt.subplots_adjust(left=0.14, right=0.95, wspace=0.47)
for ext in ['png','eps','pdf']:
plt.savefig('figures/fig2.{0}'.format(ext), dpi=300)
plt.show()
#+END_SRC
#+RESULTS:
[[./figures/fig2.png]]
*** Figure 3
#+BEGIN_SRC python :var data=linear-fits :colnames yes
from numpy import *
import scipy.io
from pylab import *
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['figure.figsize'] = (3,4);
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.95;
rcParams['figure.subplot.right'] = 0.95;
rcParams['figure.subplot.left'] = 0.22;
rcParams['axes.labelsize'] = 12;
rcParams['legend.fontsize']=12
avgb = average(array(data)[1:,0])
avgm = average(array(data)[1:,1])
theta = np.linspace(0, 0.25)
for b,m in data[2:]:
h1 = plot(theta, b + m*theta, 'b-')
h1[-1].set_label('Fits')
h2 = plot(theta, avgb + avgm*theta, 'k--',label='Average')
legend(loc='best')
xlabel('Coverage (ML)')
ylabel('$E_d$ (eV)')
subplots_adjust(left=0.25, right=0.92)
xticks([0, 0.07, 0.15, 0.25])
for ext in ['png','eps','pdf']:
savefig('figures/fig3.{0}'.format(ext), dpi=300)
show()
#+END_SRC
#+RESULTS:
[[./figures/fig3.png]]
*** Figure 4
#+BEGIN_SRC python :var DFT=dft-data :var DE=direct-enumeration :var CHULL=convex-hull :var SHF=stable-hf
#This script will plot several aspects of the cluster expansion convex hull
#DFT based heats of formation
#cluster expansion based heats of formation
#cluster expansion based convex hull
#cluster expansion based heats of formation near the convex hull
#range of heats of formation considered "stable"
import os
import sys
from pylab import *
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['legend.fontsize'] = 11;
rcParams['figure.figsize'] = (3,4);
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.91;
rcParams['figure.subplot.right'] = 0.95;
rcParams['figure.subplot.left'] = 0.3;
rcParams['axes.labelsize'] = 12;
DFT = np.array(DFT)
DE = np.array(DE)
CHULL = np.array(CHULL)
SHF = np.array(SHF)
stableRange = 50./1000;
dftHfCoverage = DFT[:, 0];
dftHfEnergy = DFT[:, 1]/1000.;
ceHfCoverage = DE[:, 0];
ceHfEnergy = DE[:, 1]/1000.;
stableCeHfCoverage = SHF[:, 0];
stableCeHfEnergy = SHF[:, 1]/1000.;
convexHullCoverage = CHULL[:, 0];
convexHullEnergy = CHULL[:, 1]/1000.;
lowConvexHullCoverage = convexHullCoverage;
lowConvexHullEnergy = convexHullEnergy - stableRange*convexHullCoverage;
highConvexHullCoverage = convexHullCoverage;
highConvexHullEnergy = convexHullEnergy + stableRange*convexHullCoverage;
#Plot heats of formation
axe = subplot(111)
axe.yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
ceHfPlot = plot(ceHfCoverage,ceHfEnergy,'ko',markersize=0.5,label='Cluster Expansion');
stableCeHfPlot = plot(stableCeHfCoverage,stableCeHfEnergy,'b^',markersize=4,label='Near Convex Hull');
dftHfPlot = plot(dftHfCoverage, dftHfEnergy, 'rs', markersize=8, label='DFT');
convexHullPlot = plot(convexHullCoverage, convexHullEnergy,'b-');
lowConvexHullPlot = plot(lowConvexHullCoverage, lowConvexHullEnergy,'b--');
highConvexHullPlot = plot(highConvexHullCoverage, highConvexHullEnergy,'b--');
fill_between(convexHullCoverage,lowConvexHullEnergy, highConvexHullEnergy, color='b', alpha=0.3);
ylabel(r'$\Delta H_{f}$ (eV/O)');
xlabel("Oxygen Coverage (ML)");
xlim([0,1])
legend(loc='upper center',
numpoints=1,
labelspacing=0,
columnspacing=0.01);
ylim(-0.400, 0.100)
for ext in ['png','eps','pdf']:
savefig('figures/fig4.{0}'.format(ext), dpi=300)
show()
#+END_SRC
#+RESULTS:
[[./figures/fig4.png]]
*** Figure 5
#+BEGIN_SRC python :var DE=stable-hf :var DFT=dft-data
import numpy as np
import sys
import matplotlib
from pylab import *
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['figure.figsize'] = (3,4);
rcParams['lines.linewidth'] = 2;
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.95;
rcParams['figure.subplot.right'] = 0.95;
rcParams['figure.subplot.left'] = 0.25;
rcParams['axes.labelsize'] = 14;
H1ML = -2.98497267465
# Hads = Hf/theta + Hads(1ML)
DE = np.array(DE)
ce_theta = DE[:, 0]
ce_hf = DE[:, 1]/1000. # convert to eV
ce_hads = ce_hf/ce_theta + H1ML
DFT = np.array(DFT)
dft_theta = DFT[:,0]
dft_hf = DFT[:,1] / 1000.
dft_hads = dft_hf / dft_theta + H1ML
## Constrained fits of DFT
A = np.vstack([dft_theta**4, dft_theta**3, dft_theta**2, np.ones(len(dft_theta))]).T
dft_pars = np.linalg.lstsq(A, dft_hads)[0]
print 'DFT fit pars = ',dft_pars
## Constrained fits of CE
A = np.vstack([ce_theta**4, ce_theta**3, ce_theta**2, np.ones(len(ce_theta))]).T
ce_pars = np.linalg.lstsq(A, ce_hads)[0]
print 'CE fit pars = ',ce_pars
plot(dft_theta, dft_hads,'bs ', label='DFT')
plot(ce_theta, ce_hads,'m. ', label='CE')
# now plot fits
theta = np.linspace(0,1)
A = np.vstack([theta**4, theta**3, theta**2, np.ones(len(theta))]).T
plot(theta, np.dot(A, dft_pars),'b-', label='DFT fit')
plot(theta, np.dot(A, ce_pars),'m-', label='CE fit')
legend(loc='upper left')
ylim([-4.2, -2.8])
ylabel(r'$\Delta H_{ads}$ (eV/O)');
xlabel("Oxygen Coverage (ML)");
for ext in ['png','eps','pdf']:
savefig('figures/fig5.{0}'.format(ext), dpi=300)
show()
#+END_SRC
#+RESULTS:
: DFT fit pars = [ 2.67693764 -5.63713503 4.12922348 -4.14884994]
: CE fit pars = [ 2.55245771 -5.24686157 3.94694687 -4.15873743]
[[./figures/fig5.png]]
*** Figure 6
**** data fitting
First, we do the fitting. We want to fit a single alpha and kappa to the data
#+BEGIN_SRC python :results output
from scipy.io import loadmat, savemat
from scipy.integrate import odeint
from scipy.optimize import leastsq
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams
data = loadmat('analysis/coverage-normalized.mat')
# Here is the ode that simulates 2nd order desorption with coverage dependent adsorption energy
def myodefunc(theta, T, alpha, kappa):
kb = 8.617e-5; # gas constant
beta = 2 # heating rate
p0 = 2.6770;
p1 = -5.6372;
p2 = 4.1292;
p3 = -4.1488;
# this is the average adsorption energy!!!
avg_Eads = p0 * theta**4 + p1 * theta**3 + p2 * theta**2 + p3;
int_Eads = theta * avg_Eads
diff_Eads = avg_Eads + (4 * p1 * theta**4
+ 3 * p1 * theta**3
+ 2 * p2 * theta**2)
Ed = alpha * diff_Eads + kappa
k = 3*10**12*np.exp(-Ed/kb/T) # rate constant for desorption
dthetadT = -k/beta*theta**2
return dthetadT
def func(pars):
alpha = pars[0]
kappa = pars[1]
errors = np.array([])
for i in range(16):
theta0 = data['theta0'][0,i]
T = data['T'][0,i][0]
M = data['M'][0,i][0]
X, infodict = odeint(myodefunc, theta0,
T, args=(alpha, kappa),
full_output=True)
theta = X.T
error = M - (-myodefunc(theta,T,alpha, kappa))
errors = np.append(errors, error[0])
return errors
# initial parameters
alpha = -1.0
kappa = -1.9
x,cov_x, infodict, mesg, ier = leastsq(func, [alpha, kappa], full_output=True)
print x
#+END_SRC
#+RESULTS:
: [-0.46295336 0.01384663]
**** the figure
We fit the average adsorption energy to an equation:
\(E^{avg}_{ads} = p_0 \theta^4 + p_1 \theta^3 + p_2 \theta^2 + p_3 \)
To get the integral adsorption energy, we multiply the average adsorption energy by \theta cite:grabow2010.
\(E^{int}_{ads} = \theta E^{avg} \)
Finally, the differential energy is the derivative of the integral energy. Using the chain rule this leads to:
\(E^{diff}_{ads} = E^{avg} + \theta \frac{dE^{avg}}{d\theta} \)
This leads to:
\(E^{diff}_{ads} = E^{avg}_{ads} + \theta (4 p0 \theta^3 + 3 p1 \theta^2 + 2 p2 \theta) \)
which finally results in:
\(E^{diff}_{ads} = E^{avg}_{ads} + 4 p0 \theta^4 + 3 p1 \theta^3 + 2 p2 \theta^2 \)
#+BEGIN_SRC python
from scipy.io import loadmat, savemat
from scipy.integrate import odeint
from scipy.optimize import leastsq
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['figure.figsize'] = (3,4);
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.91;
rcParams['figure.subplot.right'] = 0.9;
rcParams['figure.subplot.left'] = 0.22;
rcParams['axes.labelsize'] = 12;
rcParams['legend.fontsize'] = 11
data = loadmat('analysis/coverage-normalized.mat')
# Here is the ode that simulates 2nd order desorption with coverage dependent adsorption energy
def myodefunc(theta, T, alpha, kappa):
kb = 8.617e-5; # gas constant
beta = 2 # heating rate
p0 = 2.6770;
p1 = -5.6372;
p2 = 4.1292;
p3 = -4.1488;
avg_Eads = p0 * theta**4 + p1 * theta**3 + p2 * theta**2 + p3;
int_Eads = theta * avg_Eads
diff_Eads = avg_Eads + (4 * p1 * theta**4
+ 3 * p1 * theta**3
+ 2 * p2 * theta**2)
Ed = alpha * diff_Eads + kappa
k = 3*10**12*np.exp(-Ed/kb/T) # rate constant for desorption
dthetadT = -k / beta * theta**2
return dthetadT
plt.figure()
axe = plt.subplot(111)
axe.yaxis.set_major_formatter(plt.ScalarFormatter(useMathText=True))
SSE = 0
for i in range(16):
theta0 = data['theta0'][0,i]
T = data['T'][0,i][0]
M = data['M'][0,i][0]
# initial parameters
alpha, kappa = [-0.46295336, 0.01384663]
X, infodict = odeint(myodefunc, theta0,
T, args=(alpha, kappa),
full_output=True)
# this is the solution
theta = X[:,0].T
## ### now, plot
## ##
sim = -myodefunc(theta,T,alpha, kappa)
plt.plot(T,M,'k')
plt.plot(T, sim,'r')
plt.ylim([0, 2.5e-3])
plt.legend(['Experimental','Simulated'])
SSE += np.sum((M - sim)**2)
print 'SSE = {0}'.format(SSE)
plt.xlabel('Temperature (K)')
plt.ylabel('Desorption rate (ML/K)')
for ext in ['png','eps','pdf']:
plt.savefig('figures/fig6.{0}'.format(ext), dpi=300)
plt.show()
#+END_SRC
#+RESULTS:
: SSE = 6.17295283732e-06
[[./figures/fig6.png]]
*** Figure 7
#+BEGIN_SRC python :var data=linear-fits :colnames yes
from numpy import *
import scipy.io
from pylab import *
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['figure.figsize'] = (3,4);
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.95;
rcParams['figure.subplot.right'] = 0.95;
rcParams['figure.subplot.left'] = 0.22;
rcParams['axes.labelsize'] = 12;
rcParams['legend.fontsize']=12
avgb = average(array(data)[2:,0])
avgm = average(array(data)[2:,1])
theta = np.linspace(0, 0.25)
for b,m in data[2:]:
h1 = plot(theta, b + m*theta, 'b-')
h1[-1].set_label('Fits')
h2 = plot(theta, avgb + avgm*theta, 'k--',label='Average')
p0 = 2.6770;
p1 = -5.6372;
p2 = 4.1292;
p3 = -4.1488;
alpha, kappa = [-0.46295336, 0.01384663]
avg_Eads = p0 * theta**4 + p1 * theta**3 + p2 * theta**2 + p3;
int_Eads = theta * avg_Eads
diff_Eads = avg_Eads + (4 * p1 * theta**4
+ 3 * p1 * theta**3
+ 2 * p2 * theta**2)
Ed = (alpha * diff_Eads + kappa)
plot(theta, Ed, 'r-', lw=2, label='DFT based')
legend(loc='best')
xlabel('Coverage (ML)')
ylabel('$E_d$ (eV)')
subplots_adjust(left=0.25, right=0.93)
xticks([0, 0.07, 0.15, 0.25])
for ext in ['png','eps','pdf']:
savefig('figures/fig7.{0}'.format(ext), dpi=300)
show()
#+END_SRC
#+RESULTS:
[[./figures/fig7.png]]
*** Figure 8
#+BEGIN_SRC python
#!/usr/bin/env python
import sys
import matplotlib
from pylab import *
import matplotlib
rcParams['font.size'] = 12
rcParams['axes.formatter.limits'] = -3,4;
rcParams['figure.figsize'] = (3,4);
rcParams['lines.linewidth'] = 2;
rcParams['lines.markersize'] = 7;
rcParams['figure.subplot.bottom'] = 0.12;
rcParams['figure.subplot.top'] = 0.95;
rcParams['figure.subplot.right'] = 0.95;
rcParams['figure.subplot.left'] = 0.22;
rcParams['axes.labelsize'] = 12;
rcParams['legend.fontsize']=12
#DFT Simulated Barriers in Alphabetical Order these are the avg E_ads
# at theta=0, which is equivalent to the differential adsorption
# energy
dftEnergies = [-3.531, # Ag
-3.033, # Au
-4.706, # Ir
-4.311, # Pd
-4.149, # Pt
-5.052] # Rh
alpha, kappa = [-0.46295336, 0.01384663]
dftBarriers = [alpha * energy + kappa for energy in dftEnergies]
#Experimental Barriers in alphabetical order, multiple barriers per metal
expBarriers = [[1.73, 1.32],
[1.68, 1.42, 1.18],
[2.82, 2.43],
[2.3, 2.18],
[1.9],
[2.43, 2.43, 3.69]]
#Mean of experimental barriers in alphabetical order
expMeanBarriers = [1.52,
1.43,
2.62,
2.24,
1.9,
2.85]
#95%Confidence intervals for each metal in alphabetical order
simErrors = [0.1220,
0.0708,
0.0635,
0.0914,
0.0704,
0.0797];
#95% Confidence intervals for experimental barriers in alphabetical order
expErrors = [0.73,
0.37,
0.59,
0.18,
0,
1.09];
#Order of Metals with number equal to alphabetical order
metalOrder = [1, 0, 4, 3, 5, 2];
#Metals in alphabetical order
metalList = ['Ag','Au','Ir','Pd','Pt','Rh']
metalNameList = [];
simPlotBarrier = [];
expPlotBarrier = [];
for l in range(len(metalOrder)):
i = metalOrder[l];
j = [];
for k in range(len(expBarriers[i])):
j.append(l);
plot(l,dftBarriers[i],color='red',marker='o')
plot(j,expBarriers[i],color='black',marker='o');
errorbar(l,expMeanBarriers[i],yerr=expErrors[i],color='black');
errorbar(l,dftBarriers[i],yerr=simErrors[i],color='red');
metalNameList.append(metalList[i]);
simPlotBarrier.append(dftBarriers[i]);
expPlotBarrier.append(expMeanBarriers[i]);
expPlot = plot(expPlotBarrier,color='black', label='Experimental');
dftPlot = plot(simPlotBarrier,color='red', label='Estimated');
ylim(ymin = -0.2)
xlim(xmin = -.1,xmax=5.2)
xticks(arange(len(metalList)),metalNameList)
ylabel(r'$E_{des}$ (eV/O)');
xlabel(r'Metal');
legend(['Experimental','Estimated'], loc='lower left')
for ext in ['png','eps','pdf']:
savefig('figures/fig8.{0}'.format(ext), dpi=300)
show()
#+END_SRC
#+RESULTS:
[[./figures/fig8.png]]
** Comparison of our results to recent work by Karp
In the review article by Brown cite:doi:10.1021/cr9700890, they suggest that $E_d = q_{st} - 0.5 R T$ when all properties are temperature independent. In that equation $q_{st}$ is the isosteric heat of adsorption. Karp et al. cite:doi:10.1021/jp3066794 correct their data by the factor $0.5 R T$, and here we check on the magnitude of that correction. The value of T is ambiguous in a TPD, so we chose a low coverage limit of 850 K based on our experiments.
kb = 0.008314 kJ/mol/K = 8.617e-5 eV/K
1 eV = 96.4853 kJ/mol
#+BEGIN_SRC python
k = 8.617e-5
T = 850
print '{0:1.3f} eV'.format(0.5*k*T)
print '{0:1.3f} kJ/mol'.format(0.5*0.008314*T)
#+END_SRC
#+RESULTS:
: 0.037 eV
: 3.533 kJ/mol
The correction is small in magnitude. We estimate a low coverage desorption barrier of 1.925 eV in Figure 7. So the correction is only about 2% of the estimated desorption barrier.
From our work (Figure 7) we estimate the following desorption barriers and here convert them to kJ/mol without the $0.5 R T$ correction factor.
#+BEGIN_SRC python
print 'Zero coverage desorption barrier = {0} kJ/mol'.format(1.925*96.4853)
print '0.25 ML coverage desorption barrier = {0} kJ/mol'.format(1.74*96.4853)
#+END_SRC
#+RESULTS:
: Zero coverage desorption barrier = 185.7342025 kJ/mol
: 0.25 ML coverage desorption barrier = 167.884422 kJ/mol
According to Figure 1 in cite:doi:10.1021/jp3066794, the differential adsorption energy is -217 kJ/mol in the limit of zero coverage, and -179.25 kJ/mol at 0.25 ML. We underestimate these adsorption energies.
#+BEGIN_SRC python
print '%error at 0ML = {0}'.format((-186. - (-217.))/(-217.)*100.)
print '%error at 0.25ML = {0}'.format((-167. - (-217.))/(-217.)*100.)
#+END_SRC
#+RESULTS:
: %error at 0ML = -14.2857142857
: %error at 0.25ML = -23.0414746544
** Leading edge analysis of the TPD spectra of oxygen on Pt(111)
Our aim here is to do a leading edge analysis to estimate a pre-exponential factor and estimate coverage dependence. We follow the analysis at http://www.chemie.fu-berlin.de/~pcprakt/tds.pdf.
We plot $\ln(r_{des})$ vs. $1/T$ for the leading edge, and we should get a line according to:
$\ln(r_{des}) = -\frac{\Delta E_{des}}{RT} + \ln(\nu_n) + n\ln{\theta}$.
From this equation we have:
$\Delta E_{des} = -R*slope$
and $\ln(\nu_n) + n\ln{\theta} = intercept$, so $\nu_n = \exp(intercept - n\ln(\theta))$.
#+BEGIN_SRC python :results output :exports both
from scipy.io import loadmat, savemat
from scipy.integrate import trapz, cumtrapz
from scipy.optimize import curve_fit
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats.distributions import t
data = loadmat('analysis/coverage-normalized.mat')
theta0s, afactors, barriers = [],[],[]
aerr, berr = [],[] # store 95% intervals
for i in range(2,16):
T = data['T'][0,i][0]
M = data['M'][0,i][0]
theta0 = trapz(M,T) # initial coverage
# compute coverage as a function of coverage
theta = np.zeros(T.shape)
for j in range(len(T)):
theta[j] = theta0 - trapz(M[0:j], T[0:j])
# now find region where coverage has changed less than 5%, and the
# desorption rate is sufficiently large to not be noisy (rdes > 1e-10
ind = (theta > 0.95*theta0) & (np.log(M) > -10)
T1 = T[ind]
lnr1 = np.log(M[ind])
# fit a line to get initial guesses
(m,b) = np.polyfit(1/T1, lnr1, 1)
kb = 8.617e-5
# now use the nonlinear fit to get confidence intervals
def func(x, m, b):
return m*x + b
pars, pcov = curve_fit(func, 1/T1, lnr1, p0=[m,b])
alpha = 0.05 # 95% confidence interval
n = len(T1) # number of data points
p = len(pars) # number of parameters
dof = max(0, n-p) # number of degrees of freedom
tval = t.ppf(1.0-alpha/2., dof) # student-t value for the dof and
# confidence level
# barrier
pm, pb = pars
sigmapm = pcov[0,0]**0.5
print ' Spectra {0}: theta0 = {1:1.3f}'.format(i, theta0)
print ' The desorption barrier is {2:1.3f} [{0:1.3f} {1:1.3f}]'.format(-kb*(pm + sigmapm*tval),
-kb*(pm - sigmapm*tval),
-kb*pm)
berr.append(-kb*sigmapm*tval)
# note we do not consider the uncertainty in theta0 in this confidence interval
sigmapb = pcov[1,1]**0.5
a = np.exp(pb - 2*np.log(theta0))
aupper = np.exp((pb + sigmapb*tval) - 2*np.log(theta0))
alower = np.exp((pb - sigmapb*tval) - 2*np.log(theta0))
print 'The preexponential factor is {2:1.3e} [{0:1.3e} {1:1.3e}]'.format(alower,
aupper,
a)
aerr.append((a-alower, aupper-a))
plt.plot(1/T1, lnr1, ' o', label='spectra{0}'.format(i))
plt.plot(1/T1, func(1/T1, pm, pb))
print
theta0s.append(theta0)
afactors.append(a)
barriers.append(-kb*pm)
aerr = np.array(aerr).T
plt.xlabel('1/T (1/K)')
plt.ylabel('$\ln(r_{des})$')
plt.legend(loc='best')
plt.xlim([0.0012, 0.0017])
plt.savefig('analysis/leading-edge-analysis.png', dpi=300)
plt.figure()
plt.semilogy(theta0s, afactors,'bo')
plt.semilogy(theta0s, aerr[0,:],'*')
plt.semilogy(theta0s, aerr[1,:],'*')
plt.xlabel('Initial coverage (ML)')
plt.ylabel('Preexponential factor')
plt.savefig('analysis/LEA-preexponentials.png', dpi=300)
plt.figure()
plt.errorbar(theta0s, barriers, berr, fmt='bo')
plt.xlabel('Initial coverage (ML)')
plt.ylabel('Desorption barrier (eV)')
plt.savefig('analysis/LEA-barriers.png', dpi=300)
#+END_SRC
#+RESULTS:
#+begin_example
Spectra 2: theta0 = 0.056
The desorption barrier is 1.905 [1.640 2.170]
The preexponential factor is 1.064e+12 [1.359e+10 8.328e+13]
Spectra 3: theta0 = 0.083
The desorption barrier is 1.884 [1.769 1.998]
The preexponential factor is 1.174e+12 [1.686e+11 8.173e+12]
Spectra 4: theta0 = 0.102
The desorption barrier is 1.911 [1.809 2.014]
The preexponential factor is 2.418e+12 [4.128e+11 1.416e+13]
Spectra 5: theta0 = 0.136
The desorption barrier is 1.847 [1.764 1.930]
The preexponential factor is 1.348e+12 [3.095e+11 5.874e+12]
Spectra 6: theta0 = 0.156
The desorption barrier is 1.840 [1.760 1.919]
The preexponential factor is 1.631e+12 [3.891e+11 6.836e+12]
Spectra 7: theta0 = 0.169
The desorption barrier is 1.885 [1.802 1.968]
The preexponential factor is 4.315e+12 [9.538e+11 1.952e+13]
Spectra 8: theta0 = 0.187
The desorption barrier is 1.858 [1.735 1.982]
The preexponential factor is 3.026e+12 [3.165e+11 2.893e+13]
Spectra 9: theta0 = 0.191
The desorption barrier is 1.861 [1.770 1.951]
The preexponential factor is 3.370e+12 [6.361e+11 1.785e+13]
Spectra 10: theta0 = 0.193
The desorption barrier is 1.873 [1.772 1.975]
The preexponential factor is 4.439e+12 [6.843e+11 2.880e+13]
Spectra 11: theta0 = 0.154
The desorption barrier is 1.804 [1.723 1.885]
The preexponential factor is 6.769e+11 [1.594e+11 2.874e+12]
Spectra 12: theta0 = 0.197
The desorption barrier is 1.875 [1.788 1.963]
The preexponential factor is 2.614e+12 [5.333e+11 1.281e+13]
Spectra 13: theta0 = 0.228
The desorption barrier is 1.858 [1.809 1.907]
The preexponential factor is 3.330e+12 [1.334e+12 8.317e+12]
Spectra 14: theta0 = 0.235
The desorption barrier is 1.904 [1.815 1.993]
The preexponential factor is 9.156e+12 [1.745e+12 4.803e+13]
Spectra 15: theta0 = 0.238
The desorption barrier is 1.875 [1.797 1.952]
The preexponential factor is 5.790e+12 [1.367e+12 2.453e+13]
#+end_example
Leading edge analysis. The lines are the best fits to the data.
[[./analysis/leading-edge-analysis.png]]
Pre-exponential factors with 95%% confidence interval indicated by the stars. The errorbars are not symmetric due to the nonlinear transform of the confidence interval on the intercept to a pre-exponential factor.
[[./analysis/LEA-preexponentials.png]]
Coverage dependent desorption barriers with 95% confidence intervals.
[[./analysis/LEA-barriers.png]]
The main takeaway points are that one cannot say with 95% certainty there is coverage dependence based on the leading edge analysis. The desorption barrier is about 1.85 eV. The pre-exponential factor is in the range of 1e12 to 1e13 over the whole coverage range.
** Preparation of the TPD data
*** Convert the raw data in Excel sheets to tables for analysis here.
Here we convert the Excel sheets to org-tables that store the data in this file. This will enable others to reproduce the results here without access to the Excel files. It is not necessary to include the data in this form; the Excel sheets could also be included as supplementary data. Including them here makes this document completely portable. This is the only script a reader cannot run without access to the Excel sheets.
#+BEGIN_SRC python :results output raw
import xlrd
exposures = []
for i in range(1,21):
wb = xlrd.open_workbook('xls/tpd{0}.xls'.format(i))
sh = wb.sheet_by_name(u'Sheet1')
# there is header information in row 0
T = sh.col_values(0,start_rowx=1) #temperature
I = sh.col_values(1,start_rowx=1) #intensity
# this is in the header of the second column
# exposures are in Langmuirs
exposure = sh.cell(rowx=0,colx=1).value
exposures.append(exposure)
# the goal is to write out a table
print '**** tpd{0} data'.format(i)
print '#+ATTR_LaTeX: longtable'
print '#+tblname: tpd{0}'.format(i)
print '| Temperature (K)| M.S. intensity (arb. units)|'
print '|-'
for t,i in zip(T,I):
print '|{0}|{1}|'.format(t,i)
print
# now we need to make a table of exposures
print '**** exposures'
print '#+tblname: exposures'
print '|spectrum number | exposure (L)'
print '|-'