# 2: Molecular Spectroscopy¶

## Example number 1, Page number 56¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
h=6.62*10**-34;        #planck's constant
I=1.46*10**-46;        #moment of inertia(kg-m**2)
e=1.6*10**-19;      #charge(coulomb)

#Calculations
Er=2*(h**2)/(8*math.pi**2*I*e);        #energy(eV)

#Result
print "energy is",round(Er*10**4,2),"*10**-4 eV"
print "answer in the book varies due to rounding off errors"

energy is 4.75 *10**-4 eV
angular velocity is 10.21 *10**11 rad/sec
answer in the book varies due to rounding off errors


## Example number 2, Page number 62¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
h=6.63*10**-34;        #planck's constant
K=187;       #force constant(N/m)
mew=1.14*10**-26;         #reduced mass(kg)
c=6.242*10**18;       #conversion factor

#Calculations
vnew=math.sqrt(K/mew)/(2*math.pi);          #frequency of vibration(Hertz)
delta_E=h*vnew;        #spacing between energy levels(J)
delta_E=delta_E*c;        #spacing between energy levels(eV)

#Result
print "frequency of vibration is",round(vnew/10**13,2),"*10**13 Hertz"
print "spacing between energy levels is",round(delta_E*10**2,2),"*10**-2 eV"

frequency of vibration is 2.04 *10**13 Hertz
spacing between energy levels is 8.44 *10**-2 eV


## Example number 3, Page number 68¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
lamda0=5460*10**-8;      #wavelength(cm)
lamdas=5520*10**-8;      #wavelength(cm)

#Calculations
new0=1/lamda0;       #frequency(cm-1)
news=1/lamdas;       #frequency(cm-1)
delta_new=new0-news;        #difference in frequency(cm-1)
new_as=delta_new+new0;      #frequency of anti-stokes line(cm-1)
lamda_as=1*10**8/new_as;          #wavelength of antistokes line(angstrom)

#Result
print "wavelength of antistokes line",int(lamda_as),"angstrom"

wavelength of antistokes line 5401 angstrom


## Example number 4, Page number 68¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
lamda0=4358*10**-10;      #wavelength(m)
lamda1=4447*10**-10;      #wavelength(m)

#Calculations
new0=1/lamda0;       #frequency(m-1)
new1=1/lamda1;       #frequency(m-1)
rs=new0-new1;        #raman shift(m-1)
new_as=new0+rs;      #frequency of anti-stokes line(cm-1)
lamda_as=1*10**10/new_as;          #wavelength of antistokes line(angstrom)

#Result
print "raman shift is",round(rs/10**2,1),"*10**2 m-1"
print "wavelength of antistokes line",round(lamda_as,1),"angstrom"

raman shift is 459.2 *10**2 m-1
wavelength of antistokes line 4272.5 angstrom


## Example number 5, Page number 71¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
K1=4141.3;         #wave number of HF(cm-1)
K2=2988.9;         #wave number of HCl(cm-1)
K3=2309.5;         #wave number of HI(cm-1)
c=1;              #assume as common factor in ratio

#Calculations
a=(K2/K1)**2;       #ratio of wave numbers of HF and HCl
b=(K3/K1)**2;       #ratio of wave numbers of HF and HI

#Result
print "ratio of wave numbers is",c,":",round(a,2),":",round(b,2)

ratio of wave numbers is 1 : 0.52 : 0.31