-
Notifications
You must be signed in to change notification settings - Fork 1
/
Martin_PC_from_Rackett.m
196 lines (141 loc) · 4.44 KB
/
Martin_PC_from_Rackett.m
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
clear
TR = 0.9;
% TraPPE literature
NC = zeros(1,6);
T = zeros(6,6);
pv = zeros(6,6);
pL = zeros(6,6);
sv = zeros(6,6);
sL = zeros(6,6);
i = 1;
% 1-octanol data, use beta = 0.29
% NC(i) = 8;
%
% T(:,i) = [300 350 400 450 500 550 600];
% pv(:,i) = [0.00000081 0.000034 0.00050 0.0030 0.0107 0.029 0.063];
% pL(:,i) = [0.824 0.789 0.743 0.698 0.640 0.572 0.469];
% sv(:,i) = [0.00000003 0.000006 0.00006 0.0002 0.0003 0.002 0.003];
% sL(:,i) = [0.002 0.002 0.002 0.002 0.002 0.003 0.006];
% pentanal data
% NC(i) = 5;
%
% T(:,i) = [300 340 380 420 460 500 540];
% pv(:,i) = [0.00021 0.00109 0.00369 0.00961 0.02189 0.04619 0.09955];
% pL(:,i) = [0.8145 0.7762 0.7320 0.6872 0.6367 0.5729 0.4767];
% sv(:,i) = [0.00000003 0.000006 0.00006 0.0002 0.0003 0.002 0.003];
% sL(:,i) = [0.002 0.002 0.002 0.002 0.002 0.003 0.006];
% C2 verification data
% NC(i) = 2;
%
% T(:,i) = [178 197 217 256 275 279 283 288];
% pv(:,i) = [0.0023 0.0053 0.0111 0.0350 0.0598 0.0648 0.0739 0.090];
% pL(:,i) = [0.5512 0.5262 0.4984 0.4342 0.3937 0.3835 0.3726 0.3589];
% sv(:,i) = [0.0001 0.0001 0.0001 0.0003 0.0003 0.0005 0.0009 0.002];
% sL(:,i) = [0.0001 0.0001 0.0001 0.0002 0.0003 0.0004 0.0003 0.0006];
% i=i+1;
% Martin's alkane data
PC_Martin = [5.1, 4.4, 4.1, 3.7, 2.7, 2.3];
PC_Martin_error = [0.4, 0.1, 0.4, 0.1, 0.3, 0.2]*1.96;
% The weighted results, using reported TC values
PC_rigorous = [4.915, 4.3887, 4.1515, 3.7075, 2.7994, 2.1882];
% The rigorous errors from a weighted parameter search (only using reported
% TC values)
PC_rigorous_low = [0.8582, 0.5862, 0.5424, 0.7339, 0.7582, 0.3069];
PC_rigorous_high = [0.9606, 0.6153, 0.5753, 0.8047, 0.8828, 0.3409];
PC_exp = [4.9, 4.3, 3.8, 3.4, 2.5, 1.8];
% C2
NC(i) = 2;
T(:,i) = [178 197 217 236 256 275];
pv(:,i) = [0.0022 0.0056 0.0100 0.020 0.031 0.056];
pL(:,i) = [0.551 0.527 0.499 0.469 0.432 0.396];
sv(:,i) = [0.0001 0.0005 0.0003 0.002 0.004 0.008];
sL(:,i) = [0.001 0.002 0.001 0.002 0.005 0.005];
i=i+1;
% C3
NC(i) = 3;
T(:,i) = [0 217 249 281 312 344];
pv(:,i) = [0 0.0020 0.0063 0.018 0.033 0.066];
pL(:,i) = [0 0.598 0.560 0.517 0.467 0.396];
sv(:,i) = [0 0.0002 0.0003 0.001 0.002 0.004];
sL(:,i) = [0 0.001 0.001 0.002 0.0030 0.008];
i=i+1;
% C4
NC(i) = 4;
T(:,i) = [0 262 295 327 360 392];
pv(:,i) = [0 0.0030 0.0073 0.019 0.038 0.065];
pL(:,i) = [0 0.613 0.576 0.536 0.486 0.427];
sv(:,i) = [0 0.0006 0.0008 0.003 0.007 0.005];
sL(:,i) = [0 0.002 0.002 0.002 0.003 0.008];
i=i+1;
% C5
NC(i) = 5;
T(:,i) = [0 298 336 372 402 439];
pv(:,i) = [0 0.0032 0.0097 0.019 0.041 0.068];
pL(:,i) = [0 0.623 0.584 0.539 0.500 0.418];
sv(:,i) = [0 0.0001 0.0005 0.001 0.002 0.003];
sL(:,i) = [0 0.001 0.002 0.002 0.003 0.013];
i=i+1;
% C8
NC(i) = 8;
T(:,i) = [0 390 440 490 515 540];
pv(:,i) = [0 0.0039 0.0129 0.028 0.054 0.078];
pL(:,i) = [0 0.624 0.574 0.505 0.473 0.425];
sv(:,i) = [0 0.0005 0.0006 0.004 0.006 0.017];
sL(:,i) = [0 0.002 0.004 0.004 0.005 0.014];
i=i+1;
% C12
NC(i) = 12;
T(:,i) = [0 450 500 550 585 620];
pv(:,i) = [0 0.0022 0.0077 0.018 0.035 0.059];
pL(:,i) = [0 0.633 0.592 0.537 0.497 0.437];
sv(:,i) = [0 0.0004 0.0006 0.001 0.003 0.004];
sL(:,i) = [0 0.002 0.001 0.004 0.006 0.017];
for j=1:i
if T(1,j) == 0
T_j = T(2:6,j);
pv_j = pv(2:6,j);
pL_j = pL(2:6,j);
else
T_j = T(:,j);
pv_j = pv(:,j);
pL_j = pL(:,j);
end
[TC(j),pc(j),A(j),b(j)] = towhee_error_model(T_j,pv_j,pL_j);
MW(j) = 12.0107*NC(j)+1.00794*(2*NC(j)+2);
[PC_low(j), PC_high(j)] = rigorous_statistics_PC(T_j,pv_j,pL_j,MW(j),TR);
% hold
% scatter(T_j,pL_j)
% hold
end
% MW = MW + 15.9994; % For alcohols
% MW = MW + 15.9994 - 2*1.00794; %For aldehydes
VC = MW./pc;
PC = PC_from_Rackett(TC,pc,VC,A,b,TR);
PC_error_low = PC-PC_low;
PC_error_high = PC_high-PC;
hold
errorbar(NC(NC~=0),PC,PC_error_low,PC_error_high,'b')
errorbar(NC(NC~=0),PC_Martin,PC_Martin_error,'r')
errorbar(NC(NC~=0),PC_rigorous,PC_rigorous_low,PC_rigorous_high,'c')
scatter(NC(NC~=0),PC_exp,'g')
hold
% for TR = 0.3:0.001:0.99
%
% PC = PC_from_Rackett(TC,pc,VC,A,b,TR);
%
% % hold
% % plot(TR,PC)
% % hold
%
% % hold
% % scatter(NC(NC~=0),PC)
% % hold
%
% end
% NC_plot = 5:1:15;
%
% PC_Nik = 215.84*NC_plot.^(-3/2) - 646.58 * NC_plot.^(-2) + 555.06 * NC_plot.^(-5/2);
%
% hold
% plot(NC_plot,PC_Nik)
% hold