Introductory Quantum Mechanics with MATLAB® Introductory Quantum Mechanics with MATLAB® For Atoms, Molecules, Clusters, and Nanocrystals James R. Chelikowsky Author Prof. James R. Chelikowsky University of Texas at Austin Institute for Computational Engineering and Sciences Center for Computational Materials 201 East 24th Street Austin, TX 78712 United States Cover: © agsandrew/iStockphoto All books published by Wiley-VCH are carefully produced. Nevertheless, authors, editors, and publisher do not warrant the information contained in these books, including this book, to be free of errors. Readers are advised to keep in mind that statements, data, illustrations, procedural details or other items may inadvertently be inaccurate. Library of Congress Card No.: applied for British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. Bibliographic information published by the Deutsche Nationalbibliothek The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available on the Internet at <http://dnb.d-nb.de>. © 2019 Wiley-VCH Verlag GmbH & Co. KGaA, Boschstr. 12, 69469 Weinheim, Germany All rights reserved (including those of translation into other languages). No part of this book may be reproduced in any form – by photoprinting, microfilm, or any other means – nor transmitted or translated into a machine language without written permission from the publishers. Registered names, trademarks, etc. used in this book, even when not specifically marked as such, are not to be considered unprotected by law. Print ISBN: 978-3-527-40926-6 ePDF ISBN: 978-3-527-65501-4 ePub ISBN: 978-3-527-65500-7 oBook ISBN: 978-3-527-65498-7 Cover Design Tata Consulting Services Typesetting SPi Global, Chennai, India Printing and Binding Printed on acid-free paper 10 9 8 7 6 5 4 3 2 1 To Ellen vii Contents Preface xi 1 Introduction 1 1.1 Different Is Usually Controversial 1 1.2 The Plan: Addressing Dirac’s Challenge 2 Reference 4 2 The Hydrogen Atom 5 2.1 The Bohr Model 5 2.2 The Schrödinger Equation 8 2.3 The Electronic Structure of Atoms and the Periodic Table 15 References 18 3 Many-electron Atoms 19 3.1 The Variational Principle 19 3.1.1 Estimating the Energy of a Helium Atom 21 3.2 The Hartree Approximation 22 3.3 The Hartree–Fock Approximation 25 References 27 4 The Free Electron Gas 29 4.1 Free Electrons 29 4.2 Hartree–Fock Exchange in a Free Electron Gas 35 References 36 5 Density Functional Theory 37 5.1 Thomas–Fermi Theory 37 5.2 The Kohn–Sham Equation 40 References 43 6 Pseudopotential Theory 45 6.1 The Pseudopotential Approximation 45 6.1.1 Phillips–Kleinman Cancellation Theorem 47 viii Contents 6.2 Pseudopotentials Within Density Functional Theory 50 References 57 7 Methods for Atoms 59 7.1 The Variational Approach 59 7.1.1 Estimating the Energy of the Helium Atom. 59 7.2 Direct Integration 63 7.2.1 Many-electron Atoms Using Density Functional Theory 67 References 69 8 Methods for Molecules, Clusters, and Nanocrystals 71 8.1 The H2 Molecule: Heitler–London Theory 71 8.2 General Basis 76 8.2.1 Plane Wave Basis 79 8.2.2 Plane Waves Applied to Localized Systems 87 8.3 Solving the Eigenvalue Problem 89 8.3.1 An Example Using the Power Method 92 References 95 9 Engineering Quantum Mechanics 97 9.1 Computational Considerations 97 9.2 Finite Difference Methods 99 9.2.1 Special Diagonalization Methods: Subspace Filtering 101 References 104 10 Atoms 107 10.1 Energy levels 107 10.2 Ionization Energies 108 10.3 Hund’s Rules 110 10.4 Excited State Energies and Optical Absorption 113 10.5 Polarizability 122 References 124 11 Molecules 125 11.1 Interacting Atoms 125 11.2 Molecular Orbitals: Simplified 125 11.3 Molecular Orbitals: Not Simplified 130 11.4 Total Energy of a Molecule from the Kohn–Sham Equations 132 11.5 Optical Excitations 137 11.5.1 Time-dependent Density Functional Theory 138 11.6 Polarizability 140 11.7 The Vibrational Stark Effect in Molecules 140 References 150 12 Atomic Clusters 153 12.1 Defining a Cluster 153 Contents ix 12.2 The Structure of a Cluster 154 12.2.1 Using Simulated Annealing for Structural Properties 155 12.2.2 Genetic Algorithms 159 12.2.3 Other Methods for Determining Structural Properties 162 12.3 Electronic Properties of a Cluster 164 12.3.1 The Electronic Polarizability of Clusters 164 12.3.2 The Optical Properties of Clusters 166 12.4 The Role of Temperature on Excited-state Properties 167 12.4.1 Magnetic Clusters of Iron 169 References 174 13 Nanocrystals 177 13.1 Semiconductor Nanocrystals: Silicon 179 13.1.1 Intrinsic Properties 179 13.1.1.1 Electronic Properties 179 13.1.1.2 Effective Mass Theory 184 13.1.1.3 Vibrational Properties 187 13.1.1.4 Example of Vibrational Modes for Si Nanocrystals 188 13.1.2 Extrinsic Properties of Silicon Nanocrystals 190 13.1.2.1 Example of Phosphorus-Doped Silicon Nanocrystals 191 References 197 A Units 199 B A Working Electronic Structure Code 203 References 206 Index 207 xi Preface It is safe to say that nobody understands quantum mechanics. Richard Feynman. Those who are not shocked when they first come across quantum theory cannot possibly have understood it. Niels Bohr. The more success the quantum theory has, the sillier it looks. Albert Einstein. When some of the scientific giants of the twentieth century express doubt about a theory, e.g. referring to it as a “silly” or “shocking” theory, one might ask whether it makes sense to use such a theory in practical applications. Well, it does – because it works. Bohr, Einstein, and Feynman were reflecting on the exceptional nature of quantum theory and how it differs so strongly from previous theories. They did not question the success of the theory in describing the microscopic nature of matter. Indeed, quantum theory may be the most successful and revolutionary theory devised to date. The theory of quantum mechanics provides a framework to accurately predict the spatial and energetic distributions of electronic states and the concurrent properties in atoms, molecules, clusters, nanostructures, and bulk liquids and solids. As a specific example, consider the electrical conductivity of elemental crystals. The ratio of the conductivities for a metal crystal such as silver to an insulating crystal such as sulfur can exceed 24 orders of magnitude. A comparable ratio is the size of our galaxy divided by the size of the head of a pin, i.e. an astronomical difference! Classical physics provides no explanation for such widely different conductivities; yet, quantum mechanics, specifically energy band theory, does. That is the good news. The bad news is that quantum theory can be extraordinarily difficult to apply to real materials. There are a variety of reasons for this. One notable characteristic of quantum theory is the wave –particle duality of an electron, i.e. sometimes an electron behaves like a point particle, other times it behaves like a wave. When asked if an electron is a particle or a wave, an expert in quantum theory might respond with the seemingly incongruous answer: yes. xii Preface This is one reason why quantum theory seems so paradoxical and strange within the framework of traditional physics. Using quantum mechanics, we cannot ascertain the spatial characteristics of an electron by enumerat- ing three spatial coordinates. Rather, quantum mechanics can only give us information on where the electron is likely to be, not where it actually is. The probabilistic nature of quantum theory adds many degrees of freedom to the problem. We need to specify a probability for finding an electron at every possible point in space. As a first pass, this issue alone would appear to doom any quantitative approach to solving for the quantum behavior of an electron. Yet, the intellectual framework and the computational machinery have developed in spurts over the last several decades, which makes practical approaches to quantum mechanics feasible. Numerous textbooks often discuss the machinery of how to apply quantum mechanics, but fail to give the reader practical tools for accomplishing this goal. This is an odd situation whose origin likely resides in intellectual “latency.” In the not too distant past, it would require a huge and complex computer code, run on a large mainframe, to do quantum mechanics for a relatively small molecule. This is no longer the case. A modest amount of computing power, such as that available with a laptop computer or in principle even a “smartphone,” is sufficient to allow one to implement quantum theory for many systems of interest such as atoms, molecules, clusters, and other nanosacle structures. The goal of this book is to illustrate how this framework and machinery works. We will endeavor to give the reader a practical guide for applying quantum mechanics to interesting problems. Many people are owed thanks to this effort. Yousef Saad helped me frame many of the electronic structure codes and gave guidance about algorithms for solv- ing complex numerical problems. I also express a deep appreciation to a number of mentors and friends, including Marvin Cohen, Jim Phillips, and Steve Louie. Of course, I also thank my students and postdocs who did much of the heavy lifting. Austin, Texas James R. Chelikowsky 1 1 Introduction The great end of life is not knowledge but action. – T. H. Huxley 1.1 Different Is Usually Controversial Perhaps all breakthroughs in science are initially clouded with controversies. Consider the discovery of gravity. Isaac Newton invoked the concept of “action at a distance” when he developed his theory of gravity. Action at distance couples the motion of objects; yet, the objects possess no clear physical connection. Newton argued that the motion of an apple falling from a tree was similar to the motion of the moon falling toward (and fortunately missing) the earth. The source of the motion of both objects is consistent with an “action at a distance” caused by the presence of the earth and its gravitational field. We can contrast the trajectory of the moon with a simpler object such as a golf ball. It is easy to understand that a golfer can make the ball move by striking it. A ball struck just right will carry hundreds of yards (or meters). Residents of New- ton’s time would be comfortable with this idea. The golf club directly contacts the ball, albeit for a very short time. The physical connection to the ball is the club swung by the golfer. But how can the earth change the moon’s trajectory? The earth does not carry a big golf club to strike the moon. While the action at a distance theory may not be apparent to a lay person, or even a good scientist in Newton’s time, the laws of gravity predicted the behavior of astronomical bod- ies such as the moon’s orbit incredibly well. Hardly anyone would argue that we ignore the practical application of Newton’s theory until someone resolved this action at distance business. For years, scientists argued the meaning of “action at distance” and the nature of space itself. Eventually, scientists agreed that the con- cept of Newtonian space was problematic. It was left to Einstein to straighten out issues of space, time, and gravity. In some sense, it hardly mattered if you wanted to predict planetary motion. A practical application of Newton’s theory accom- plished that really well, save some relatively minor fixes from Einstein. (We are not going to worry about issues such as worm holes or gravity waves.) Introductory Quantum Mechanics with MATLAB® : For Atoms, Molecules, Clusters, and Nanocrystals, First Edition. James R. Chelikowsky. © 2019 Wiley-VCH Verlag GmbH & Co. KGaA. Published 2019 by Wiley-VCH Verlag GmbH & Co. KGaA. 2 1 Introduction Perhaps one should view the theory of quantum mechanics in the same man- ner. The theory remains “mysterious” in some ways. Oddly, some of the central components of the theory are understandable only because we can think about them in classical terms. Still, quantum theory can be used to predict properties of matter with unprecedented accuracy. Upon the invention of quantum mechanics, the famous physicist Dirac wrote the following [1]: The underlying physical laws necessary for the mathematical theory of a large part of physics and the whole of chemistry are thus completely known, and the difficulty is onlythattheexactapplicationoftheselawsleadstoequationsmuchtoocomplicated to be soluble. It therefore becomes desirable that approximate practical methods of applyingquantummechanicsshouldbedeveloped,whichcanleadtoanexplanation of the main features of complex atomic systems with out much computation … Dirac’s quote of nearly a century ago is correct and appropriate. In principle, the underlying physical laws (of quantum mechanics) should allow one to pre- dict “much of physics” (condensed matter physics as an example) and “the whole of chemistry.” What stands in our way is a practical machinery to accomplish this task. Computational physicists often refer to this task as addressing Dirac’s Challenge. Dirac’s warning about avoiding “too much computation” is an anachronism. Dirac’s world of 1929 did not envision a computer capable of carrying out billions or trillions of mathematical operations within a second. When we contemplate the use of a modest computer, such as a laptop, for the work outlined in this book, it is indeed “without too much computation.” 1.2 The Plan: Addressing Dirac’s Challenge Dirac’s challenge for us is to develop “approximate practical methods of apply- ing quantum mechanics.” The goal of this book is to address, or better start to address, the challenge. The book is roughly divided into three parts. The first part will focus on the theory. We will use a minimum of theory to get to the “good part.” Our intent is not to write a quantum mechanics textbook. Rather, our intent in this part of the book is to review essential features. For example, we will consider the simplest of all atoms, hydrogen, and we will start with the simplest of theories from Bohr. We will then introduce the Schrödinger equation and briefly sketch out how to solve the hydrogen atom problem analytically. The hydrogen atom is one of the rarest of quantum systems – one where we can do an analytical solution of the Schrödinger equation. The next several chapters will involve introducing the real problem, one with more than a single electron. A clear example of such a system is helium, where we have two electrons. Our study of the helium atom will lead us to consider the Hartree and Hartree–Fock 1.2 The Plan: Addressing Dirac’s Challenge 3 approximations. Our next objective will be to consider a practical method for more than one or two electrons. A practical theory for this is based on “density functional theory,” which focuses on how electrons are distributed in space. A logical pathway to take us from Hartree–Fock theory to density functional theory arises from a “free electron” model. We introduce this model using concepts removed from the physics of an isolated atom. We will “backtrack” in our discussions to consider some solid-state physics concepts. Theories based on electron density will provide some key approximations. In particular, we will begin with the Thomas–Fermi approximation, which can lead to contem- porary density functional theories. This approach will allow us to consider a “one-electron” Schrödinger equation to solve a many-electron problem. The last chapter of this section will center on the “pseudopotential approxima- tion.” This key approximation will allow us to fix the length and energy scales of the many-electron problem by considering only the chemically relevant elec- tronic states. The pseudopotential approximation treats an element such as lead on an equal footing with an element such as carbon. Both lead and carbon have the same configuration for the outermost, or valence, electrons. These chemically active states provide the chemical bond or “electronic glue” that holds atoms, clusters, molecules, and nanocrysals together. The next part of the book illustrates numerical methods. Numerical methods are important as there are few atomic systems that can be solved analytically, save the aforementioned hydrogen atom. This is also true for classical systems where analytically only the two-body system is solvable. We initially consider an isolated, spherically symmetric atom. We introduce the variational method and show how approximate wave functions can be used to obtain accurate estimates for the exact solution. We also solve the problem by integrating a one-dimensional equation. We will consider solutions for many-electron atoms and molecules, using a numerical basis. This is the standard method for most quantum chemistry approaches to molecules and atoms, although it may not be the best method for these systems, especially for pedagogical purposes. An alternate is to solve the problem in real space on a grid. This approach is easy to implement and understand. With either a basis or a grid approach, we solve an “eigenvalue problem.” Iterative methods can solve such problems and we will illustrate this. The last part of the book demonstrates the application of quantum theory to atoms, molecules, and clusters using a common numerical method. Physical concepts such as pseudopotentials, density functional theory, and a real-space grid form the underpinnings for computing a solution of the electronic structure problem. The pseudopotential model of solids is widely used as the standard model for describing atomistic systems. The model divides electronic states into those that are valence states (chemically active) and those that are core states (chemically inert). For example, systems made up of silicon atoms have valence states derived from the atomic 3s23p2 configuration. The valence states form bonds by promoting a 3s electron to form sp3 bond. One can omit the core states 1s22s22p6 altogether in pseudopotential theory. As such, the energy and length scales for determining a basis are set by the valence state.