Simultaneous Calculation of the Equilibrium Atomic Structure and Its Electronic Ground State Using Density-Functional Theory
Total Page:16
File Type:pdf, Size:1020Kb
Computer Physics Communications 79 (1994) 447—465 Computer Physics North-Holland Communications Simultaneous calculation of the equilibrium atomic structure and its electronic ground state using density-functional theory Roland Stumpf and Matthias Scheffler Fritz-Haber-Institut der Max-Planck-Gesellschaft, Faradayweg 4-6, D-14 195 Berlin (Dahlem), Germany Received 12 October 1993 This computer program solves self-consistently the Kohn—Sham equations for the valence electrons using the iterative method suggested by Car and Parrinello. The atomic geometry is determined simultaneously using a damped dynamics approach. The computer code can handle isolated atoms, clusters, crystals, surfaces, and defects. The materials can be semiconductors and metals. The code is especially optimized to treat systems with hundreds of atoms, yet the hardware needs are just a <15k$ workstation. PROGRAM SUMMARY Title of program: f h i 93 c p No. of lines in distributed program, including test data, etc.: 48230 Catalogue number: ACTF Keywords: density-functional theory, local-density approxima- Program obtainable from: CPC Program Library, Queen’s tion, ab-initio pseudopotentials, plane-wave basis, supercell, University of Belfast, N. Ireland (see application form in this chemical binding, total-energy, structure optimization, crys- issue) tals, defects in crystals, surfaces, molecules Licensing provisions: Persons requesting the program must Nature of physical problem sign the standard CPC non-profit use license (see license In poly-atomic systems, such as molecules [1,2], crystals and agreement printed in every issue). defects in crystals [3,4], and surfaces [5—9], it is highly desirable to evaluate the electronic structure and to deter- Computer for which the program is designed and others on mine the stable as well as metastable atomic geometry from which it has been tested: first principles and without introducing severe approxima- Computer: IBM RS/6000 370, CONVEX C-220, CRAY tions. For a correct treatment of the chemical binding it is Y-MP, IBM-PC; Installation: Fritz-Haber-Institut der Max- most important to take the quantum-mechanical kinetic-en- Planck-Gesellschaft, Berlin ergy operator as well as the self-consistent electronic charge density into account. The main challenge of state-of-the-art Operating system: UNIX calculations is to treat systems composed of 100 or more atoms without any restrictions to the system symmetry. Programming language used: FORTRAN 77 The computer code described below enables such calcula- tions, where the only (possibly relevant) approximation is the Memory required to execute with typical data: 2—500 MB exchange-correlation energy functional, which is taken in the local-density approximation [101. We use the frozen-core No. of bits in a word: 32 approximation, treating the ions by ab-initio, fully separable pseudopotentials [11,12]. Memory required to execute with typical data: 4 MB Method of solution _________ The momentum-space method [4,13] is the most efficient way Correspondence to: R. Stumpf, Sandia National Laboratories, to calculate the Hamiltonian in a plane-wave basis set. To Albuquerque, NM 87185-1111, USA (present address). E-mail: [email protected]. 0010-4655/94/$07.00 © 1994 — Elsevier Science BY. All rights reserved SSDI 0010-4655(93)E0137-C 448 R. Stumpf, M Scheffler / Simultaneous calculation of the equilibrium atomic structure solve the eigenvalue problem and to achieve self-consistency [4] WE. Pickett, Comput. Phys. Rep. 9 (1989) 117. Car and Parrinello [14] proposed an iterative approach, where [5] J. Hebenstreit, M. Heinemann, and M. Scheffler, Phys. in each iteration the Hamilton operator is applied to the wave Rev. Lett. 67 (1991) 1031. functions. This gives the analog of a force on each wave-func- J. Hebenstreit and M. Scheffler, Phys. Rev. B 46 (1992) tion coefficient which points towards the electronic ground 10134. state. The program uses this iterative approach for the [6] J. Neugebauer and M. Scheffler, Phys. Rev. B 46 (1992) electronic wave functions and optimizes the total energy with 16067. respect to the atomic-structure degrees of freedom by a [7] 0. Pankratov and M. Scheffler, Phys. Rev. Lett. 70 (1983) damped dynamics, using the Hellman—Feynman forces on the 351. ions. [8] R. Stumpf and P.M. Marcus, Phys. Rev. B 47 (1993) 16016. Restrictions on the complexity of the problem [9] R. Stumpf and M. Scheffler, Phys. Rev. Lett. 72 (1994) Only pseudopotentials with s- or p-non-locality can be used in 254. the present version and they should be given in a separable [10] D.M. Ceperley and B.J. Alder, Phys. Rev. Lett. 45 (1980) form, as for example listed in ref. [12]. The shape and size of 1814. the cell may not change during the calculation. [11] L. Kleinman and D.M. Bylander, Phys. Rev. Lett. 48 (1982) 1425. Typical running time: 6 mm [12] X. Gonze, R. Stumpf and M. Scheffler, Phys. Rev. B 44 (1991) 8503. References R. Stumpf and M. Scheffler, Research report of the [1] W. Andreoni, F. Gygi and M. Parrinello, Phys. Rev. Lett. Fritz-Haber-Institut (1990). 68 (1992) 823. [13] J. Ihm, A. Zunger and ML. Cohen, J. Phys. C 12 (1979) [2] N. Troullier and J.L. Martins, Phys. Rev. B 46 (1992) 4409. 1754. [14] R. Car and M. Parrinello, Phys. Rev. Lett. 55 (1985) [3] J. Dabrowski and M. Scheffler, Phys. Rev. Lett. 60 (1988) 2471. 2183; Phys. Rev. B 40 (1989) 10391. LONG WRITE-UP 1. Introduction The plane-wave, ab-initio pseudopotential methods in density-functional theory (DVF) for the electronic structure have been used successfully in recent years to describe the electronic, structural, elastic, and vibrational properties of poly-atomic aggregates [1—9]. Car and Parrinello [14] introduced several technically important ideas which reduce the computational task to solve the Kohn—Sham equations [151of density-functional theory (DFT) self-consistently. Using a plane-wave basis set the Hamiltonian Z is represented as a M x M matrix, which is not diagonalized explicitly, but only has to be repeatedly applied to the N lowest trial eigenfunctions ~ Here N is slightly larger than the number of occupied states but clearly smaller than M. This multiplication of Z times can be done efficiently, using the fast Fourier transformation (FFT) technique and fully separable, ab-initio pseudopotentials [4,11—13].The computer code described below can be applied to metals as well as to insulators and semiconductors. For metals, the Fermi smearing of occupation numbers according to the single-particle eigenvalues e~is introduced. In this case the free energy F at the electronic temperature T~1is minimized and the energy is then extrapolated to the Tel —* 0 value, E zero By using single precision when ever possible for data storage (computations are always done in double precision!), and by making efficient use of virtual memory, the fast memory needs are kept low (see, e.g., our technique for doing the orthogonalization of the wavefunctions in routine g r a h a m). The evaluation of the non-local part of the pseudopotential of atoms sitting at lattice sites is speeded up dramatically, avoiding a repeated evaluation of the same integrals. Much effort was taken to reduce the number of iterations necessary to achieve the self-consistent convergence and for increasing the convergence stability. As a starting charge density we use a superposition of contracted atomic densities. This way the starting charge density becomes already R. Stumpf, M. Scheffler / Simultaneous calculation of the equilibrium atomic structure 449 similar to the self-consistent charge density [16]. To generate the first set of wave-functions the Kohn—Sham Hamiltonian constructed from this charge density is diagonalized in a reduced plane-wave basis set. The resulting electron density is mixed with a large fraction (90%) of the starting density in order to suppress long wavelength charge density oscillations from the beginning (charge sloshing, 1/G2 instability, see ref. [4]). This mixing is reduced gradually to zero during the first seven iterations. The change of the energy and the displacement of the wavefunctions is monitored during the self-consistency iterations. By adjustment of the iterative timestep and the mixing coefficient and by moving the atoms only after forces are converged, instabilities are avoided. To get a smooth convergence for metallic systems, additionally the change of Fermi occupation numbers is damped by introducing fictitious eigenvalues [17]. These eigenvalues follow a damped equation of motion where the driving forces point towards the correct eigenvalues, so that in the end both sets of eigenvalues will be the same. The fictitious eigenvalues are used to calculate the occupation numbers according to a Fermi distribution. In calculations of slab systems with an intrinsic dipole moment a compensating electric field is used. Its change during a calculation also has to be damped to avoid oscillations. In the following section 2 we recall briefly the method. The computer code and the input data are then described in section 3. Section 4 explains how the program shall be installed and the input and output of the test run are described in section 5. 2. Self-consistent solution of the Kohn—Sham equations The key quantity of density-functional theory is the electron density n(r), which is calculated from the single-particle wave functions ~ n(r) = EfJOCC I~(r)I2, (1) 1=1 where f~°~are the occupation numbers typically given by the Fermi distribution. The wave functions obey the Kohn—Sham equations [15] (2) We use Hartree atomic units. The exchange-correlation potentials is given by ~xc(n(r)) = ~[n(r) xc(n(r))J (3) where exc(n(r)) is the exchange-correlation energy per electron. It is taken from the results of the homogeneous electron gas by Ceperley and Alder [10] as parametrized by Perdew and Zunger [19].