#calculate the relative populations of boat and chair conformations
#Initialization of variables
import math
E=22*1000. #kJ/mol
T=293. #K
#calculations
ratio=math.pow(math.e,(-E/(8.31451*T)))
#results
print '%s %.1e' %("Relative populations of boat and chair conformations is ",ratio)
#calculate the required ratio
#Initialization of variables
import math
g2=5.
g1=3.
E2=6.
E1=2.
k=1.38*math.pow(10,-23) #J/K
h=6.626*math.pow(10,-34) #J s
B=3.18*math.pow(10,11) #Hz
T =298 #K
#calculations
ratio=g2/g1 *(math.pow(math.e,((E1-E2)*h*B/(k*T))))
#results
print '%s %.2f' %("Ratio= ",ratio)
#calculate the translational partition function
#Initialization of variables
import math
T=298 #K
m=32*1.66054*math.pow(10,-27) #kg
k=1.38066*math.pow(10,-23) #j/k
V=math.pow(10,-4) #m^3
h=6.62608*math.pow(10,-34) #J/s
#calculations
q=math.pow((2*math.pi*m*k*T),1.5) *V/h/h/h
#results
print '%s %.2e' %("Translational partition function = ",q)
#calculate the partition function at 20 C
#Initialization of variables
import math
E=22 #kJ/mol
R=8.214 #J/K mol
T=293 #K
#Calculations
q=1+math.pow(math.e,(-E*1000. /(R*T)))
#results
print '%s %.4f' %("At 20 C, partition function = ",q)
#calculate the contribution to rotational motion
#Initialization of variables
import math
k=1.38*math.pow(10,-23) #J/K
h=6.626*math.pow(10,-34) #J s
B=3.18*math.pow(10,11) #Hz
T=298 #K
R=8.314 #J/K mol
#calculations
Sm=R*(1+math.log(k*T/(h*B)))
#results
print '%s %.1f %s' %("Contribution to rotational motion=",Sm,"J/ K mol")
#calculate the Equilibrium constant
#Initialization of variables
import math
me=9.10939*math.pow(10,-31) #kg
k=1.38*math.pow(10,-23) #J/K
h=6.626*math.pow(10,-34) #J s
p=math.pow(10,5) #Pa
T=1000 #K
R=8.314 #J/K mol
I=376*1000. #J/mol
#calculations
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)))
#results
print '%s %.2e' %("Equilibrium constant = ",K)