Handbook of Computational Quantum Chemistry DAVID B. COOK The Department of Chemistry, University of Sheffield Oxford New York Tokyo OXFORD UNIVERSITY PRESS 1998
CONTENTS 1 Mechanics and molecules 1 1.1 Introduction 1 1.2 Time-independent Schrödinger equation 4 1.3 The Born-Oppenheimer model 6 1.4 The Pauli principle 8 1.5 The orbital model 10 1.6 The determinantal method 13 1.7 Physical interpretation 15 1.8 Non-determinantal forms 17 1.9 The Variation principle 18 1.10 Summary 21 l.a Atomic units 23 l.b Standard Notation for Quantum Chemistry 25 l.b.l Introduction 25 1.B.2 The Hamiltonian 25 l.b.3 Many-electron wavefunctions 26 1.B.4 Spin-orbitals 27 l.b.5 Linear expansions for the spatial orbitals 27 1.B.6 Primitive Gaussians 28 l.b.7 Single determinant energy expression 29 1.B.8 Notation for repulsion integrals 31 l.b.9 Spatial orbital repulsion integrals 32 l.b.10 Basis function repulsion integrals 32
xii CONTENTS 2 The Hartree-Fock Method 34 2.1 Introduction 34 2.2 The variational method 35 2.3 The differential Hartree-Fock equation 36 2.4 Canonical form 44 2.5 Orbital energies 45 2.6 Physical Interpretation 47 2.7 Direct parametric minimisation 48 2.8 Summary 49 2.A Single-determinant energy expression 50 2.A.1 Introduction 50 2.A.2 The normalisation integral 52 2.A.3 One-electron terms 56 2.A.4 Two-electron terms 60 2.A.5 Summary 65 3 The matrix SCF equations 70 3.1 Introduction 70 3.2 Notation 72 3.3 The expansion 73 3.4 The energy expression 75 3.5 The numerator: Hamiltonian mean value 75 3.6 The denominator: normalisation condition 79 3.7 The Hartree-Fock equation 80 3.8 "Normalisation": the Lagrangian 81 3.9 Preliminary summary 82 3.10 Some technical manipulations 83 3.11 Canonical orbitals 87 3.12 The total energy 89 3.13 Summary 90
CONTENTS xiii 3.A Atomic orbitals 92 3.B Charge density 94 3.C Properties of the J and K matrices 97 3.C.1 Mathematical properties 97 3.C.2 Physical interpretation 99 3.C.3 Supermatrices 100 3.D An artifact of expansion 102 3.D.4 Lowest State of a given symmetry 102 3.E Single determinant: choice of orbitals 104 3.E.5 Orthogonal invariance 104 3.E.6 Koopmans' theorem 105 3.E.7 Localised orbitals 106 3.E.8 "Zeroth-order" perturbed orbitals 107 4 A special case: closed Shells 108 4.1 Introduction 108 4.2 Notation for the closed-shell case 109 4.3 Closed-shell expansion 109 4.4 The closed-shell "HF" equation 110 4.5 Closed-shell summary 113 5 Implementation of the closed-shell case 114 5.1 Preview 114 5.2 Vectors, matrices and arrays 115 5.3 The implementation: getting started 121 5.4 The implementation: repulsion integral access... 137 5.5 Building a testbench: conventional SCF 147 5.6 Another testbench: direct SCF 154 5.7 Summary 162 5.8 What next? 162
xiv CONTENTS 5.A Jacobi diagonalisation 164 5.A.1 Introduction 164 5.A.2 The problem 165 5.A.3 The Solution 166 5.A.4 Implementation 167 5.A.5 Other diagonalisation methods 170 5.B Orthogonalisation 171 5.B.6 Introduction 171 5.B.7 Functions of a matrix 173 5.B.8 Implementation 174 5.C getint and data for H^O \11 5.D Coding the Standard index loops 181 6 Improvements: tools and methods 185 6.1 Introduction 185 6.2 Versions: conditional compilation 186 6.3 Improved diagonalisation 192 6.4 Simple interpolation 195 6.5 Improving the formation of G(R) 197 6.6 Summary 199 7 Molecular integrals: an introduction 201 7.1 Introduction 201 7.2 Basis functions 202 7.3 AOs and atom-centred-functions 203 7.4 Multi-dimensional integral evaiuation 205 7.5 Molecular integrals over STOs 206 7.6 Basis functions of convenience 215 7.7 Gaussian basis functions 216 7.8 The contraction technique 234
CONTENTS xv 8 Molecular integrals: implementation 236 8.1 Introduction 236 8.2 Data structures 237 8.3 Normalisation 240 8.4 Overview; the general structure 243 8.5 Complex code management: the WEB System... 249 8.6 AworkingWEB 256 8.7 Some comments on the WEB 266 8.8 The füll integral codes 267 8.A Source for the WEB of fmch 268 9 Repulsion integral storage 274 9.1 Introduction 274 9.2 A storage algorithm 274 9.3 Implementation: putint 276 9.4 A partner for putint; getint 282 9.5 Conclusion 284 10 "Virtual Orbitals" 285 10.1 Introduction 285 10.2 Virtual orbitals in practice 286 10.3 The Virtual space in LCAO 291 10.4 Conclusions 295 10.A Perturbation theory 296 10.A.1 Introduction 296 10.A.2 Perturbation theory 296 10.A.3 Perturbation theory for matrix equations 301
xvi CONTENTS 11 Choice of tools 303 11.1 Existing Software 303 11.2 Why ratfor? 306 11.3 The Revision Control System: RCS 308 11.A RCS: version control 310 ll.a.l Motivation 310 11.A.2 Introduction 310 11.A.3 Getting started with RCS 311 12 Open Shells: implementing UHF 314 12.1 Introduction 314 12.2 Choice of constraints 315 12.3 Organising the basis 317 12.4 Integrals over the spin-basis 318 12.5 Implementation 320 12.6 J and K for GUHF 321 12.7 The GUHF testbench 326 12.8 Interpreting the MO coefficients 329 12.9 DODS or GUHF? 332 12.10 Version 1 of the SCF code 333 12.11 WEB Output for function scf 337 12.12 Comments 345 12.A WEB Source for the scf code 346 12.B Blocking the Hartree-Fock matrix 351 12.B.1 The block form of the HF matrix 351 12.B.2 Implementation 352
CONTENTS xvii 12.C The Aufbau principle 363 12.C.3 Introduction 363 12.C.4 The second Variation 363 12.C.5 Special case: a single excitation 365 13 Population analysis 367 13.1 Introduction 367 13.2 Densities and spin-densities 368 13.3 Basis representations: charges 369 13.4 Basis-function analysis 372 13.5 A cautionary note 374 13.6 Multi-determinant forms 375 13.7 Implementation 376 14 The general MO functional 377 14.1 A generalisation 377 14.2 Shells of orbitals 378 14.3 The variational method 380 14.4 A single "Hartree-Fock" Operator 383 14.5 Non-orthogonal basis 386 14.6 Choice of the arbitrary matrices 388 14.7 Implementation: Stacks of matrices 390 14.A Projection Operators and SCF 400 14.A.1 Introduction: Optimum single determinant 400 14.A.2 Alternative SCF conditions 402 14.A.3 R matrices as projection Operators 403
xviii CONTENTS 15 Spin-restricted open shell 406 15.1 Introduction 406 15.2 The ROHF model 407 15.3 Implementation 408 15.4 A WEB for spin-restricted open shell 409 16 Banana skins: unexpected disasters 436 16.1 Symmetry restrictions 437 16.2 Anions 438 16.3 Aufbau exceptions 439 16.4 Summary 441 17 Molecular symmetry 442 17.1 Introduction 442 17.2 Symmetry and the HF method 443 17.3 Permutational symmetry of the basis 445 17.4 Implementation 450 17.5 Permutation symmetry: summary 466 18 Symmetry orbital transformations 467 18.1 Introduction 467 18.2 Symmetry-adapted basis 470 18.3 Generation of symmetry Orbitals 473 18.4 Conclusions 476 19 A symmetry-adapted SCF method 477 19.1 Introduction 477 19.2 Permutations only 480 19.3 Füll implementation; linear combinations 489 19.4 Summary 494
CONTENTS xix 19.A Kronecker product notation 495 19.A.1 Basis transformations 495 19.A.2 Basis-product transformations 495 19.A.3 Density matrix transformations 497 19.A.4 Transformations in the HF matrix 498 19.A.5 Practice 500 20 Linear multi-determinant methods 501 20.1 Correlation and the Hartree-Fock model 501 20.2 The configuration interaction method 502 20.3 The valence bond method 503 20.4 Restricted Cl 504 20.5 Symmetry-restricted Cl 510 20.6 More general Cl 512 20.7 Nesbet's method for large matrices 513 20.8 "Direct" Cl 519 20.9 Conclusions 524 20.A The "orthogonal VB" model 525 20.B DCI matrix elements 527 21 The valence bond model 530 21.1 Non-orthogonality in expansions 530 21.2 Spins and spin functions 531 21.3 Spin eigenfunctions and permutations 535 21.4 Spin-free VB theory 539 21.5 Summary 544
xx CONTENTS 22 Doubly-occupied MCSCF 545 22.1 Introduction: natural orbitals 545 22.2 Paired-excitation MCSCF 548 22.3 Implementation 553 22.4 Partial Paired-Excitations; GVB 553 22.5 Details of GVB 556 22.6 Implementation 561 23 Interpreting the McWeenyan 562 23.1 Introduction 562 23.2 Stationary points 563 23.3 Many shells 565 23.4 Summary 566 24 Core potentials 567 24.1 Introduction 567 24.2 Simple orthogonalization 569 24.3 Transforming the Hartree-Fock equation 570 24.4 The pseudopotential 574 24.5 Arbitrariness in the pseudo-orbital 576 24.6 Modelling atomic pseudopotentials 579 24.7 Modelling atomic core potentials 581 24.8 Several valence electrons 584 24.9 Atomic cores in molecules 588 24.10 Summary 589
CONTENTS xxi 25 Practical core potentials 591 25.1 Introduction 591 25.2 Forms for the core potentials 591 25.3 Core potential integrals 595 25.4 Implementation 604 26 SCF perturbation theory 605 26.1 Introduction 605 26.2 Two forms for the HF equations 606 26.3 Self-consistent perturbation theory 609 26.4 The method 610 26.5 Conciusions 618 27 Time-dependent perturbations: RPA 621 27.1 Introduction 621 27.2 Time-dependent Hartree-Fock theory 621 27.3 Oscillatory time-dependent perturbations 623 27.4 Seif consistency 626 27.5 Implementation 627 27.A "Random phase approximation" 629 27.B Time-dependent Variation principle 631 28 Transitions and stability 633 28.1 Introduction 633 28.2 Transitions 634 28.3 The transition frequencies 635 28.4 Finite perturbations; oscillations 636 28.5 Stability; the time-independent case 638 28.6 Implementation 639
xxii CONTENTS 29 Two-electron transformations 640 29.1 Orbital transformations 640 29.2 Strategy 641 29.3 Transformation without sorting 643 29.4 Transformations with sorting 654 29.5 Summary 656 29.AA bitof fun: MP2 657 29.A.1 Derivation 657 29.A.2 Implementation 660 30 Geometry optimisation: derivatives 671 30.1 Introduction 671 30.2 Derivatives and perturbation theory 672 30.3 Derivatives of variational Solutions 674 30.4 Parameter-dependent basis functions 676 30.5 The derivative of the SCF energy 677 30.6 Derivatives of molecular integrals 681 30.7 Derivatives of non-variational energies 682 30.8 Higher derivatives 684 30.9 Summary 684 31 The Semi-empirical approach 686 31.1 Introduction 686 31.2 Use of Coulomb's law 687 31.3 Atomic data 689 31.4 Simulation or calibration? 690 31.5 General conclusions 691
CONTENTS xxüi 32 Density functional theory 693 32.1 Introduction 693 32.2 Hohenberg and Kohn's proofs 695 32.3 Kohn-Sham equations: introduction 700 32.4 Kohn-Sham equations 703 32.5 Non-Iocal Operators in orbital theories 705 33 Implementing the Kohn-Sham equations 708 33.1 A precursor: The Hartree-Fock-Slater model... 708 33.2 Implementation of the Kohn-Sham method 710 33.3 The kinetic energy density 715 33.4 Gradients in the exchange-correlation energy... 717 33.5 Numerical integration of densities 717 33.6 Summary 720 34 Semi-numerical methods 722 34.1 Non-variational expansions 722 34.2 The pseudospectral method 724 34.3 The discrete variational method 729 35 Additional reading and other material 732 35.1 Additional reading 732 35.2 Additional material by ftp 734