# 9: Molecular spectra¶

## Example number 9.1, Page number 172¶

In [3]:
#importing modules
import math
from __future__ import division

#Variable declaration
twoB=3.8626;   #average spacing(per cm)
h=6.626*10**-34;    #planck's constant(Js)
c=3*10**8;    #speed of light(m/s)
mC=0.012;   #isotopic mass of C(kg/mol)
mO=0.016;   #isotopic mass of O(kg/mol)

#Calculation
B=(twoB/2)*100;   #average spacing(per m)
I=h/(8*math.pi**2*B*c);
mew=mC*mO/((mC+mO)*NA);   #reduced mass(kg)
r=math.sqrt(I/mew);   #bond length(m)

#Result
print "bond length is",round(r*10**10,3),"*10**-10 m"

bond length is 1.128 *10**-10 m


## Example number 9.2, Page number 173¶

In [5]:
#importing modules
import math
from __future__ import division

#Variable declaration
T=300;    #temperature(K)
k=1.38*10**-23;   #boltzmann constant(J/K)
h=6.626*10**-34;    #planck's constant(Js)
c=3*10**8;    #speed of light(m/s)
lamda=10**-2;    #wavelength(m)

#Calculation
E=3*k*T/2;    #kinetic energy(J)
deltaE=h*c/lamda;   #energy seperation(J)

#Result
print "kinetic energy is",E,"J"
print "energy seperation is",round(deltaE*10**23),"*10**-23 J"
print "deltaE is much smaller than E. hence substantial number of molecules will be there"

kinetic energy is 6.21e-21 J
energy seperation is 2.0 *10**-23 J
deltaE is much smaller than E. hence substantial number of molecules will be there


## Example number 9.3, Page number 175¶

In [10]:
#importing modules
import math
from __future__ import division

#Variable declaration
ff=1876.06;    #frequency of fundamental(per cm)
fo=3724.2;     #frequency of 1st overtone(per cm)

#Calculation
#ff=vebar*(1-(2*xe)) and fo=2*vebar*(1-(3*xe)). on solcing we get
vebar=1903.98;   #equilibrium vibration frequency(per cm)
xe=7.33*10**-3;   #anharmonicity constant
E=vebar/2;   #zero point energy(per cm)

#Result
print "equilibrium vibration frequency is",vebar,"per cm"
print "anharmonicity constant is",round(xe*10**3,2),"*10**-3"
print "zero point energy is",round(E),"per cm"

equilibrium vibration frequency is 1903.98 per cm
anharmonicity constant is 7.33 *10**-3
zero point energy is 952.0 per cm


## Example number 9.4, Page number 175¶

In [12]:
#importing modules
import math
from __future__ import division

#Variable declaration
m=1.67*10**-27;    #mass of proton(kg)
m1=1.0087;    #mass of 1H(u)
m2=35.453;    #mass of Cl(u)
c=3*10**8;    #velocity of light(m/sec)
lamda0=3.465*10**-6;   #wavelength(m)

#Calculation
mew=m*m1*m2/(m1+m2);     #reduced mass(kg)
k=4*math.pi**2*mew*(c/lamda0)**2;   #force constant(N/m)

#Result
print "force constant is",round(k,1),"N/m"
print "answer varies due to rounding off errors"

force constant is 484.7 N/m
answer varies due to rounding off errors


## Example number 9.5, Page number 187¶

In [15]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamdae=4358.3*10**-8;      #excited wavelength(cm)
lamda=4768.5*10**-8;    #wavelength(cm)

#Calculation
wne=1/lamdae;    #wave number of exciting radiation(per cm)
wn=1/lamda;   #wave number of Raman line(per cm)
new=wne-wn;   #vibrational frequency(per cm)

#Result
print "vibrational frequency is",round(new),"per cm"

vibrational frequency is 1974.0 per cm


## Example number 9.6, Page number 188¶

In [18]:
#importing modules
import math
from __future__ import division

#Variable declaration
h=6.626*10**-34;    #planck's constant(Js)
c=3*10**8;    #speed of light(m/s)
sixB=346;   #1st rotational Raman line(per cm)
m1=1.673*10**-27;    #mass of proton(kg)

#Calculation
m2=m1;
B=(sixB/6)*100;   #average spacing(per m)
I=h/(8*math.pi**2*B*c);
mew=m1*m2/(m1+m2);   #reduced mass(kg)
r=math.sqrt(I/mew);   #bond length(m)

#Result
print "bond length is",round(r*10**10,3),"*10**-10 m"

bond length is 0.762 *10**-10 m


## Example number 9.7, Page number 193¶

In [20]:
#importing modules
import math
from __future__ import division

#Variable declaration
gN=5.585;    #value of gN
h=6.626*10**-34;    #planck's constant(Js)
new=120*10**6;   #frequency(Hz)
mewn=5.0508*10**-27;

#Calculation
B0=h*new/(gN*mewn);    #magnetic field strength(T)

#Result
print "magnetic field strength is",round(B0,3),"T"

magnetic field strength is 2.819 T


## Example number 9.8, Page number 194¶

In [24]:
#importing modules
import math
from __future__ import division

#Variable declaration
gN=5.585;    #value of gN
h=6.626*10**-34;    #planck's constant(Js)
mewn=5.0508*10**-27;
B0=1.65;    #magnetic field(T)
new=510*10**6;   #frequency separation(Hz)

#Calculation
new0=gN*mewn*B0/h;
delta=new/new0;    #chemical shift(ppm)

#Result
print "chemical shift is",round(delta,2),"ppm"

chemical shift is 7.26 ppm


## Example number 9.10, Page number 198¶

In [26]:
#importing modules
import math
from __future__ import division

#Variable declaration
h=6.626*10**-34;    #planck's constant(Js)
new=35*10**9;    #frequency(Hz)
mewB=9.27*10**-24;
B0=1.3;    #magnetic field(T)

#Calculation
g=h*new/(mewB*B0);   #electron g-factor

#Result
print "electron g-factor is",round(g,3)

electron g-factor is 1.924