Quantum Chemistry Laboratory at Home - Journal of Chemical

Sep 1, 2008 - The live CD contains a GNU/Linux operating system with free software to perform quantum chemistry calculations and to visualize their re...
2 downloads 4 Views 136KB Size
On the Web edited by

Computer Bulletin Board 

  Steven D. Gammon

Quantum Chemistry Laboratory at Home

Western Washington University Bellingham, WA  98225

Juan C. Paniagua,* Fernando Mota, Albert Solé, and Eudald Vilaseca Departament de Química Física, Universitat de Barcelona, C. Martí i Franquès 1, E-08028 Barcelona, Spain; *[email protected]

A primary goal of the university is to teach students to learn by themselves and to provide them the necessary tools for reaching this goal. This is a difficult task for experimental laboratory work, because of the expensive instrumentation needed. However, the generalized presence of personal computers in the home and the increasing power of these machines have made it feasible to bring computational work to the student’s home. This is easy to achieve when standard software is needed, but the quantum chemistry laboratory requires sophisticated programs that can be expensive and difficult to install (1). Moreover, we have found that in some cases the installation of the software interferes with software already present on the hard disk. To circumvent this problem two strategies have been proposed: (i) To install the software on a powerful server with a friendly Web interface that allows the students to send their calculation requests and get the results (2). The WebMO environment (3) is a good implementation of this idea. (ii) To provide the necessary programs in an auto-starting or live CD that can be used without having to perform installation.

The second option has some advantages: A powerful server is not needed and a Web page and computational package do not have to be maintained. Moreover, the student’s computer does not have to be connected to the Internet. Since the calculations are run on the student’s computer he or she will feel that quantum chemistry calculations are accessible and therefore will be more willing to use that tool in future work, whether it is related with other subjects of the chemistry degree or with a professional practice. However, there are also some disadvantages: First, the software contained in the CD cannot be updated so the students must obtain a new CD if they want to upgrade. Second, the wide variety of hardware makes it difficult to make a “universal” live CD so the CD may not run properly in some non-standard machines. Updating can be made easier by publishing new releases on a Web page so that the software can be adapted to the new hardware. This article describes our experience with a short quantum chemistry laboratory in which the required software is contained on a live CD. The students use it at the university’s computerroom to get acquainted with it. The CD is then given to the students so that they can complete or supplement the laboratory work in their homes and use it to prepare for the final exam. Lab Structure The quantum chemistry laboratory is placed at the end of a one-semester course in quantum chemistry and foundations of spectroscopy,1 after the theoretical part of the course and before the final exam. The laboratory exercise is described in a guide2 1288

that includes a brief explanation of the computational methods followed by a detailed description of the exercises and some questions about the results. Many of these exercises are oriented to induce the students to think about the causes of the discrepancies with experimental results, so as to provide them criteria for choosing the appropriate method for each application. The guide is self-explanatory so that the students can work at their own rate. The instructor does not need to spend time with general explanations and can concentrate in solving queries of individual students. Input files are provided,2 and the students only have to make minor changes on them so that they can skip some items that are dependent on each specific package and concentrate on the main aspects (type of calculation, basis set, geometry, etc.) of the exercises. Our goal is that the students are able to carry out elementary calculations with a standard quantum chemistry package, to interpret the results, and to have a general view of the standard applications. Lab Content The work done at the computational laboratory is structured in four sessions of 2.5 hours. Five types of exercises are proposed:

• Molecular orbital analysis (canonical and localized forms)



• Potential energy surfaces and equilibrium geometries



• Barriers for internal rotation about a bond



• Reaction path and transition state



• Normal mode analysis

To begin, the students look at the content of a simple input file—that of a minimal-basis restricted Hartee–Fock (RHF) calculation of HCl at a fixed geometry—with the aid of the explanations given in the guide. This way they grasp the philosophy of data specification much quicker than reading the package manuals. They are asked to write in their notebooks a list of the basis functions that will be used for the calculation, the number of electrons of the molecule, and the number of occupied and virtual orbitals that will result. Next they run the job, open the output file, and look at the most relevant information contained in the file with the aid of the guide. They check the data they had previously recorded and write the expression of each occupied molecular orbital as a linear combination of basis functions in their notebooks. Then they classify these orbitals as σ or π, according to the σ or π character of their atomic contributions and write the molecular electronic configuration. They also learn to distinguish internal from valence orbitals and to understand the total energy breakdown. The dipole moment orientation is seen to be in concordance with the population analysis. Then the students change the internuclear distance of HCl in the input file to perform several single-point calcula-

Journal of Chemical Education  •  Vol. 85  No. 9  September 2008  •  www.JCE.DivCHED.org  •  © Division of Chemical Education 

On the Web

tions to represent the potential energy curve together with the electronic and nuclear repulsion components. The equilibrium distance is obtained by changing the input specifications to perform a geometry optimization. From the potential energy curve the students get an estimation of the dissociation energy. Comparison with the experimental value is used to explain the inadequacy of RHF for describing bond breaking, and a 2 × 2 CI including the first excited configuration is shown to lead to a much more accurate result. A geometry optimization of the water molecule illustrates the importance of including polarization functions in the basis set to obtain realistic bond angles of molecules with nonbonding pairs. The students are asked to draw a sketch of the molecular orbitals from their minimal basis coefficients and to classify them as σ or π according to their symmetry with respect to the molecular plane. The bonding and anti-bonding character of each orbital between adjacent atoms is also discussed. These drawings are later checked with the representations produced by the graphical package. Localized orbitals are also calculated and represented and their connection to Lewis structures are shown. The ethane molecule is used to illustrate the significance of the dihedral internal coordinate. The students perform geometry optimizations at different fixed torsion angles to obtain the energy profile corresponding to a rotation of a methyl group with respect to the other methyl group. By representing the electronic energy and nuclear repulsion components the students discover that the rotational barrier is produced by electronic, rather than nuclear, repulsion. The concepts of reaction path and transition state are illustrated by studying a nucleophilic substitution reaction that can be approximately described with closed-shell calculations, that of F – with CH3CN to produce FCH3 and CN –. The transition-state geometry is shown to be intermediate between reactants and products. In particular, the students realize that the C−C distance stretches while the F−C one approaches a typical bond value. Reactants and products are shown to form van der Waals complexes at separations longer than typical bond distances. Semiempirical calculations are used to estimate the reaction enthalpy and ascertain the endothermic or exothermic character of the reaction. Qualitative information about the kinetics of the forward and backwards reaction is obtained from the potential energy barrier. Normal-mode calculations are performed on H2O and the significance of the coefficients of the force constant matrix eigenvectors is explained. The students use this information to sketch the normal modes, and the drawings are later checked with the representations provided by the graphical package. The IR activity of each normal mode is qualitatively predicted by analyzing the effect of the vibration on the electric dipole moment, and these predictions are contrasted with the calculated IR intensities. The frequencies calculated at the Hartee–Fock level of approximation are shown to differ from the experimental values in some hundreds of wavenumbers. These errors decrease by a factor of 10 when second-order Möller–Plesset calculations are performed with a split-valence basis set. A parallel study of CO2 shows that the symmetric mode distortion does not produce a dipolar moment and must then be IR inactive. Contrary to this, the bending and the asymmetric stretching are seen to produce dipolar moments that are, respectively, perpendicular and parallel to the internuclear equilibrium

axis, a fact that manifests in the band profile of the IR spectrum. The normal mode analysis is also applied to the transition state of the above reaction, showing the presence of a unique mode with imaginary frequency. This mode is shown to connect the reactants and product valleys on the potential energy surface. The Live CD Although many homes have, at least, one personal computer, many computer users do not have the technical knowledge necessary to install the software for carrying out the kind of practices described above, especially if this requires a Linux operating system. University computer-rooms normally have extensive use with different kinds of laboratories following one another during the semester. This makes it difficult to maintain the software, and a good deal of time has to be spent before the beginning of each laboratory to guarantee that the computers run properly. These two facts justify our interest in developing a live CD with a GNU/Linux operating system and all the software and documentation needed to carry out the quantum chemistry laboratory.3 The live CD has been adapted from the 5.0.1 release of the Knoppix distribution (4) of Debian GNU/Linux operating system (5). The following applications have been added:

• GAMESS (6), which is a complete and widespread quantum chemistry package with a tradition as open source software



• Molekel (7), a user-friendly graphics package for visualizing molecular geometries, electronic-structure data (molecular orbitals, electronic density, etc.), and normal modes

These packages are available free from their respective Web sites (5, 6). We have permission to use them at our university, so we can freely distribute them to the students to continue their laboratory work in their homes. The desktop is simple and clear. The only icons represent the available disks, the trash, and a read-me file with a brief presentation of the CD (contents and user instructions). The menu bar contains, besides the usual items, an icon to open a text terminal window, and others for launching a simple text editor (Kate), the Molekel package, the Open Office Suite, which is used to represent some of the results and to make reports, and the Iceweasel (Mozilla based) navigator. The GAMESS package is launched by means of a script that is run through a text terminal. Thus, to execute the program with the data contained in the input file “exercise1.inp” the students have to open a text terminal and type “rungms exercise1.inp” from the directory containing the data. A file named “exercise1. out” containing the calculation results is generated in the same directory. The user home contains a folder with the input files for the proposed exercises, the manuals of GAMESS, and the guide. Homework and Evaluation The students do some variations of the exercises performed at the laboratory as homework, for example, calculate the two rotational barriers of 1,1-difluoroethane or the inversion barrier of ammonia; repeat some of the calculations with larger basis sets; and so forth. They are evaluated through a series of ques-

© Division of Chemical Education  •  www.JCE.DivCHED.org  •  Vol. 85  No. 9  September 2008  •  Journal of Chemical Education

1289

On the Web

tions related to the preparation of input files and the interpretation of output files. These questions are part of a more general written exam that also includes theory and problems. Sample exams are provided to the students through a Web page. The evaluation through an exam motivates the students to learn and understand what they are doing in the laboratory sessions, and it provides an objective criterion to quantify their work. Since the students are not evaluated during the laboratory sessions they feel free to ask questions. Moreover, since the exam questions are closely related to the laboratory work, they typically complete unfinished work in their homes and use the live CD to review the exercises before the exam. The results of the evaluation are satisfactory. In fact, the students that have studied regularly during the course grasp the meaning of the practices quickly. For those not passing the final exam it is not mandatory to redo the computational laboratory, since they already know how to use the live CD and can work with it by themselves.

preparing reports, analyzing experimental data, and so forth. In particular, the g77 Fortran compiler has been made accessible for using the live CD in a half-semester course of introduction to that programming language. In this course the homework is especially important, and many students had serious problems with installing the compiler in their computers before having the live CD at their disposal. Every time they wrote a program they had to wait for a free computer at the computer-room to test it. Now they can work at home with an environment identical to that used in the laboratory.

Students Questionnaire

1. This is a compulsory subject placed in the fourth semester of an eight-semester chemistry degree, and it includes the following topics: quantum mechanics postulates and their application to simple systems, approximate methods, electronic structure of atoms and molecules, molecular motion, and the basis of spectroscopy. 2. The student’s guide in Spanish, which includes the proposed exercises, and the corresponding input files are available upon request from the authors. An English version of the read-me file that describes the contents of the package and the user instructions is also available. 3. This live CD is in Catalan and Spanish, the two official languages at the region where our university is located. For more information on the CD please contact the authors. 4. The questionnaire responses are based on using a previous version of the CD. Most of the technical issues have been addressed in the present release.

To assess the students’ view on the usefulness of the live CD in the university lab and at home, its easiness of use, the technical issues, and other related questions, students completed a questionnaire. About 90% of the students (n = 215) were taking the subject for the first time, and 83% frequently used computers; however, few students regularly used the Linux operating system. The live CD was used at home by 78% of the students; 9% could not use it because of technical problems,4 3% did not have a personal computer, and 10% gave other reasons for not using it. In some cases the computer was configured so that it looked for the operating system in the hard disk before searching for a CD. This search order must be reversed in the BIOS so that the computer can be started from the live CD. The way of making this change depends of the computer brand so that we could not give detailed instructions; however, most of the students succeeded in doing it. The vast majority of students (93%) found the tool useful, especially for completing the work done at the computer-room (58%), for reviewing the subject before the exam (78%), and for completing their work (75%). In fact, the most intensive use of the tool was made during the weeks previous to the exam (66%). Most students viewed the CD is an interesting tool that helped them learn the subject (81%) and motivated them to deepen their understanding (64%). A majority of the students (85%) stated that they were satisfied with this experience. In spite of having almost no previous experience with Linux, they found it easy to work with (84%), and some of them (23%) have also used the application software contained in the CD for other subjects. Other Applications of the Live CD The quantum chemistry software included in the live CD can also be used in more advanced courses and even for occasional research work. We have kept most of the application software included in the original Knoppix distribution, so that the students can get acquainted with the GNU project and the open source software. Many of the students used it for applications other than quantum chemistry; especially for 1290

Acknowledgment We would like to acknowledge financial support from the ICE of the University of Barcelona under the program REDICE-04. Notes

Literature Cited 1. Karpen, M. E.; Henderleiter, J.; Schaertel, S. A. J. Chem. Educ. 2004, 81, 475. 2. Bocarsly, J. R.; David, C. W. J. Chem. Educ. 1998, 75, 640. 3. WebMO Home Page. http://www.webmo.net/ (accessed Apr 2008). 4. Knoppix Home Page. http://www.knoppix.org/ (accessed Apr 2008). 5. Debian Home Page. http://www.debian.org/ (accessed Apr 2008). 6. Gordon, M. GAMESS Home Page. http://www.msg.chem.iastate. edu/gamess/gamess.html (accessed Apr 2008). 7. Molekel Home Page. http://www.cscs.ch/molekel/ (accessed Apr 2008).

Supporting JCE Online Material

http://www.jce.divched.org/Journal/Issues/2008/Sep/abs1288.html Abstract and keywords Full text (PDF) Links to cited URLs and JCE articles Supplement English translation of the file read-me contained in the live CD QQuantix 2.3

Journal of Chemical Education  •  Vol. 85  No. 9  September 2008  •  www.JCE.DivCHED.org  •  © Division of Chemical Education