O (N) Methods in Electronic Structure Calculations
Total Page:16
File Type:pdf, Size:1020Kb
O(N) Methods in electronic structure calculations D R Bowler1;2;3 and T Miyazaki4 1London Centre for Nanotechnology, UCL, 17-19 Gordon St, London WC1H 0AH, UK 2Department of Physics & Astronomy, UCL, Gower St, London WC1E 6BT, UK 3Thomas Young Centre, UCL, Gower St, London WC1E 6BT, UK 4National Institute for Materials Science, 1-2-1 Sengen, Tsukuba, Ibaraki 305-0047, JAPAN E-mail: [email protected] E-mail: [email protected] Abstract. Linear scaling methods, or O(N) methods, have computational and memory requirements which scale linearly with the number of atoms in the system, N, in contrast to standard approaches which scale with the cube of the number of atoms. These methods, which rely on the short-ranged nature of electronic structure, will allow accurate, ab initio simulations of systems of unprecedented size. The theory behind the locality of electronic structure is described and related to physical properties of systems to be modelled, along with a survey of recent developments in real-space methods which are important for efficient use of high performance computers. The linear scaling methods proposed to date can be divided into seven different areas, and the applicability, efficiency and advantages of the methods proposed in these areas is then discussed. The applications of linear scaling methods, as well as the implementations available as computer programs, are considered. Finally, the prospects for and the challenges facing linear scaling methods are discussed. Submitted to: Rep. Prog. Phys. arXiv:1108.5976v5 [cond-mat.mtrl-sci] 3 Nov 2011 O(N) Methods 2 1. Introduction Electronic structure calculation methods based on the density functional theory (DFT) have been playing important roles in condensed matter physics for more than forty years. In the early stages, DFT calculations were employed mainly for the study of the electronic structure of simple solids, using a few atoms in a unit cell, with the use of periodic boundary conditions. Since then, there has been a huge effort to improve the accuracy and efficiency of the calculation techniques. In terms of efficiency, after the pioneering work by Car and Parrinello [1], the size of the target systems has increased dramatically and more and more examples of the DFT studies, especially on aperiodic systems like surface structures, have emerged. DFT calculations on systems containing hundreds of atoms are currently ubiquitous. As the system size for DFT calculations has become larger, the variety of materials and phenomena investigated by the method has increased. The information of the total energy and atomic forces calculated by DFT methods can provide reliable data independently from experiments, and the methods are nowadays considered as one of the established research tools in many fields, like physics, chemistry, materials science, and many others. Recently, there have been DFT studies in the complex fields of nano-structured materials and biological systems. In the study of these classes of materials, we need to treat systems containing at least thousands of atoms. However, as is well known, once the number of atoms N in a system reaches around one thousand, the cost of standard DFT calculations increases very rapidly as a cube of N. To overcome this problem, the methods known as linear-scaling or O(N) DFT methods have been developed [2]. The progress of these methods in the last ten to fifteen years is remarkable and the purpose of this review paper is to overview the recent progress of O(N) DFT methods. We will start with an overview of the conventional DFT method and its advantages. In the normal DFT approach, we solve for the Kohn-Sham (KS) orbitals Ψνk(r), which are the eigenstates of the KS equation [3]. " h¯ # H^ KSΨ (r) = − r2 + V (r) + V (r) + V (r) Ψ (r) = Ψ (r)(1) νk 2m ext H XC νk νk νk Here H^ KS is the Kohn-Sham Hamiltonian, and ν and k are the band index and k points in the first Brillouin zone, respectively. Hereafter, we omit k for clarity because we consider large systems and the number of k points is small. Vext(r) is the potential from nuclei, VH (r) is the Hartree potential, and VXC(r) is the exchange-correlation potential in the Kohn-Sham formalism. The most accurate DFT calculations often use a plane-wave basis set to express the KS orbitals: X Ψν(r) = cν(G) exp(iG · r) (2) jGj<Gmax A plane-wave basis set has two main advantages. First, the accuracy of the basis set can be systematically improved. In Eq. (2), Gmax is obtained from the cutoff energy Ecut 2 2 ¯h Gmax as 2m = Ecut. The number of plane-waves, NG, is controlled only by the number O(N) Methods 3 Ecut. The accuracy of the basis set can be improved simply by increasing Ecut, and a variational principle with respect to Ecut is satisfied. The other advantage is that forces can be calculated easily without the Pulay correction term because the basis set is independent on atomic positions (though such basis-set-dependent corrections become necessary when changing the unit cell size or shape). These two advantages make it possible to calculate both energy and forces accurately with plane-wave basis sets. In order to realise accurate plane-wave calculations, we need to introduce several theoretical techniques. First of all, plane-wave calculations rely on the idea of pseudopotentials [4]. With this method, it is possible to work only with valence electrons and their pseudo-wavefunctions, which are much smoother than the real wave functions which oscillate strongly in the core region, and to replace the nuclear potential and the core electrons with a pseudopotential. There have been several kinds of techniques proposed to make pseudo-wavefunctions smoother [5{7]. Using the method of ultra-soft pseudopotentials [8], even the cutoff energy for the localised 3d orbitals of transition metals can be reduced dramatically. With these improvements in theoretical techniques, the total energy converges quickly with respect to the cutoff energy and this is essential to make the accurate DFT calculations feasible. In addition, the major part of the error in the total energy usually comes from the expression of KS orbitals in the core region. Hence, the relative energetic stability of two states (e.g. two different atomic structures) can be reproduced without the absolute convergence because most of the errors are cancelled in the energy difference. Note that it is also possible to reduce the number of plane-waves by using augmentation for the wavefunctions in the core region as in the linearised augmented plane-wave (LAPW) or the projector augmented wave (PAW) method [9]. It is essential that we reduce the number of plane-waves by introducing the pseudopotential or other similar techniques. However, even with very smooth pseudo wavefunctions, NG is typically one hundred times larger than the number of electrons. KS 0 2 When we want to diagonalise < GjH jG >, the required memory scales as O(NG) and 3 CPU time as O(NG). Hence it is impossible to employ direct (exact) diagonalisation except for very small systems. Instead of using exact diagonalisation, we can obtain the Kohn-Sham orbitals by minimising the DFT total energy with respect to the coefficients fcν(G)g, as shown in the work by Car and Parrinello [1]. Since we only need the occupied Kohn-Sham orbitals in such iterative methods, the memory requirement to 2 store fcν(G)g is proportional to NBNG, which is roughly 100 times smaller than NG. Then, we update the coefficients fcν(G)g by calculating the gradient of the total energy with a constraint to keep the KS orbitals orthogonal to each other. This is done by KS KS calculating (H −Λν,ν0 ) or H −ν with Gram-Schmidt orthogonalisation of fcν(G)g. In the calculation of the Kohn-Sham Hamiltonian, we need to calculate the density n(r). For this, we first calculate n(r) as X ∗ n(r) = fνΨν(r)Ψν(r) (3) ν 2 If we perform this in a straightforward way, we need the operations of O(NG) for each O(N) Methods 4 band ν, and the total number of operations needed for the transformation from fcν(G)g 2 to Ψν(r) is of the order of NBNG, which is quite expensive. However, we can dramatically reduce the cost of the calculation using the fast Fourier transform (FFT) method, and the number of operations in Eq. (3) becomes NBNG ln(NG). Although Eq. (3) is still the most expensive part in the calculations of small systems for many plane-wave DFT codes, the reduction of the computational cost by the FFT method is essential for the success of plane-wave DFT calculations. The orthogonalisation of the KS orbitals is also an expensive operation, which R 0 includes the calculations drΨν(r)Ψν0 (r) for all pairs of band indices fν; ν g. The total 2 cost of the operations is O(NBNG), but we can see that it is only proportional to NG. As we have seen, in the iterative method with the plane-wave basis set, there are no 2 operations where the cost increases as fast as NG. This is the reason why we can do efficient calculations even with large NG. The iterative diagonalisation technique, FFTs, and ab initio pseudopotentials used in the plane-wave calculations are the key factors which make it possible to employ accurate but efficient DFT calculations. Using these techniques, with the increase of the computer power, the time for solving KS equations has become smaller and smaller, and the system size for the target of DFT studies has become larger and larger.