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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 20 - Statistical thermodynamics"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example I1 - Pg 477"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the relative populations of boat and chair conformations\n",
"#Initialization of variables\n",
"import math\n",
"E=22*1000. #kJ/mol\n",
"T=293. #K \n",
"#calculations\n",
"ratio=math.pow(math.e,(-E/(8.31451*T)))\n",
"#results\n",
"print '%s %.1e' %(\"Relative populations of boat and chair conformations is \",ratio)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Relative populations of boat and chair conformations is 1.2e-04\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example I2 - Pg 478"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the required ratio\n",
"#Initialization of variables\n",
"import math\n",
"g2=5.\n",
"g1=3.\n",
"E2=6.\n",
"E1=2.\n",
"k=1.38*math.pow(10,-23) #J/K\n",
"h=6.626*math.pow(10,-34) #J s\n",
"B=3.18*math.pow(10,11) #Hz\n",
"T =298 #K\n",
"#calculations\n",
"ratio=g2/g1 *(math.pow(math.e,((E1-E2)*h*B/(k*T))))\n",
"#results\n",
"print '%s %.2f' %(\"Ratio= \",ratio)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Ratio= 1.36\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example I3 - Pg 481"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the translational partition function\n",
"#Initialization of variables\n",
"import math\n",
"T=298 #K\n",
"m=32*1.66054*math.pow(10,-27) #kg\n",
"k=1.38066*math.pow(10,-23) #j/k\n",
"V=math.pow(10,-4) #m^3\n",
"h=6.62608*math.pow(10,-34) #J/s\n",
"#calculations\n",
"q=math.pow((2*math.pi*m*k*T),1.5) *V/h/h/h \n",
"#results\n",
"print '%s %.2e' %(\"Translational partition function = \",q)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Translational partition function = 1.75e+28\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E1 - Pg 479"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the partition function at 20 C\n",
"#Initialization of variables\n",
"import math\n",
"E=22 #kJ/mol\n",
"R=8.214 #J/K mol\n",
"T=293 #K\n",
"#Calculations\n",
"q=1+math.pow(math.e,(-E*1000. /(R*T)))\n",
"#results\n",
"print '%s %.4f' %(\"At 20 C, partition function = \",q)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"At 20 C, partition function = 1.0001\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E3 - Pg 485"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the contribution to rotational motion\n",
"#Initialization of variables\n",
"import math\n",
"k=1.38*math.pow(10,-23) #J/K\n",
"h=6.626*math.pow(10,-34) #J s\n",
"B=3.18*math.pow(10,11) #Hz\n",
"T=298 #K\n",
"R=8.314 #J/K mol\n",
"#calculations\n",
"Sm=R*(1+math.log(k*T/(h*B)))\n",
"#results\n",
"print '%s %.1f %s' %(\"Contribution to rotational motion=\",Sm,\"J/ K mol\")\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Contribution to rotational motion= 33.0 J/ K mol\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E5 - Pg 488"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the Equilibrium constant\n",
"#Initialization of variables\n",
"import math\n",
"me=9.10939*math.pow(10,-31) #kg\n",
"k=1.38*math.pow(10,-23) #J/K\n",
"h=6.626*math.pow(10,-34) #J s\n",
"p=math.pow(10,5) #Pa\n",
"T=1000 #K\n",
"R=8.314 #J/K mol\n",
"I=376*1000. #J/mol\n",
"#calculations\n",
"K=math.pow((2*math.pi*me),1.5) *math.pow((k*T),2.5) /(p*h*h*h) *math.pow(math.e,(-I/(R*T)))\n",
"#results\n",
"print '%s %.2e' %(\"Equilibrium constant = \",K)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Equilibrium constant = 2.41e-19\n"
]
}
],
"prompt_number": 6
}
],
"metadata": {}
}
]
}
|