Donald 1. Peterson and Milton E. Fuller California State College Hayward, 94542
Physical Chemistry Students Discover the Computer
The present-day bachelor's-degree holder in Chemistry will almost inevitably encounter the computer in his career; the day is undoubtedly approaching nrhen formal instruction in computer usage will take its place in the regular undergraduate chemistry curriculum. Meanwhile, it makes sense to include instruction in programming in physical chemistry laboratory, where it tends to displace slide rules, logarithmic graph papers, and even the desk calculator, just as these not too many years ago tended to d i s place, for example, log tables. Further, as a pedagogical aid to the assimilation of arithmetically formidable or mathematically abstruse concepts, the computer undoubtedly serves better the student who is able to write his own program than it does one who must rely on canned programs. Outlined below is an introduction to conlputer usage, followed by two examples of projects made possible by the training it provides. Introduction The physical chemistry course comprises three quarters, each having three hours of lecture and six of laboratory per week. The programming inst.ruction occupies the first nine hours of the laboratory course; it stops short of subscripted variables, which are iutroduced briefly after the more elementary programming principles, namely, input-output techniques, IF statements, and DO loops, are mastered. An assigned text (2, 2) is supplemented by the student handbook of the Instructional Computation Center.' Also, some contextual problems are assigned, for example Write a program which will compute the molar volume at. standard temperature and pressure of several permanent gases according to the van der Wsals equation, hy iteration according to Newton's method.
A high level of sophistication is neither sought nor ordinarily discouraged. Many students supplement Presented before the Division of Chemical Education at the 160th National Meeting of the American Chemical Society, Chicago, September, 1970. ' The Center's CPU facility formerly was sn IBM 1620, which was supplemented by terminal access to an IBM 360167; it is now a CDC 3150. A small tabletop computer (Marchant "Cogita") is also available in the laboratory. ' On occasion use has been made of a more general regression analysis which at the same time int,rodocesthe sbndent to library programs. A set of data. is supplied the student, who then is to select, with the aid of s. program (4) provided, the best threeparameter least-squares fit of three available types: parabolic, hyperbolic, or exponential. Polynomial regression might alternatively beintroduced to advantage at this point.
314
/ Journol of Chemicol Education
this training with a mathematics course in problemoriented programming, but for the majority it is their major exposure to the computer. I n either event the hope is that the student will view digital computation as a natural and useful, even indispensable, tool of his profession. This attitude is fostered by assignments requiring linear regressions of experimentally obtained data using programs written by the student. Experiments (5) we have found to provide increasing complexity while retaining the desired sequence of topics and experimental techniques are determinations of (1) molecular weight by the Victor-Meyer method (a trivial case of linear regression with zero slope), (2) heat of vaporization from the temperature dependence of vapor pressure of a pure liquid, and (3) surface area of an adsorbent by a fit to the B.E.T. equation. By the time the student has successfully completed these assignments, he should be in a position to write a program for linear regressions2of other experimental data. Although this is encouraged throughout the remainder of the year, we have preferred to leave the final choice up to the individual student. While some find hand or graphical methods preferable, and in effect, gai? their computer training solely through assigned projects, most students continue to use the computer not only for linear regressions, but also for other computations. Occasional problems in homework assignments, beginning in the latter part of the first quarter of lecture, are deliberately chosen to entail lengthy arithmetic effort if done by hand, while nonetheless leading to computed quantities of great interest. A few of the better include calculations of Third-law entropies Temperature dependence of equilibrium constants in terms of polynomial heat-capacity expressions Adiabatic flame t,emperature Population distributions Equilibrium constants from spectral measurements
Through the above applications, the student is provided examples of the utility of the computer in reduction of experimental data, iteration for values of variables not admitting explicit solution, and solution of arithmetically laborious problems. Occasional use has been made of elementary "synthesis" problems, notably of ones involving direct computation of functions illustrating crucial physicochemical concepts. Two very useful examples are the van der Waals isotherm (5) and Planck's Law for the frequency distribution of black-body radiation. Two further examples of special significance follow.
Synthesis Computations Simulation of Experimental Results
Early in the spring quarter students are introduced to the concept of data simulation by means of an assignment requiring them to w i t e a program which finds the relative intensities of rotational peaks of the HC1 and DCI vibrational fundamentals using the Boltzmann distribution law and literature values of molecular parameters. The results are to be compared with spectra which the students themselves obtain in the laboratory. Although imperfect in some specific details due largely to the neglect of finite peak width and variation in transmission moment integrals, the calculations account quite impressively for what ordinarily appears to the uninitiated as a highly complicated physical observation. The comparison is shown in Figure 1 for HCI. With the expectation of confidence gained by the student in the success of predictions of spectra of 25°C he is asked to synthesize spectra a t a lower, and a t a higher, temperature; this also is illustrated in Fignre L3
B
in a Slater 2sp2 hybrid orbital ij. a t a network of points in a plane containing the symmetry axis. The computed values are transcribed to a piece of paper and contour lines are drawn through points of equal value. A somewhat better looking and physically more realistic picture is obtained by requiring a plot of a twc-dimensional "radial" probability densit.y ij.%r2. Analogously to an ordinary (one-dimensional) radial probability density function, contours of ij.2r2 connect points of equal probability of finding the electron at the distance r from the nucleus. Unlike an ordinary radial distribution, the angles 9 and 4, of which is here in general a function, have not been integrated out; +V2 thus measures the probability of finding the electron a t distance r, per unit distance in r, and per steradian solid angle. The project also entails finding analytic expressions for the radius at maximum probability (2m/Z), and the probahility of finding the electron in the major lobe (1/2 19 4\/6/108). An example of a student's contour diagram prepared in the above way is shown in Figure 2. Although somewhat inelegant, the essential features are represented with sufficient accuracy. An alternative technique, used more by students who are particularly intrigued by the capabilities of the computer, is illustrated by another student's contour diagram in Figure 3. The
+
+
D
Figure 1. Observed vibration fundament01 of HCI ot 25'C I A l and eolcvlated relative-intensity diagrams a t 25'C 181, 227°C ICI, and -73'C (Dl.
Visualizing Mothematical Relationships
Figure 2. Studen?. hand-drawn contow diagram of radial probobility density for on electron in a Slater sorbon 2rp2 hybrid orbital. Contovm ore ddawn for 0.02 (minor lobe only), 0.03. 0.05, 0.1, 0.15, 0.25, and 0.35 A-'steradim-'.
A major computer project in the final quarter of the lecture course is the construction of contour diagrams of electron density in an orbital. Of three which have been used, that encompassing the sigma and pi molecular orbitals in ethylene is the most instructive, but requires perhaps too much of the average student's time. That of the 3dz2 atomic orbital entails a more appropriate expenditure of time, but possibly tends to focus too much on atomic properties at the expense of covalent bonding. A good compromise appears to be the sp2 hybrid orbital of carbon. The assignment is to write a program which calculates the probability density function J'2 for an electron S A more elegant version of spectra sim~dationprovided by Thomas Gruhn (6) consists of x program which out,pnts a rotational-vihra1ion:d speclrorn with finite punk widths for m y di;~torn. Tho slodeut inpuk his selecth,n of tompe~.ntore,ntomic parameters, and force constant, and ohscrvcs in the oot,put the resulting spectrum.
Figwe 3. Student's computer output of diagram of radial probability density for on electron in o Sloter carbon 2sp2 hybrid orbital. Contour bonds have median valuer of o p p r o x i y ~ t e l y0.03 (A), 0.08 (81. 0.15 (C), 0.2 ID), 0.25 (El.0.3 IF), and 0.35 IGI A-lrtsradion-'.
Volume 48, Number 5, May 7971
/
315
program computes $2rZ in a cartesian grid as before, but it outputs an assigned symbol dependent on its value a t the corresponding point in the grid. An overhead projector display of transparencies of several of the students' diagrams is a valuable adjunct to an introductory discussion of molecular orbital theory. The computation of orbital contour diagrams can be made by hand, but the time required by most students is a serious deterrent. Yet there are few, if any, better ways of gaining confidence in the use of mathematical descriptions of orbitals than to undertake such a project oneself. Those who have undoubtedly possess a better grasp of the significance of, and distinctions between, probability density and probability, radial and volumetric probability density, and contour or boundary diagrams and angular representations of orbitals, than those who have not. The chemistry teacher's persistent use on the blackboard of inaccurate representations of orbitals, notably of a lopsided lemniscate in the present instance, can he misleading to the student (7) who does not have these distinctions well in hand.
of students, we conclude the time spent in that effort is amply rewarded by its pedagogical merit, quite apart from the computer background and experience it provides them. This experience surely will be useful to the bachelor's degree chemist, whether he does industrial or graduate worlc, and whether his future encounters with digital computation are head-on or tangential. Acknowledgment
The authors gratefully acknowledge the participation of Mr. Jerry Rose of the Instructional Computation Center, on the basis both of his able instruction of our students in elementary Fortran programming during two of the four years' experimentation reported here, and of his ready assistance otherwise. Terminal access and partial support of this worlc was provided through a National Science Foundation Grant for a Pilot Regional Educational Computer Network. Literature Cited DICXBON.
T. R., "The Computer and Chemistry." Freeman, San Frsn-
cisoo. 1968.
Conclusion
Experience with the use of these computer projects in the physical chemistry curriculum is considered to be highly favorable. Only occasionally have students responded adversely to this wedding of the computer to the subject material, and the demand made on them to program their own problems. For the vast majority
316 / Journal of Chemical Education
M n ~ ~ ~ s H., c x "Modern , Programming: Fortran IV," Blaisdell, Walth&m.Masa.. 1968. S m ~ w ~ r e D. n . P., A N D G ~ L A N D C.. W., "Experiments in Phyaioal Chemistry" (2nd ed.), MoGra%v-Hill, NervYork, 1967. Poone, J. H.. Jn.. IDM 1620 General Program Library, No. 7.0.020. "Empirical Equations by the Method of Leaat Squares," Louisiana Polyteol~ni~ InstituteComputiog Center, Ruston. La.. 1962. See also DANNAAOSER, W., "PVT Behsvior of Real Gases," J. CKEM. Ermc., 47,126 (1970). G R V ~ NT, n o ~ n aA,. University of San Francisco, private oommunieation. COPEN,I.. J. CXEII.EDUC..38.20 (1961).