Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Portfolio for PChem

Views: 2297
Kernel: Python 3 (Anaconda 2019)

Physical Chemistry Fall 2017 Portfolio by Marissa Hedlund

The purpose of this site is to present a collection of artifacts that demonstrate the mastery of learning outcomes outlined in the course syllabus for CHM-341 instructed by Dr. Steve Singleton at Coe College. The major course content areas include kinetics, quantum mechanics, and spectroscopy. The fundamentals of each content area will be represented through course assignments and otherwise herein.

Coe College Mission Statement:

"It is the mission of Coe College to provide students an education of superior quality that aims at preparing them for life following graduation. Our reason to exist as an institution is to ready students intellectually, professionally, and socially to lead productive and satisfying lives in the global society of the 21st century. As such, our success as a College will be measured according to the success of our graduates..."

About Me

My name is Marissa Hedlund and I am a Physics & Chemistry double major at Coe College. I have studied semiconducting Cu-Te-V oxide glasses under Prof. Mario Affatigato for a little over a year, specifically trying to understand how their structural characteristics may affect conductivity. This past summer (2017), I was a part of Dr. Martin St. Clair's water quality research team, and while it was great to work out in the field, I plan on pursuing a Ph.D. in either solar materials or a renewable energy-related discipline. I have always been really passionate about the environment and sustainability, so my ultimate goal is to have a career that allows me to make a meaningful impact. Besides working in a lab, I enjoy video games, cooking, gardening, and going for long walks in nature!

Entry One: Computational Narratives

Within computer programming, it is very important to be able to communicate ideas from one programmer to another. A well written computational narrative allow for seamless communication of ideas, code, and purpose. For my first portfolio entry, I decided to revise our second Recommended Daily Assignment (RDA) by adding in more thorough explanations and HTML & LaTeX for more sightly headings/equations. The main adjustment was to the overall narrative of the assignment so that a third party would be able to follow what I did and why.

The overall goal of redoing this assignment was to show growth in iPython Notebook writing, specifically how I've improved at writing a computational narrative as the semester has progressed. I decided to omit the original assignment from this portfolio as it did not convey a true computational narrative.

Task 1: Favorite Van der Waals Gas

All About Silane

alt text

Silane is an inorganic, colorless, and flammable group 14 hydride gas with a smell similar to that of acetic acid. It is typically formed from the reaction of HCl with magnesium silicide:

Mg2_2Si + 4HCl \rightarrow 2MgCl2_2 + SiH4_4

However, there are many other processes utilized to synthesize silanes. The Schlesinger process is a method employed to synthesize liquid silanes from perchlorosilanes and lithium tetrahydridoaluminate. For the production of high purity silane necessary for semiconductor grade silicon in industry, metallurgical grade silicon, hydrogen, and silicon tetrachloride undergo a complex series of redistribution reactions and distillations. The reactions are summarized below:

Si + 2H2_2 + 3SiCl4_4 \rightarrow 4SiHCl3_3
2SiHCl3_3 \rightarrow SiH2_2Cl2_2 + SiCl4_4
2SiH2_2Cl2_2 \rightarrow SiH3_3Cl + SiHCl3_3
SiH3_3Cl \rightarrow SiH4_4 + SiH2_2Cl2_2

The compound was discovered in 1857 by German chemists Heinrich Bluff and Friedrich Woehler. When hydrochloric acid was reacted with aluminum sillicide, they named the product siliciuretted hydrogen. Today, silane and functionalized silanes have several industrial and medical applications. Silanes are often employed as coupling agents to adhere glass fibers to a polymer matrix. At above 450$^{\circ}$C, silane decomposes into silica and hydrogen, therefore it can be used for the chemical vapor deposition of silicon (which is a very useful process!).

Silanes can also be used to couple a bio-inert layer on a titanium implant, act as a water repellent, graffiti 'controller', and most importantly- as a depositer of hydrogenated amorphous silicon for the production of solar voltatic cells. In the late 1990's, the semiconductor industry used 300 metric tons of silane anually!

One interesting property of silane is that it is pyrophoric, meaning it undergoes spontaneous combustion in air. Another cool property is a result of the fact that hydrogen is more electronegative than silica, resulting in the tendency of silane to form complexes with transition metals.

Recreating Methane Compressibility Plot from P1 Packet, Model 5:

Z=PVˉRT Z = \frac{P\bar{V}}{RT} where Vˉ\bar{V} = molar volume = Vn\frac{V}{n}

import matplotlib.pyplot as plt %matplotlib inline plt.style.use('seaborn-talk') #makes bigger plots import numpy as np
#Van der Waals constants for methane: (taken from https://en.wikipedia.org/wiki/Van_der_Waals_constants_(data_page)) a = 2.283 #L^2bar/mol^2 b = 0.04278 #L/mol V = np.linspace(.05,1) # m^3 Ts = [25+273.15,100+273.15,300+273.15] #K R = .0821 #L*atm/mol*K n = 1 #mol Tlabels = [25, 100, 300] def makeThatPlot(Ts): i = 0 for T in Ts: P_ideal = (R*T)/V P_vdw = (n*R*T)/(V-n*b) - (a*n**2/V**2) Z_ideal = (P_ideal*V)/(R*T) Z_vdw = (P_vdw*V)/(R*T) plt.plot(P_ideal, Z_ideal, label = str(Tlabels[i])+'$^{\circ}$C Ideal') plt.plot(P_vdw, Z_vdw, label = str(Tlabels[i])+'$^{\circ}$C Real') i += 1 makeThatPlot(Ts) plt.xlabel('P (atm)') plt.ylabel('Z') plt.xlim(0, 1000) plt.ylim(0,2.5) plt.title('Compressibility of Methane') plt.legend()
<matplotlib.legend.Legend at 0x7fed92f74f98>
Image in a Jupyter notebook

Creating Compressibility Plot for Silane:

#Van der Waals constants for silane: a = 4.377 #L^2bar/mol^2 b = 0.05786 #L/mol V = np.linspace(.01,1,1000) # m^3 T = 300 #K R = .0821 #L*atm/mol*K n = 1 #mol P_ideal = (R*T)/V P_vdw = (n*R*T)/(V-n*b) - (a*n**2/V**2) Z_ideal = (P_ideal*V)/(R*T) Z_vdw = (P_vdw*V)/(R*T) plt.plot(P_ideal, Z_ideal, label = '25$^{\circ}$C Ideal') plt.plot(P_vdw, Z_vdw, label = '25$^{\circ}$C Real') plt.xlabel('P (atm)') plt.xlim(0,1000) plt.ylabel('Z') plt.ylim(0,5) plt.title('Compressibility of Silane') plt.legend()
<matplotlib.legend.Legend at 0x7fed907f2748>
Image in a Jupyter notebook

Recreating van der Waals Isothermic Figure 7.2 from ER3:

V = np.linspace(.0001,.6,1000) #L/mol R = 8.31451e-2 #L*bar/mol*K n = 1 #mol Vbar = V/n temps = [243, 258, 274, 304.12, 334, 365] #Van der Waals constants for CO2 gas a = 3.640 #L^2bar/mol^2 b = 0.04267 #L/mol for T in temps: P = (n*R*T)/(V-n*b) - (a*n**2/V**2) plt.plot(Vbar, P, label = T) plt.hlines(100, V.min(), V.max()) plt.xlabel('Molar volume/Lmol$^-1$') plt.ylabel('Pressure/bar') plt.title('Figure 7.2') plt.xlim(0,.6) plt.ylim(-30,140) plt.legend()
<matplotlib.legend.Legend at 0x7fed8e043ba8>
Image in a Jupyter notebook

P vs V Plot for Silane Using Van der Waals Equation:

V = np.linspace(.0001,1,1000) #L/mol R = 8.31451e-2 #L*bar/mol*K n = 1 #mol Vbar = V/n #molar volume temps = [150, 250, 350, 450, 550, 650] #K #For silane gas... a = 4.377 #L^2bar/mol^2 b = 0.05786 #L/mol for T in temps: P = (n*R*T)/(V-n*b) - (a*n**2/V**2) plt.plot(Vbar, P, label = T) plt.xlabel('Molar volume/Lmol$^-1$') plt.ylabel('Pressure/bar') plt.title('P vs Molar V for Silane Gas') plt.xlim(0,1) plt.ylim(-100,200) plt.legend()
<matplotlib.legend.Legend at 0x7fed9083a3c8>
Image in a Jupyter notebook

Comparing silane & carbon dioxide's P vs V behavior:

Silane behaves more somewhat like an ideal gas from 350 - 650 K, but deviates from ideal behavior at lower temperatures. I thought that the deviances from ideal gas behavior could be because of the fact that silane is actually a liquid at those lower T's, but it doesn't 'melt' until -185$^{\circ}$C. The non-ideal behavior could be attributable to the fact that silane is a very simple compound (Si and 4 H's), it is actually the silicon analogue of methane. Carbon dioxide, on the other hand, does not act as an ideal gas at any of the temperatures plotted. I believe this is may be due to the large electronegativity difference between carbon and oxygen.

Entry Two: Making Beautiful Plots

Prior to this course, I had taken CS-125, which taught us the fundamentals of Python (strings, tuples, dictionaries, etc. and how to use them). I also learned a little about data file manipulation, but we had never actually made any graphs with any of the available Python packages since it is more of an extension of Python. As this course has progressed, I believe I have gotten much better with plot-production using Python (PyPlots & matplotlib) specifically within Jupyter Notebooks. Therefore, I decided that my second artifact entry should be the various plots that I've made, and some improvements that I know how to make now.

One RDA that we had was to plot the speed distributions of nitrogen molecules using the Maxwell-Boltzmann distribution function, and then calculate both the most probable speed and root mean square speeds. For my first attempt at the assignment, I plotted the distribution using a function, but could not figure out how to get individual points with labels onto the graph. Instead, I made a print statement to show the speeds at different temperatures, which can be seen above the preliminary plot below:

import math def maxwellsEquation(): #Function that outputs the fraction of molecules per unit speed interval using Maxwell's Equation for the distribution of speeds for N2 #If I was using this in IDLE, I would've just imported this function from our last RDA, but I have no idea if that even works on CoCalc pi = math.pi kb = 1.38066e-23 e = math.e m = 28.0134 / (6.02144*10**23*1000) #For N2 T = 300 #K T2 = 1000 #K T3 = 1200 #K speeds = [0, 25, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000] avg_v = sum(speeds)/len(speeds) L1 = [] L2 = [] L3 = [] for speed in speeds: f = 4*pi*speed**2*(m/(2*pi*kb*T))**1.5*e**((-m*speed**2)/(2*kb*T)) g = 4*pi*speed**2*(m/(2*pi*kb*T2))**1.5*e**((-m*speed**2)/(2*kb*T2)) h = 4*pi*speed**2*(m/(2*pi*kb*T2))**1.5*e**((-m*speed**2)/(2*kb*T3)) L1.append(f) L2.append(g) L3.append(h) plt.plot(speeds, L1, label = '300K') plt.plot(speeds, L2, label = '1000K') plt.plot(speeds, L3, label = '1200K') plt.xlabel('Speed (m/s)') plt.ylabel('Fraction of molecules per unit speed interval (s/m)') plt.legend() plt.title('Speed of Gaseous N$_2$ Molecules') print('Average speed:',round(avg_v,2),'m/s') maxwellsEquation() M = 28.0134e-3 #g/mol for N2 R = 8.314 #J / K*mol Ts = [300,1000,1200] #K for T in Ts: v_mp = ((2*R*T)/M)**.5 v_rms = ((3*R*T)/M)**.5 print('At',T,'K',', the most probable speed is', round(v_mp,2),'m/s and the root mean square speed is', round(v_rms,2),'m/s')
Average speed: 916.3 m/s At 300 K , the most probable speed is 421.99 m/s and the root mean square speed is 516.82 m/s At 1000 K , the most probable speed is 770.44 m/s and the root mean square speed is 943.59 m/s At 1200 K , the most probable speed is 843.97 m/s and the root mean square speed is 1033.65 m/s
Image in a Jupyter notebook

It had really irked me that I was unable to get individual points plotted on the graph for each temperature's respective vmp_{mp} and vrms_{rms}. I had tried putting vertical lines on the graph, but that was just plain ugly. After solemn contemplation and many internet searches, I still haven't figured out how to get this to work computationally, which is really disappointing.

Part Two: More Beautiful Plots

I wanted to showcase some of the graphing techniques that I have figured out using the internet, as there are many cool ways to use matplotlib and PyPlots that I had used for several RDAs throughout the semester.

Recreating Graph from ER3 Example Problem 13.6

x = np.linspace(-2*np.pi,2*np.pi,100) f1 = np.sin(x)**2 f2 = np.sin(x)*np.cos(3*x) f3 = np.cos(3*x) f4 = np.sin(x) fig, axs = plt.subplots(4, 1, sharex=True) # Remove horizontal space between axes fig.subplots_adjust(hspace=0) axs[0].plot(x, f1, color = 'r') axs[0].set_ylim(-1, 1) axs[0].axhline(0) axs[1].plot(x, f2, color = 'm') axs[1].set_ylim(-1, 1) axs[1].axhline(0) axs[2].plot(x, f3, color = 'b') axs[2].set_ylim(-1, 1) axs[2].axhline(0) axs[3].plot(x, f4, color = 'g') axs[3].set_ylim(-1, 1) axs[3].axhline(0)
<matplotlib.lines.Line2D at 0x7fed90e5e438>
Image in a Jupyter notebook

Recreating this stacked graph was very satisfying!

Recreating P15.17 Contour Plots

from matplotlib import cm from numpy import pi, sin def psi(m=1, n=1, points=20): X = Y = np.linspace(0,1,points) x, y = np.meshgrid(X,Y) z = sin(m*pi*x) * sin(n*pi*y) return x, y, z
#(a) a,b,c = psi(1,1,20) plt.contour(a,b,c,15,colors='k') plt.contourf(a,b,c,15,cmap=cm.RdBu) plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x7fed90dfa7b8>
Image in a Jupyter notebook
#(b) a1,b1,c1 = psi(2,3,20) plt.contour(a1,b1,c1,15,colors='k') plt.contourf(a1,b1,c1,15,cmap=cm.RdBu) plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x7fed90d7f978>
Image in a Jupyter notebook
#(c) a2,b2,c2 = psi(3,1,20) plt.contour(a2,b2,c2,15,colors='k') plt.contourf(a2,b2,c2,15,cmap=cm.RdBu) plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x7fed90d0a0b8>
Image in a Jupyter notebook
#(d) a3,b3,c3 = psi(2,2,20) plt.contour(a3,b3,c3,15,colors='k') plt.contourf(a3,b3,c3,15,cmap=cm.RdBu) plt.colorbar()
<matplotlib.colorbar.Colorbar at 0x7fed90c8eb70>
Image in a Jupyter notebook

These plots are not a perfect recreation of those at the end of Chapter 15, the main deviances are that the red and blue are inversed and the scaling for the x and y axis ranges from 0-0.5, while the graphs above range from 0-1. However, I was unable to get the appropriate scaling to work for these plots, but was happy that I could get them to work out because they're pretty darn close to the originals.

Graph of Hydrogen Emission Lab Results:

#plt.style.use('dark_background') plt.axvline(x=650, color = 'r') plt.axvline(x=480, color = 'c') plt.axvline(x=410, color = 'm') plt.yticks([]) plt.xlabel('Emission (nm)') plt.title('Hydrogen Line Spectra Viewed from Spectroscope')
Text(0.5,1,'Hydrogen Line Spectra Viewed from Spectroscope')
Image in a Jupyter notebook

Entry Three: Using Quantum Mechanics

Part One: Utilizing Numpy and Sympy

Numpy and sympy packages come in handy for solving integrals, differentials, and other problems that one would otherwise have to calculate by hand. I have found that they are particularly useful tools for solving quantum mechanical problems, as many integrals would require referencing a table, so it allows me to be more time efficient.

import sympy as sy from sympy import * init_printing() var('x,n,a,hbar,m', positive = True)
(x,n,a,,m)\left ( x, \quad n, \quad a, \quad \hbar, \quad m\right )

Example One

ER3 15.34) Calculate the probability that a particle in a 1D box of length a is found between .32a and .35a when it is described by the following wavefunctions:

a. 2a\sqrt\frac{2}{a}sinπxa\frac{\pi x}{a}

b. 2a\sqrt\frac{2}{a}sin3πxa\frac{3\pi x}{a}

#a. f = (2/a)*sin((pi*x)/a)**2 integrate(f,(x,.32*a,.35*a)).evalf()
0.04524864434311570.0452486443431157
#b. f = (2/a)*sin((pi*x*3)/a)**2 integrate(f,(x,.32*a,.35*a)).evalf()
0.0004127310021914530.000412731002191453
xs = np.linspace(.00001,1,1000) #x/a where a is the boundary of the box p = [np.sin(np.pi*x)**2 for x in xs] plt.plot(xs,p,label = 'n=1') p2 = [np.sin(3*np.pi*x)**2 for x in xs] plt.plot(xs,p2,label = 'n=3') plt.xlabel('x/a') plt.ylabel('$\psi^2$') plt.title('Probability Distributions for 1D Particle in a Box') plt.legend()
<matplotlib.legend.Legend at 0x7fed8c6314a8>
Image in a Jupyter notebook

Based on the probability distribution functions (ψn2\psi^{2}_n) plotted above, the numerical quantities calculated make sense. There is a higher probability for the particle to be in the given range for n=1 than n=3 because there is a node located at x=.33 for ψ32\psi^{2}_3.

Example Two

F03 Exercise 9 Consider the function (30/a5)1/2(axx2)\left(30/a^5 \right)^{1/2}(ax − x^2)

a. Is this function normalized?

b. Is this function a possible solution to the Schrodinger equation for the particle-on-a-line model? Why or why not?

For a, if the function has been normalized, its integral over all space will equal 1.

For b, if the function is in-fact a solution for a particle in a 1D box, it would have to be an eigenfunction of the Hamiltonian operator (H^=22mδ2δx2\hat{H} = \frac{-\hbar^2}{2m} \frac{\delta^2}{\delta x^2}) since the simplified Schrodinger equation is: H^ψ=Eψ\hat{H}\psi = E\psi

#a. psi = sqrt(30/a**5) * (a*x - x**2) integrate(psi*psi, (x, 0, a))
11

Yep, that is a normalized wavefunction, alright!

-hbar**2/(2*m) * diff(psi, x, 2)
302a52m\frac{\sqrt{30} \hbar^{2}}{a^{\frac{5}{2}} m}

Nope, not an eigenfunction, therefore this wavefunction is not a possible solution.

Part Two: Real-Life Examples of Particle in a Box (PIB) Model

Conjugated π\pi Electrons in Organic Molecules

As we saw in lab with the three cynanine dyes, π\pi electrons in conjugated, organic molecules can be treated as particles moving freely in a box. When delocalized electrons in a conjugated molecule interact with visible light, the photons can excite the electrons to higher energy states. We modeled these electronic transitions by 'filling' the number of electrons within the conjugated chain for each energy level (one spin up, one spin down). When an incoming photon interacts with an electron in the highest occupied molecular orbital (HOMO), it is excited to the lowest unoccupied molecular orbital (LUMO). We can then solve for the energy change using the equation ΔE=(2)(nf2ni2)8meL2\Delta E = \frac{(\hbar^2)(n_f^2-n_i^2)}{8m_eL^2}, which is the quantum mechanical solution to the PIB. In lab, L was calculated using the formula: L=λmaxh(N+1)8mecL = \sqrt{\frac{\lambda_{max}h(N+1)}{8m_ec}} where λmax\lambda_{max} was determined experimentally via UV-Vis spectroscopy, and N is the number of delocalized electrons for the compound. For example, the red dye (1,1'-diethyl-2'2'-cyanine iodide) has delocalized 6 electrons, corresponding with a HOMO of n=3 (ni_i), and a LUMO of n=4 (nf_f). We used an online simulation that 'assumes the electrons are confined by walls with finite potential energy' to find the energy corresponding for each dye, and the wavelength corresponding to the transition using the equation λ=hcΔE\lambda = \frac{hc}{\Delta E}, though we could've calculated the energy corresponding to the electronic transitions by hand with the information that we already knew and the PIB model.

Calculating Fermi Energy (Nearly Free Electron Model)

In my solid state physics class, we used the 3D PIB model to solve for the Fermi Energy (EF_F). To my understanding, EF_F is the uppermost energy level an electron (or any non-interacting fermion) can occupy at absolute zero, which typically occurs at the bottom of the conduction band for metals. As I had to do on an exam, I will solve for the EF_F for a particle in a 3D box of 3A3\overset{\circ}{A}

En=(nx2+ny2+nz2)E1E_n = (n_x^{2}+n_y^{2}+n_z^{2})E_1 where E1=h28meL2E_1 = \frac{h^2}{8m_eL^2}

Highest E level = E113,E131,E311=11E1E_{113}, E_{131}, E_{311} = 11E_1

EF=11h28meL2E_F = 11\frac{h^2}{8m_eL^2}, which I will solve for numerically below:

h = 6.626e-34 #Js L = 3e-10 #m me = 9.11e-31 #kg Ef = (11*h**2)/(8*me*L**2) print('The fermi energy for a particle in a 3D box of 3 angstroms is',Ef,'J')
The fermi energy for a particle in a 3D box of 3 angstroms is 7.362828332723502e-18 J

Entry Four: Spectroscopy

So far in my undergraduate career, I have learned how to use a variety of different spectroscopies. For my glass research project, I used both Raman Spectroscopy and Fourier Transform Infrared Spectropscopy (FTIR) to help deduce structural information about the glasses I was producing. Both of these techniques use photons to induce molecular vibrations, which is one thing that we touched on in this course, as well as my Solid State Physics and Analytical Chemistry courses this semester. I figured that it would be appropriate to tie in my research with this topic, so I have included some of the spectra I have recorded and talk a little bit about how vibrational spectroscopy works, and why we can use it to better understand glassy structures.

FTIR Spectroscopy

IR spectroscopy is the analysis of infrared light interacting with a molecule, whether that be absorption, emission, or reflection. The technique is primarily used to determine functional groups within various organic/inorganic compounds. The glasses that I analyzed in my research are pitch black, therefore I looked at the absorbance of the IR radiation versus wavelength. There are three main routes by which a molecule can absorb IR radiation, and each of these involve an increase of energy within the system that is proportional to the light absorbed. One route occurs when the absorption of radiation leads to a higher rotational energy level in a rotational transition. The second route is a vibrational transition which occurs on absorption of quantized energy, leading to an increased vibrational energy level. The third route involves electrons of molecules transitioning to a higher energy level. There are multiple possibilities for the different possible energy levels for the various types of transitions, as seen in the diagram below.

alt text

In very simplistic terms, the raw data is referred to as an interferogram, which is then converted into a spectrum through a mathemetical Fourier transform. The lightsource used for our experiments on the physics floor is a tungsten-halogen lamp because it can act as a blackbody. The figure below is a plot I made for the FTIR spectra of two different glasses containing 30 molar % CuO, the matrix refers to a ratio of mol% V2_2O5_5 and mol% TeO2_2 that is maintained within the glass, while the amount of CuO changes. For clarification, the glass formula for the 50-50 matrix is xCuO(1x)[.5V2O5.5TeO2]xCuO-(1-x)[.5V_2O_5-.5TeO_2], where x=3 (corresponding to 30 mol% CuO).

alt text

I compared the FTIR spectra produced for the 40-60 matrix and 50-50 matrix by deconvoluting the spectra within a program called Igor Pro, which can be seen in the image below:

alt text

The bands produced by deconvoluting the spectra using Gaussian peaks and somewhat of a 'guess and check' method are used to better understand the structure of the glasses. I specifically looked at the centered location of the band and its adjusted area. Due to available literature and analysis of the pure chemicals, we know that the broad band at ~530 nm corresponds to the bending of Te-O-Te units, the band at ~700 nm corresponds to the stretching mode of TeO4_4 tetrahedron, the band at ~900 nm corresponds to VO4_4 stretches, and the band at ~1000 nm corresponds to the stretching mode of V2_2O5_5 trigonal bipyramids. It is not a perfectly qualitative analysis of the amount of each structural unit within the glass, but when compared against other glasses, it helps us glass scientists better understand what is happening as the composition of the glass changes. So for example, I saw an increase in TeO3_3 units (a feature not shown in the deconvolution of the spectrum above) as vanadium pentoxide concentration increased within the glasses, as well as an increase in VO4_4 units as the concentration of copper oxide increased.

Raman Spectroscopy

Raman spectroscopy is a valuable technique due to its versatility, speediness, low-cost, and non-destructive nature (lasers will destroy certain samples... but for the most part, it can be used on any state of matter and not destroy it). A standard Raman spectrometer is comprised of a laser, monochromator, sample holder, and detector. The type of laser used is dependent on what sample is being analyzed, some examples including He:Ne, Nd:YAG, argon ion, krypton ion, near infrared (NIR), and diode (Mario’s lab). The basic principles behind the technology is that there are three significant types of scattering that take place when photons interact with the molecule being investigated (see energy level diagram below). Rayleigh scattering occurs when there is no net exchange of energy between the photon and the molecule, therefore there is no shift in frequency (most common). Anti-Stokes Raman scattering occurs when the net exchange of energy is equal to the energy of one molecular vibration, and this interaction causes the photon to gain energy from the vibrational energy, resulting in the frequency of the scattered light to be greater than that of the incident light. Stokes Raman scattering occurs when the incident photon deposits energy into the molecule, therefore losing energy and scatters at a lower frequency. In summary, Raman scattering is inelastic because the energy and momentum transfer between the photon and the molecule leads to a change in energy between the incident and scattered photons. The difference of that energy is equal to the difference in energy between the initial and final states of the molecule.

alt text

import pandas as pd columns = ['Wavenumber','Intensity'] dfile = pd.read_csv('01Cu_396Te_594_V.csv', names = columns) dfile2 = pd.read_csv('4Cu_24Te_36V.csv', names = columns) plt.plot(dfile.Wavenumber,dfile.Intensity, label = '1 mol% CuO') plt.plot(dfile2.Wavenumber,dfile2.Intensity, label = '40 mol% CuO') plt.xlabel('Raman Shift (cm$^{-1})') plt.ylabel('Intensity (au)') plt.title('Raman Spectra for 50-50 Matrix') plt.legend()
<matplotlib.legend.Legend at 0x7fed7f221fd0>
Image in a Jupyter notebook

The two intense, sharp peaks near the lower/higher ends of the spectrum are actually due to solar flares. I must've exported these individual csv's before omitting those (oops). On this scaling for the plot, it is a little hard to view individual features, but I'll describe them starting from lower wavenumbers to higher wavenumbers. The small blimp at ~240 cm1^{-1} corresponds to V-O vibrations between VO5_5 tbp's seen in pure V2_2O5_5. The peak around 430-455 cm1^{-1} corresponds to symmetric Te-O-Te vibrations in TeO4_4 tetrahedron, and the peak at and 650 cm^{-1} is the asymmetric vibration. It is oddly hard to see on this plot, but the feature at ~800 cm1^{-1} is due to V-O-V units in VO5_5 and VO4_4 units. Lastly, there is a small feature at ~1000 cm1^{-1} corresponding to V=O vibrations. I think I'll include an image of all of the spectra for the 50-50 matrix better idea of what these features look like:

alt text

Entry Five: Error Analysis Using Python

Linear Regression and Standard Deviation

I performed several different 'types' of linear regression on my GC-MS results produced during an analytical chemistry lab for the analysis of cocaine on dollar bills. One was using a linear regression package, the other was simply doing a linear fitting within numpy to get the slope and y-interecept necessary to qualitatively determine the amount of cocaine on the bill to compare with the slope/intercept received using numpy. I also wanted to look at the standard error for both the slope and y-intercept, so I decided to do an OLS fitting on the data. Using the equation of the linear best-fit line and standard error, I could calculate the amount of cocaine, as well as the relative uncertainty of the amount of cocaine using the standard error.

import numpy as np import statsmodels.formula.api as sm from scipy.stats import linregress
x = [1.57, 3.13, 6.25, 12.5, 25] #micro g/ L (concentration of standards) y = [3373477, 5596834, 12319709, 20320800, 37045670] #corrected area m,b = np.polyfit(x, y, 1) print(m,b)
1426030.93873 1913058.20373
linregress(x,y)
(1426030.93873,1913058.20373,0.997266399413,0.000171497695182,61001.8015715)\left ( 1426030.93873, \quad 1913058.20373, \quad 0.997266399413, \quad 0.000171497695182, \quad 61001.8015715\right )
results = sm.OLS(y, x).fit() print(results.summary())
OLS Regression Results ============================================================================== Dep. Variable: y R-squared: 0.994 Model: OLS Adj. R-squared: 0.992 Method: Least Squares F-statistic: 654.1 Date: Sun, 17 Dec 2017 Prob (F-statistic): 1.39e-05 Time: 15:17:56 Log-Likelihood: -78.368 No. Observations: 5 AIC: 158.7 Df Residuals: 4 BIC: 158.3 Df Model: 1 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ x1 1.537e+06 6.01e+04 25.575 0.000 1.37e+06 1.7e+06 ============================================================================== Omnibus: nan Durbin-Watson: 1.042 Prob(Omnibus): nan Jarque-Bera (JB): 0.175 Skew: -0.388 Prob(JB): 0.916 Kurtosis: 2.516 Cond. No. 1.00 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
/ext/anaconda3/lib/python3.5/site-packages/statsmodels/stats/stattools.py:72: ValueWarning: omni_normtest is not valid with less than 8 observations; 5 samples were given. "samples were given." % int(n), ValueWarning)

Concluding Thoughts

For this portfolio, I primarily tried to take concepts that we had talked about in this course and apply them to other aspects of my education here at Coe to illustrate the mission statement, as well as drawing important connections between various topics. I think that the use of an iPython notebook was better to present my mastery of the course topics than my original platform (which was a Google site). I found myself importing everything from CoCalc, so I transitioned to a notebook because it allowed for a cleaner appearance and presentation of artifacts. At this point, I still don't know how to plot residuals for a given data set, which was one of the things on the P Chem course inventory that I was originally planning on putting in the error anaylsis section (Entry Five). I also was planning on throwing in a section on thermodynamics, which we weren't able to get to within the scope of the class, but I will be taking a Thermodynamics & Statistical Mechanics course in the Spring of 2018, so it wasn't all for naught! All in all, I feel like I have sucessfully learned about quantum mechanical operators, eigenvalues/functions, how to normalize a wavefunction, and harmonic/anharmonic oscillators in regards to quantum mechanics. I have sucessfully learned about integrated rate laws, ideal/non-ideal gas behavior, and various equations of state in regards to chemical kinetics. I have learned how molecules can be modeled as harmonic oscillators in regards to spectroscopy. Lastly, I have learned about propagation of error, how to write a computational narrative, how to make a beautiful plots, the difference between symbolic & numeric computation, and the very basics of ab initio simulations using WebMO. These topics will be very valuable as I go onto grad school, as well as during the rest of my time here at Coe.