i' R. C. Reiter and J. E. House, Jr. Illinois State University Normal, 61761
Teaching Computer Methods in Undergraduate Chemistry Courses
This paper describes some of the methads and interesting results of teaching undergraduate chemistry students the basics of computer programming. The use of the computer as a tool for research and teaching has increased rapidly in recent years. Because of this increased emphasis, there has recently been a large number of publications dealing with some of the teaching and elementary research aspects of this usage. There have been about twenty papers in THIS JOURNAL alone since the beginning of 1965. We have felt for some time that it is imperative for students to become familiar wit,h the use of this tool as early as possible, preferably as undergraduates. A-lthough students in some fields are normally introduced to computer methods as undergraduates, this is not generally the case with chemistry students. It is impossible for many of our undergraduate majors to fit the very popular computer science courses into their schedules. We have therefore undertaken a program which we feel does an adequate job of introducing all of our chemistry majors to the basics of computer use, with a minimal time investment. We feel that some literacy in com1 HOUSE,Jn., J. E., press.
AND
R. C. REITER, J. CHEM.EDUC.,in
puter applications is a necessity for chemistry students, and this is the objective of our efforts. For some of our students, the introduction to computer methods begins in the freshman year in a class of carefully screened and selected students. Due to time limitations, instruction is carried out during laboratory periods. Blocks of laboratory time are scheduled on t,he computer for open shop work. During this time the students are also instructed in the operation of the key punch and other peripheral equipment. The programming instruction is in FORTRAhT 11-D for use with the IBM 1620 Computer wit,h hfonitor I System. Some freshman programs that have been writ,ten (with substantial instructor assistance) are a Born-Haber cycle program showing the effect of the sevcral energies on the lattice energy and a program for errors in calculating hydrogen ion conceot,rat~ionin solutions of weak acids.' A more sophisticated approach is used for computer instruction in the physical chemistry laboratory course. The basic lecture topics consist of (1) Naming, modes, and'snbscript,ing of constants and variables (2) In~ilt,-ootoutcommands and format st,at,ements (3) ~ h t h m e t , &statements and logical choices and bmnehing, with emphasis on "Do Loops"
Volume 45, Number
7,July 1968 / 465
BONDING
Figure 1.
ANTIBONDING
Coordinate system wed in H~+cdculotion.
(4) Snmplc averagingprogrxm illnstratitig formation of a rnn~ting sum.
The presentation described requires approximately 2 hr. After t,his initial instn~ct,ion,the students, in small groups, develop a "least squares" program which they use for the treatment of data from some hypothetical physical chemistry experiments. Minimal help from the instructor results in a variety of programming errors, and the resulting "de-bugging" of the programs is highly educational in itself. Subsequently, a vapor pressure experiment and kinetics experiments yield data which are treated using the least squares programs. In the second semester, we use to much advantage a charge density calculat,ion for the hydrogen atom and the hydrogen molecule ion. This teaching technique gives t,he students a real appre~iat~ion of and insight into the nature and physical significance of wave functions. By printing the results in the form of a contour map, thc calculations for the hydrogen molecule ion provide a good insight into the nature of bonding and antibonding molecular orbitals. This has, in fact, proved to be the most. popular exercise. Because of this, and its simplicity, we include here the details of the calculations for t,he hydrogen molecule ion. The coordinate system used for the HzC calculations is as shown in Figure 1. An internuclear distance of 1.06 A was used,> and the parameters labeled to conform with their represent,ations in the program. An unnormalixed hydrogen atom 1s wave function3 was used to construct simple bonding and antibonding molecularorbitals. The complete program for these calculations is shown in Figure 2. The pictorial representation of the output array, scaled for direct interpretaC
P*"S,