
Lecture notes Numerical Methods in Quantum Mechanics Corso di Laurea Magistrale in Fisica Interateneo Trieste { Udine Anno accademico 2020/2021 Paolo Giannozzi University of Udine Contains software and material written by Furio Ercolessi1 and Stefano de Gironcoli2 1Formerly at University of Udine 2SISSA - Trieste Last modified May 27, 2021 Contents Introduction 1 0.1 About Software . .1 0.1.1 Compilers . .1 0.1.2 Visualization Tools . .2 0.1.3 Mathematical Libraries . .2 0.1.4 Pitfalls in C-Fortran interlanguage calls . .3 0.2 Bibliography . .4 1 One-dimensional Schr¨odingerequation 5 1.1 The harmonic oscillator . .5 1.1.1 Units . .6 1.1.2 Exact solution . .6 1.1.3 Comparison with classical probability density . .8 1.2 Quantum mechanics and numerical codes . .9 1.2.1 Quantization . .9 1.2.2 A pitfall: pathological asymptotic behavior . .9 1.3 Numerov's method . 10 1.3.1 Code: harmonic0 . 12 1.3.2 Code: harmonic1 . 13 1.3.3 Laboratory . 15 2 Schr¨odingerequation for central potentials 16 2.1 Variable separation . 16 2.1.1 Radial equation . 18 2.2 Coulomb potential . 18 2.2.1 Energy levels . 20 2.2.2 Radial wave functions . 20 2.3 Code: hydrogen radial . 21 2.3.1 Logarithmic grid . 21 2.3.2 Improving convergence with perturbation theory . 22 2.3.3 Laboratory . 24 3 Scattering from a potential 25 3.1 Short reminder of the theory of scattering . 25 3.2 Scattering of H atoms from rare gases . 27 3.3 Code: crossection . 28 i 3.3.1 Laboratory . 30 4 The Variational Method 31 4.1 The variational principle . 31 4.1.1 Demonstration of the variational principle . 31 4.1.2 Alternative demonstration of the variational principle . 32 4.1.3 Variational principle for the ground state energy . 33 4.2 The variational method in practice . 34 4.2.1 Expansion into a basis set of orthonormal functions . 35 4.2.2 Secular equation . 36 4.3 Plane-wave basis set . 37 4.4 Code: pwell . 38 4.4.1 Diagonalization routines . 39 4.4.2 Laboratory . 40 5 Non-orthonormal basis sets 41 5.1 Variational method for non-orthonormal basis set . 41 5.1.1 Gaussian basis set . 43 5.1.2 Other kinds of localized basis functions . 43 5.2 Code: hydrogen gauss . 44 5.2.1 Laboratory . 45 6 Self-consistent field 47 6.1 The Hartree-Fock method . 47 6.1.1 Slater determinants . 48 6.1.2 Hartree-Fock equations . 48 6.1.3 Hartree and exchange potentials . 50 6.1.4 Hartree-Fock and correlation energy . 51 6.1.5 Helium atom . 52 6.2 Code: helium hf radial . 53 6.2.1 Laboratory . 54 7 Molecules 55 7.1 Born-Oppenheimer approximation . 55 7.2 Potential Energy Surface . 56 7.3 Diatomic molecules . 57 7.4 Rothaan-Hartree-Fock equations . 58 7.4.1 Multi-center Gaussian integrals . 60 7.5 Code: h2 hf gauss . 61 7.5.1 Laboratory . 62 8 Electrons in periodic potential 63 8.1 Crystalline solids . 63 8.1.1 Periodic Boundary Conditions . 64 8.1.2 Bloch Theorem . 65 8.1.3 The empty potential . 65 8.1.4 Solution for the crystal potential . 66 ii 8.1.5 Plane-wave basis set . 67 8.2 Code: periodicwell . 69 8.2.1 Laboratory . 70 9 Pseudopotentials 72 9.1 Three-dimensional crystals . 72 9.2 Plane waves, core states, pseudopotentials . 73 9.3 Code: cohenbergstresser . 74 9.3.1 Laboratory . 76 10 Exact diagonalization of quantum spin models 77 10.1 The Heisenberg model . 77 10.2 Hilbert space in spin systems . 78 10.3 Iterative diagonalization . 79 10.4 Code: heisenberg exact ...................... 80 10.4.1 Computer Laboratory . 82 11 Density-Functional Theory 83 11.1 Hohenberg-Kohn theorem . 83 11.2 Kohn-Sham equations . 84 11.3 Approximated functionals . 85 11.4 Structure of a DFT code . 86 11.4.1 Matrix elements of the potential . 87 11.4.2 FFT and FFT grids . 88 11.4.3 Computing the charge density . 89 11.4.4 Computing the potential . 90 11.4.5 Laboratory . 90 A Real-space two- and three-dimensional grids 92 B Solution of time-dependent Schr¨odingerequations 94 B.1 Discretization in time: Crank-Nicolson algorithm . 95 B.2 Direct discretization of the time evolution operator . 96 C Derivation of Van der Waals interaction 98 D The Helium atom 100 D.1 Perturbative treatment for Helium atom . 100 D.2 Variational treatment for Helium atom . 101 D.3 Beyond-HF treatment for Helium atom . 102 D.4 Laboratory . 104 E More about pseudopotentials 105 E.1 An early idea . 105 E.2 A modern view . 106 iii Introduction The aim of these lecture notes is to provide an introduction to methods and techniques used in the numerical solution of simple (non-relativistic) quantum- mechanical problems, with special emphasis on atomic and condensed-matter physics. The practical sessions are meant to be a sort of \computational lab- oratory", introducing the basic ingredients used in the calculation of materials properties at a much larger scale. The latter is a very important field of today's computational physics, due to its technological interest and potential applica- tions. The codes provided during the course are little more than templates. Stu- dents are expected to analyze them, to run them under various conditions, to examine their behavior as a function of input data, and most important, to interpret their output from a physical point of view. The students will be asked to extend or modify those codes, by adding or modifying some functionalities. For further insight on the theory of Quantum Mechanics, many excellent textbooks are available (e.g. Griffiths, Schiff, or the ever-green Dirac and Lan- dau). For further insight on the properly computational aspects of this course, we refer to the specialized texts quoted in the Bibliography section, and in particular to the book of Thijssen. 0.1 About Software This course assumes some basic knowledge of how to write and execute simple programs, and how to plot their results. All that is needed is a Fortran or C compiler and some visualization software. The target machine is a PC running Linux, but you can also use a Macintosh or a Windows PC, as long as the mentioned software is installed and working, and if you know how to use it in practice. For Windows 10, the path of least resistance is to enable the Windows Subsystem for Linux (WSL-2) and to install a Linux distribution and an X window client. This gives access to a very functional Linux shell. 0.1.1 Compilers In order to run a code written in any programming language, we must first translate it into machine language, i.e. a language that the computer can understand. The translation is done by an interpreter or by a compiler: the former translates and immediately executes each instruction, the latter takes the file, produces the so-called object code that together with other object codes 1 and with libraries is finally assembled into an executable file. Python, Java, or at an higher level, Matlab, Mathematica, are examples of \interpreted" language. Fortran, C, C++ are \compiled" languages. Our codes are written in Fortran 90 (or 95, or later). This is a sophisti- cated and complex language offering dynamical memory management, arrays operations (e.g. matrix-vector products), modular and object-based structure. Fortran 90 maintains a wide compatibility with existing Fortran 77 codes, while remaining as efficient as Fortran 77 was. It is worth mentioning that the first applications of computers to physics date back to well before the birth of mod- ern computer languages like C++, python, or even C: there is a large number of codes and libraries written in Fortran 77 (or even Fortran 66!) and still widely used in physics. Even among physicists, however, Fortran is no longer as common and widespread as it used to be, but online resources are still easy to find1. The codes themselves are very simple and make little usage of advanced language features. In any case, there is no problem if a student prefers to use a more widespread language like C/C++. A version of all codes in C is also available, with no warranty about the quality of the C code in terms of elegance and good coding practice. In all cases, you need a C or Fortran compiler. The C compiler gcc is free and can be installed on all operating systems (in Linux PCs it is always present). Less-then-archaic versions of gcc include a Fortran compiler, called gfortran. 0.1.2 Visualization Tools Visualization of data produced by the codes (wave functions, charge densities, various other quantities) has a central role in the analysis and understanding of the results. Code gnuplot can be used to make two-dimensional or three- dimensional plots of data or of analytical expressions. gnuplot is open-source software, available for all operating systems and often found pre-installed on Linux PCs. An introduction to gnuplot, with many links to more resources, can be found in http://www.gnuplot.info/help.html. Another software that can be used is Grace2, formerly known as xmgr. This is also open-source and highly portable, has a graphical user interface and thus it is easier to use than gnuplot, whose syntax is not always easy to remember. 0.1.3 Mathematical Libraries The usage of efficient mathematical libraries is crucial in \serious" calculations. Some of the codes use routines from the BLAS3 (Basic Linear Algebra Subpro- grams) library and from LAPACK4 (Linear Algebra PACKage).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages111 Page
-
File Size-