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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2: Molecular Spectroscopy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example number 1, Page number 56"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"energy is 4.75 *10**-4 eV\n",
"angular velocity is 10.21 *10**11 rad/sec\n",
"answer in the book varies due to rounding off errors\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"h=6.62*10**-34; #planck's constant\n",
"I=1.46*10**-46; #moment of inertia(kg-m**2)\n",
"e=1.6*10**-19; #charge(coulomb)\n",
"\n",
"#Calculations\n",
"Er=2*(h**2)/(8*math.pi**2*I*e); #energy(eV)\n",
"omega=math.sqrt(2*Er*e/I); #angular velocity(rad/sec)\n",
"\n",
"#Result\n",
"print \"energy is\",round(Er*10**4,2),\"*10**-4 eV\"\n",
"print \"angular velocity is\",round(omega*10**-11,2),\"*10**11 rad/sec\"\n",
"print \"answer in the book varies due to rounding off errors\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example number 2, Page number 62"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"frequency of vibration is 2.04 *10**13 Hertz\n",
"spacing between energy levels is 8.44 *10**-2 eV\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"h=6.63*10**-34; #planck's constant\n",
"K=187; #force constant(N/m)\n",
"mew=1.14*10**-26; #reduced mass(kg)\n",
"c=6.242*10**18; #conversion factor\n",
"\n",
"#Calculations\n",
"vnew=math.sqrt(K/mew)/(2*math.pi); #frequency of vibration(Hertz)\n",
"delta_E=h*vnew; #spacing between energy levels(J)\n",
"delta_E=delta_E*c; #spacing between energy levels(eV)\n",
"\n",
"#Result\n",
"print \"frequency of vibration is\",round(vnew/10**13,2),\"*10**13 Hertz\"\n",
"print \"spacing between energy levels is\",round(delta_E*10**2,2),\"*10**-2 eV\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example number 3, Page number 68"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"wavelength of antistokes line 5401 angstrom\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"lamda0=5460*10**-8; #wavelength(cm)\n",
"lamdas=5520*10**-8; #wavelength(cm)\n",
"\n",
"#Calculations\n",
"new0=1/lamda0; #frequency(cm-1)\n",
"news=1/lamdas; #frequency(cm-1)\n",
"delta_new=new0-news; #difference in frequency(cm-1)\n",
"new_as=delta_new+new0; #frequency of anti-stokes line(cm-1)\n",
"lamda_as=1*10**8/new_as; #wavelength of antistokes line(angstrom)\n",
"\n",
"#Result\n",
"print \"wavelength of antistokes line\",int(lamda_as),\"angstrom\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example number 4, Page number 68"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"raman shift is 459.2 *10**2 m-1\n",
"wavelength of antistokes line 4272.5 angstrom\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"lamda0=4358*10**-10; #wavelength(m)\n",
"lamda1=4447*10**-10; #wavelength(m)\n",
"\n",
"#Calculations\n",
"new0=1/lamda0; #frequency(m-1)\n",
"new1=1/lamda1; #frequency(m-1)\n",
"rs=new0-new1; #raman shift(m-1)\n",
"new_as=new0+rs; #frequency of anti-stokes line(cm-1)\n",
"lamda_as=1*10**10/new_as; #wavelength of antistokes line(angstrom)\n",
"\n",
"#Result\n",
"print \"raman shift is\",round(rs/10**2,1),\"*10**2 m-1\"\n",
"print \"wavelength of antistokes line\",round(lamda_as,1),\"angstrom\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example number 5, Page number 71"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ratio of wave numbers is 1 : 0.52 : 0.31\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"K1=4141.3; #wave number of HF(cm-1)\n",
"K2=2988.9; #wave number of HCl(cm-1)\n",
"K3=2309.5; #wave number of HI(cm-1)\n",
"c=1; #assume as common factor in ratio\n",
"\n",
"#Calculations\n",
"a=(K2/K1)**2; #ratio of wave numbers of HF and HCl\n",
"b=(K3/K1)**2; #ratio of wave numbers of HF and HI\n",
"\n",
"#Result\n",
"print \"ratio of wave numbers is\",c,\":\",round(a,2),\":\",round(b,2)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|