Sie sind auf Seite 1von 8

Spectral simulation I Rotation only (brute force) using Excel Estimated completion time = 6 hours Simulating spectra is a challenging

g computational task. It is pretty easy to sketch the P, Q, and R branches of a diatomic molecule (as you might see in an IR spectrum) by hand, but getting the computer to do it is quite a bit harder. This exercise is an illustration of that point (how much more complicated the procedure is than you might think) and of the concepts involved in discrete numerical simulations. The final product will be a reasonable simulation of the pure rotational spectrum of a diatomic molecule of your choice. If the terminology used in this exercise is unfamiliar to you, dont worry about it too much. You will learn about it in the third term of Physical Chemistry (you are probably taking this course concurrent with the first term class, Chemistry 440) after you develop the quantum mechanical (QM) models that give rise to the spectroscopy. Well use some of these QM models here and give you a preview of the terminology that is used. If you want more background, you can read ahead in the textbook for the lecture, using the Table of Contents or the Index to search for individual terms. (Or there is always a quick web search) But be assured that you CAN carry out the exercises in this class without a complete understanding of the underlying science, and doing the exercises may give you a valuable preview of some of the material to come (and hopefully a review of material youve had). Line lists One of the first things you must to do in simulating a spectrum is generate a line list a table that contains the positions of allowed transitions (between quantum states of the molecule) in one of the common independent variables (wavelength, frequency, or energy). The line list is sometimes called a stick spectrum because you can create a graphical representation that shows the locations of the spectral transitions using vertical lines, often without regard to the height or width of the real spectroscopic peaks. These stick spectra can be misleading, since there are an infinite number of transitions associated with each of the mathematical models that we will examine during this exercise and the next. The number of lines that you will actually observe in a spectrum is far less (obviously) because the size of the peaks are determined 1) by selection rules; 2) by the QM transition strengths between the lower and upper states; and 3) by the populations of the lower states in the transitions; which are in turn usually governed by a Boltzmann distribution, as illustrated later in this exercise. We will be considering absorption spectra, where a photon is used to promote a molecule from the lower state to the upper state, so the most salient effect on relative peak sizes is the population of the lower state. This will make many potential transitions small enough to disregard in the simulation. The first step in generating a line list is to determine the energies of the molecular states from a mathematical formula. These formulae are derived by the application of QM to an idealized physical system called a model. Our first example is the rotational formula (Eqn. 1), obtained by the application of QM to a non-rigid rotor model, which gives the energies of states F(J) F(J) = Bv J (J + 1) - Dv J2 (J + 1)2 (1)

where J is the rotational quantum number of the state, usually an integer that starts at zero and increases by ones {J = 0, 1, 2, 3, } corresponding to increasing amounts of rotation; Bv is the rotational constant, which depends on the reduced mass and the bond length of the diatomic molecule; and Dv is the centrifugal distortion constant, included to describe the stretching of the bond length at higher rotation levels. Note the v subscripts on Bv and Dv both are dependent on vibrational state, since bond lengths and distortion constants generally increase with vibrational (and electronic) excitation. These subscripts are sometimes omitted, since the dependence may be assumed, or replaced with e to denote the dependence on electronic energy level; or the v may be replaced with a specific level (B0 for the v = 0 vibrational level). The other step in generating the line list is to calculate the differences between energy levels that correspond to allowed transitions. Recall that spectroscopy measures the wavelength (or frequency or energy) of light that corresponds to transitions between energy states of a molecule. In this case, the differences will be between adjacent rotational energy states. Programming Exercise Well use MS-Excel (a program that most of you have used, and that is reasonably good at handling lists of numbers and making simple graphs) to generate the line list for a microwave spectrum that would probe the pure rotation states of a diatomic molecule. Open a new Excel spreadsheet and name it SpecRot_XXYY_ABC where XXYY is your chosen diatomic molecule and ABC is your initials. Also save a version of this file (the MS-Word document named SpecSimRot) with your initials appended SpecSimRot_ABC. You will be typing answers directly into this document and submitting it for grading. I usually start the grading process by reading your answers in the Word document and then check the program document when you get odd answers, but I also look over the program file to make sure it is a unique submission (you have to do your own work in this class). Create a column for the rotational quantum number J and fill it with integers from 0 to 100. Label the next column F(J) and create the formula in Equation 1, optimally by defining Bv and Dv as parameters (cells with a label above or to the left, that are referenced using anchors) and referencing the J cell to the left, creating an ordered pair {J, F(J)}. Copying and pasting the cell with the formula in it to the cells below should create a set of ordered pairs corresponding to the first 101 rotational energy levels of the diatomic molecule youve chosen, assuming that you have entered the values for B and D in the appropriate parameter cells. The constants for many diatomic molecules are available from the NIST chemistry web book, with the units of wavenumbers (cm-1) unless otherwise noted. In this case, we are talking about the ground electronic state (labeled X) which by convention is at the bottom of the table of constants for diatomic molecules with successively higher electronic states listed above it. You can use the values given for Be and De as B0 and D0 in the calculation of F(J) - well show why that is ok in the next exercise. If the values look weird to you, try calculating a few of them by hand with your calculator to verify the numbers the spreadsheet is getting. Hint: what does the formula above imply about the energy change between the rotational levels as you go up in energy or quantum number? What is the diatomic molecule that you chose? What are the B and D constants that you found (include units)? Are the units appropriate for a wavelength, a frequency, or an energy? Is the molecule homonuclear or heteronuclear? Is it a stable molecule or a radical? Is it likely to be found in the gas-phase? Keep this last one in mind for the question in the next

exercise about finding the real spectrum somewhere, since spectra can look quite different in the condensed phase. Next we need to generate the energy differences between successive energy levels {J = +1, so F(J) = F(J+1) F(J)}, since that is what we would observe in a pure rotational spectrum with a microwave absorption instrument. The selection rule that applies for pure rotational transitions is J = +1 (again were implicitly assuming that this is absorption spectroscopy, and only the up transitions would be observed). Create a new column for the pure rotational lines (the differences) and label it F(J). Hopefully it is clear to you how to set up the formula for this calculation. Note that there is one less valid entry in this column than the other two and that you have a choice as to which J label the line refers to please pair the F(J) with the J of the lower level. Note that the energies of the lines get larger with J, at least early on. What happens to the difference between the adjacent F(J) lines as J increases? Does it change faster or slower (dF(J)/dJ) than the energies of the levels change (dF(J)/dJ) with increasing J value? You may see some odd behavior near the end of the set (at high J). You may be used to thinking of the x-axis of a spectrum as wavelength (with units of nm) but microwave spectra are plotted in frequency units, MHz or GHz. Depending on where you obtained the value of B, it may be in the right units; but if the value was in cm-1, another common unit, you will have to do a conversion. If your line positions (F(J)) are not already in MHz or GHz, do that units conversion now. You can create a new line list (a separate column) with frequency units, or you can just modify your existing formulas or parameters to include the units conversion. Whichever you do, make sure your column headings and other labels clearly indicate the units. If we wanted to plot the stick spectrum described above, we would need to give each stick a yvalue (height) to go with the x-values that are the frequencies of the spectroscopic transitions (the F(J) values). The y-values can simply be set equal to 1 resulting in a set of equal-height markers that show where the line centers would be located. Unfortunately, Excel isnt great at creating this type of plot, so well do the next step before we bother to make a plot. If you want to do the stick plot to see how it looks, do an XY plot with markers only and at least youll be able to see where the sticks would be. {Some terminology: the individual lines in the spectrum are labeled J J (e.g., 10) where double primes are the quantum number for the lower state, single primes are the upper state, and the arrow corresponds to the photon-induced change (in this case an absorption event, where a photon took the molecule from the first state to the second). The higher energy state is always listed first, so an emission experiment that observed the same transition would label the line 10.} The next step is to make the simulated spectra more like the one we would observe in an experiment, by assigning a reasonable estimate of the intensity of the individual transitions (the y-value for the stick). The important factors here are the relative populations in the states (more population in a given lower state makes the amount of absorption you will observe out of that state larger) and the quantum mechanical connection between the two states involved in the transition, sometimes called transition probability or line strength. We have already applied the second type of intensity factor, since the selection rule that we used (J = 1) is an especially stringent form of transition probability the transitions that we calculated are allowed while all other possibilities (J = 2, 3, etc). are forbidden. As with most things in science, forbidden does not mean these transitions do not occur, but they are so

much weaker than allowed transitions we can ignore them. Within the general class of allowed transitions there is a continuum of stronger and weaker connections, but these QM effects are generally smaller than the population effects well examine next. Programming Exercise Now we will assign intensities (y-values or heights of the peaks) to the allowed transitions that we created in the SpecRot_XXYY_ABC Excel spreadsheet. Reopen it, if you have closed it, or save it before you proceed. The line intensities are based on the populations of the lower quantum state, which are obtained from the Maxwell-Boltzmann distribution with consideration of state degeneracy. The populations are given by N(J) = N0 (2J + 1) exp(-EJ / kB T) (2)

where EJ is the energy of the state with the quantum number J, kB is Boltzmanns constant, T is the temperature, N(J) is the population (number of molecules) in a given rotational level, and N0 is the total number of molecules. Since we are only interested in the relative intensity of the transitions, we will actually be calculating the ratio N(J)/N0 which we will call P(J) - the relative population of state J. Write the equation for P(J) below. The relative population is proportional to the relative probability of transitions out of the state with quantum number J, and thus the intensity associated with that peak. The term (2J + 1) is the degeneracy of the rotational state - how many identical states are present at the defined energy and quantum level. More degeneracy means more relative population in a state and therefore more absorption probability. The exponential term contains a ratio of the energy of the state to the product of the Boltzmann constant and the temperature: this favors lower states but allows higher temperature (heat energy) to drive molecules into higher states. Create a formula in a column to the right of the transition energy column (the line list) that calculates P(J) for each line according to the formula above. Note that the F(J) column is EJ and that you will want to create a new parameter for Temperature (K). You could create a parameter cell for Boltzmanns constant kB too, but we sometimes leave constants as simple numbers in computer programming to speed calculations a bit. Depending on the program, it might save the computer from going and looking up the number from a cell or memory location. You need to be consistent about units or you will get gibberish - P(J) is unitless, of course, as is the ratio EJ/kBT so the units of kB that you use have to be the same as the units of EJ/T. Qualitatively, you will see the intensities P(J) increase at first due to the increasing degeneracy and then decrease because of the exponential term. The size of Bv and T has a large effect on the pattern of intensities, so you may see quite different results from others with a different diatomic molecule. At this point we will go to the trouble of getting Excel to give us a graph based on the Intensity and Energy positions that you have calculated. If you already know how to create a graph in Excel go ahead and make an XY plot, choosing markers only, and leaving off the gridlines and the legend. Otherwise consult the tip at the link above or in the D2L module for help. It would be great if you could drop lines to the x-axis making a proper stick plot, but Excel doesnt do that as far as I can tell. Paste the plot of the intensity-weighted stick spectrum below. Show (perhaps create two new columns?) the effects of doubling and halving the temperature by creating two new graphs and pasting them below. Describe the appearance of the stick spectra and the effects of changing temperature in your own words below.

Drawing the simulated spectrum The hardest thing to do in creating a realistic looking simulated spectrum is to draw the actual peaks. To do this, you must simulate the combined effects of the natural linewidth of the transitions, the various broadening mechanisms that may be present, and the finite effective bandwidth of the spectroscopic instrument. These mechanisms combine to change the stick into an approximately triangular peak with a defined width. Various functions (Lorentzian, Gaussian, Voigt) are used to approximate the appearance of the peaks under different conditions. There are theoretical considerations that can guide you to the appropriate form, but the comparison with the observed peaks is usually considered the last word in deciding which function is most appropriate. Well use a Gaussian because its easy. In order to do a reasonable job of representing the peaks, you will need several (at least 3 to 5) points with non-zero intensity defining each peak in the spectrum, which in turn defines the x distance (delta x) between the points. The easiest way to do this exercise is to use the same delta x across the whole frequency range, so clearly you will need a lot more points along the x axis than the original 100. You may have to experiment with the width of the peaks to get an acceptable spectrum if they are too wide, all of the lines will coalesce; if too narrow, an inordinate number of points (very small delta x) may be required. The process of generating the final spectrum takes some work, so you should save your file and switch to a different tab in the Excel spreadsheet to avoid overwriting information from before and/or making the worksheet too complicated to work with. Create a new x column that spans from below the lowest frequency transition in your line list to above the highest and has at least 1000 points. It might be easier to do a fill using a fixed increment (delta x) and end up with more than 1000 points. If you have less than 1000 points, you may see a grainy spectrum, where the finite resolution of the x axis is apparent. Excel will put a smooth curve through these points, if you wish, so that may not be a problem, as long as you dont miss any peaks. Again, you may have to experiment with the range and spacing of your x points and the width parameter to get a pleasing looking spectrum, so building in some flexibility might pay off later. Well start by creating a single peak, corresponding to the lowest energy transition, 1 0, using the Gaussian form. The Gaussian is the function that is called the normal distribution or bell curve in statistics. It is parameterized (i.e., adjusted or defined) by a center position (in stats - the mean, ) and a width (in stats - the standard deviation, ). The normalized form of the Gaussian function is given by f(x) = ( 2 2 ) -1/2 exp(-(x-)2 / (2 2 )) (3)

where is the peak center, the first value of F(J) in this context, and the width will be a new adjustable parameter that you should create (and set to about 100 MHz as a first guess). You CAN create the Gaussian formula in Eqn. 3 from scratch in a new column, but it is easier to use the built-in Excel function NORMDIST with the Cumulative flag set to false or 0, which gives the same result. Copy this formula to the rest of the cells in this column (equal to the number of x values you created above) making sure that you anchor the two parameters ( and ) properly. (Look here or in the D2L module for some tips on working with large datasets in Excel.) Verify that this procedure worked by making a graph of the Gaussian function and then choosing a few different values for the width parameter to illustrate its effect. Drawing upon

your knowledge of the properties of the normal distribution, describe the approximate relationship between the value of and some visual representation of the width of the peak (FWHM or HWHM?). Youll note that the y-value at the top of the peak is less than 1 in what sense is this peak normalized? If you dont get what Im driving at in the last question, consider the example of the mass spectra that you saw in Organic Chemistry or other classes all of the peaks are divided by the height of the largest peak (called the base peak) so that they are all relative to it (either as a fraction or a percentage). This process is referred to as normalizing to the height of the biggest peak. We could do that to the peaks in our simulated spectrum if we wanted, but because we are creating a relative intensity spectrum, the absolute height of the peak isnt important to us. We will use P(J) to control the relative sizes of the peaks in our simulated spectrum. The normal distribution is normalized though check your Analytical Chemistry text or a Statistics reference for a reminder about what is equal to 1.0 for this function. The final procedure in creating the simulated spectrum (creating multiple peaks) relies on an assumption that almost always holds for absorption spectroscopy when the Beer-Lambert law is obeyed: that the absorption you obtain at a given wavelength is the sum of the individual (noninteracting) absorptions of the components that absorb there. In this context, the individual absorbers are molecules in different rotational quantum states. This is where this treatment becomes really brute force there should be a clever way to calculate the sum of the NORMDIST functions for all of the peaks at the same time, but I havent found one. So we do it by creating a NORMDIST column for each peak and then we sum them. This will be a big spreadsheet, so make sure you save it before you do the next step. (It may crash). The next step is to create a column for each of the 100 peaks containing an appropriately placed Gaussian (centered on the F(J) for the line) with the correct relative intensity (defined by the P(J) for that line) all of which will have the same width, as defined above. We will then add all of the columns up (point-wise across the row) to produce the compound spectrum that will be a reasonable approximation of the pure rotational spectrum for the molecule. One way (the truly brute force way) to generate the 100 intensity weighted Gaussian peaks would be to manually change and anchor the intensity and peak positions in each of the columns. (This would be slow and painful). The problem here is that Excel will try to increment formulas during a copy and paste operation, but you want it to increment a ROW designation when you copy into another COLUMN, which it doesnt do. We can automate the construction of the large number of required formulas by changing the two columns that we need - the predicted peak positions of the transitions (the line list or F(J) from the main sheet) and the intensities that go with them P(J) - into rows. You can easily do this with an operation called transposing but you have to be careful how you do it, so that all of the references that define the numbers in the cells dont become invalid when you cut n paste them. Make sure there are a few blank rows above the x column in the new sheet (either cut and paste the whole set down a few rows, or use the Insert row function, or select a row (click on the left hand side where the numbers are) and right-click and select Insert from the flyout). Select the column that contains the line list F(J) and copy it. Click in the cell that is 2 rows (or more) above the first x point and directly above the Gaussian function you created before. Choose Paste Special (either right-click or from the Edit menu) and click the radio buttons for Values and Transpose and then click OK. The Values option copies numbers, instead of formulas, which would have been invalid in the new positions. The problem with this approach is that if you make any changes that affect the peak positions or

intensities (for example the temperature) you will need to redo the copy and paste values with transpose operation on the revised data. You should now have the peak center positions in a row above the first Gaussian that you created. Repeat the procedure for the intensity column P(J), being careful not to overwrite anything important (if you made two rows, put P(J) in the row below the peak positions) and make sure that the two rows line up. Once youve done that, you can construct a version of the NORMDIST formula (or the raw Gaussian Eqn. 3, if you did it the hard way) that uses the columns value of F(J) as and your previously defined width parameter for and the x frequency column to the far left (be careful about the anchoring here). You will also multiply the Gaussian function by the relative intensity P(J) for the column. Do this and copy the formula into the rest of the column, overwriting the original Gaussian you created earlier. The graph that you previously constructed for the single peak should look the same, since you are using the same values for the parameters and the P(J) for the first peak is 1. If this part worked, copy your formula across the top row and verify that it increments properly (i.e., that you anchored things right so that the values of x, , , and P(J) are appropriate). If so, save the file and then copy the formula into the entire block (~1000 rows high and 100 columns wide). You should end up with 100 Gaussian functions with different peak positions and different heights but comparable widths. The final step is to sum all of the 100 Gaussian functions for each x point (across the rows) using the Sum function, but it would be nice if that column (the final answer for this exercise) was closer to the left side of the huge data block (where the x axis values are) than to the right hand side. One way to do this is to insert a column to the left of the existing data and put the Sum formula there. Another is to use a new tab to create a third sheet to hold the final answer for the exercise. If you do this, switch to the new tab and label the two columns (Frequency, Absorption). I havent stressed this as much as I should, but please be sure to place labels above (or on the side if that makes more sense for parameters) all columns and parameters, to help you keep things straight and to make grading easier. This really does make a difference. It is also a good idea to put a title, your name, and the date at the top of every new spreadsheet, just in case you forget what they are for. For the Frequency (x) column, just point to the other dataset by typing an equal sign and then clicking on the first cell (in the other tab). Copying this formula to the other cells should replicate the original x axis set you made before. Then create the Sum function in the first cell of the Absorption column of the new tab, selecting the data in the other tab during the Wizard, and copy it into the rest of the cells in the column. Finally, you should be able to create a graph (XY, lines only, connected with a smooth curve) that shows the final spectrum from these two columns (Frequency, Absorption). Make sure you put labels on the axes, etc. but you dont need gridlines, a title or a legend. If the spectrum looks distorted (the intensities of the peaks dont follow a smooth curve like the P(J) plots above) try increasing the value of and/or decreasing the spacing between the Frequency (x) points. If you do the latter, you may need more points to show the whole frequency range. Paste the final pretty version in below. If there is a region of the spectrum where most of the lines with significant intensity are clustered (and space where there are few intense lines) create an expanded version of this part of the spectrum (right click on the x-axis of the plot and change the scale) and paste it in below. In your own words, describe the general appearance of the simulated spectrum. Change the value of the width () parameter optimally both up and down - and comment on the observed changes in the simulated spectrum.

Save this file (the Word document). Submit this file (with your answers in it) and the Excel file on the D2L site using the Dropbox tool in the appropriate folder, and add a comment saying that you are finished with this assignment. If you upload multiple versions for some reason, tell me which one you want graded. Possible Extended Exercise (for graduate students) A fitting program (more on this in the exercise 5) for pure rotational spectra, where the calculation of the full spectrum is automated, based on input values for the parameters, might be a possibility. The fitting could even be automated, but the likelihood of securing pure rotational spectra to use a test of the program is small, because of the nature of the instrumentation used in microwave spectroscopy. Revised 9/19/2011 - DBA

Das könnte Ihnen auch gefallen