<<

PHYSICAL REVIEW B 66, 245104 ͑2002͒

Targeting specific eigenvectors and eigenvalues of a given Hamiltonian using arbitrary selection criteria

Alan R. Tackett Department of Physics and Astronomy, Vanderbilt University, Nashville, Tennessee 37235

Massimiliano Di Ventra Department of Physics and Center for Self-Assembled Nanostructures and Devices, Virginia Polytechnic Institute and State University, Blacksburg, Virginia 24061-0435 ͑Received 9 May 2002; revised manuscript received 1 July 2002; published 5 December 2002͒ We present a method for calculating some select eigenvalues and corresponding eigenvectors of a given Hamiltonian. We show that it is possible to target the eigenvalues and eigenvectors of interest without diago- nalizing the full Hamiltonian, by using any arbitrary physical property of the eigenvectors. This allows us to target, for example, the eigenvectors based on their localization properties ͑e.g., states localized at a given surface or interface͒. We also show that the method scales linearly with system size.

DOI: 10.1103/PhysRevB.66.245104 PACS number͑s͒: 71.15.Ϫm, 31.15.Ct, 31.15.Ew

I. INTRODUCTION criteria other than the eigenenergies are more relevant to tar- get specific eigensolutions of a given Hamiltonian, e.g., the The calculation of the eigenvalues and corresponding localization properties of the functions at surfaces or eigenvectors of a given Hamiltonian H is of fundamental interfaces. importance in . In many physical prob- We present in this paper an alternative approach to target lems, it is enough to determine the eigensolutions of H that select eigenvalues and corresponding eigenvectors by using correspond to the lowest-energy states of the spectrum. In arbitrary physical properties of the eigensolutions. The this case, several numerical methods are available that effi- method relies on the use of the Jacobi-Davidson technique10 ciently allow us to diagonalize H with respect to the lowest- that does not require ‘‘squaring’’ the Hamiltonian operator as energy states.1–5 However, there are many physics problems in the FS method, but solves the eigenvalue equation di- that require knowledge of only some select eigenvalues and rectly. This technique does not suffer from either of the FS corresponding eigenvectors of H, which are not the lowest- problems and can easily be extended to generalized eigen- energy states of the spectrum, and for which the diagonaliza- value problems resulting from the use of particular methods tion of the full Hamiltonian is computationally very expen- and technicalities for the solution of the Schro¨dinger equa- sive if not impossible.6–8 For these problems, the tion, such as the projector augmented wave ͑PAW͒ method11 determination of such eigensolutions presents a challenge. To or the use of ultrasoft pseudopotentials12 or a nonorthogonal this end, Wang and Zunger6 developed a method ͓the so- basis set. called ‘‘folded spectrum ͑FS͒’’ method͔ which scales linearly The paper is organized as follows. In Sec. II, we will with system size rather than the usual cubic scaling required briefly outline the problem we want to address and its current by traditional matrix diagonalization techniques.9 The solution within the FS method. In Secs. III and IV, we method consists of ‘‘folding’’ the eigenvalues of the spec- present the Jacobi-Davidson method that represents the core trum around a given reference energy and ‘‘squaring’’ the of the alternative approach we propose. In Sec. V its practi- resulting Hamiltonian operator.6 Using Hamiltonians con- cal implementation is outlined. In Sec. VI, we discuss its structed from semiempirical pseudopotentials, those authors convergence properties and scalability with system size. Fi- have successfully applied the technique to a number of inter- nally, in Sec. VII, we discuss few examples of application of esting problems including the calculation of the dielectric the present approach where different selection criteria are properties of quantum dots,7 variation of the band gap with used. size, and the solution of the ‘‘inverse band- 8 structure problem.’’ In all of these cases only a relatively II. THE EIGENVALUE PROBLEM small fraction of the total number of eigensolutions of the Schro¨dinger equation was determined around a specific en- The main concern in electronic structure calculations is ergy. However, the ‘‘squaring’’ of the Hamiltonian operator solving the eigenvalue problem, in the FS method greatly increases the difficulty in solving ␺ ϭ␧ ␺ ͑ ͒ the original eigenvalue problem. Moreover, in electronic H i i i , 1 structure calculations, the solution of a generalized eigen- 11,12 ␺ value problem is sometimes required. The FS method where i’s are the electronic wave functions, H is the system ␧ could, in principle, be extended to such cases but at the cost Hamiltonian, and the i’s are the energy eigenvalues. Equa- of a significant increase in solving difficulty. In addition, the tion ͑1͒ can represent, for instance, a set of Kohn-Sham13 FS method can only handle reference energies as selection equations to determine the ground-state properties of a given criterion. However, in certain physical problems selection system. A generalized eigenvalue equation can occur if a

0163-1829/2002/66͑24͒/245104͑7͒/$20.0066 245104-1 ©2002 The American Physical Society A. R. TACKETT AND M. DI VENTRA PHYSICAL REVIEW B 66, 245104 ͑2002͒ nonorthogonal basis set is chosen or as a result of the dling generalized eigenvalue problems poses no difficulty. In pseudopotential formalism.11,12 The generalized eigenvalue the following, we refer to the latter case to illustrate the problem is defined as method. The method consists of solving the projected eigenprob- ␺ ϭ␧ ␺ ͑ ͒ H i iO i , 2 lem with different search and test subspaces. The search sub- ϭ͓ ͔ where the new operator O is called the overlap operator. space V v1 v2•••vn spans the space of the possible so- ϭ͓ ͔ There are several techniques for trying to find a few of the lutions, and the test subspace W w1 w2•••wn provides a smallest or largest eigenvalues, but few of them are effective space for testing the quality of the solutions. In most appli- in finding selected eigenvalues inside the spectrum.14 Fur- cations, the test and search subspaces are the same, leading thermore, all of these methods rely on the eigenvalues as the to the following equation for the projected generalized eigen- selection criterion, and cannot be generalized to using other value problem: selection criteria. † ϭ␧ † ͑ ͒ V HVui iV OVui . 5 ␺newϭ A. Folded spectrum method The new eigenvectors are then calculated as i Vui . However, when targeting selected interior eigenvalues There are few methods for solving interior eigenvalue ␧ problems.22 The most successful approach to date is the around some reference energy ref , it is more advantageous folded spectrum method.6 This technique is based upon fold- to make the test and search subspaces different. This leads to ␧ the following equation: ing the eigenvalue spectrum around a reference energy ref , thus shifting the lowest eigenstate of the resulting system to W†HVu ϭ␧ W†OVu . ͑6͒ that closest to the reference energy. The resulting eigenvalue i i i equation is If the test space is chosen as ͑HϪ␧ ͒2␺ ϭ͑␧ Ϫ␧ ͒2␺ , ͑3͒ ϭ Ϫ␧ ͒ ͑ ͒ ref i i ref i W ͑H refO V, 7 which is then solved with standard techniques to find the and W is made orthogonal, W†WϭI, the eigenvalue prob- 6 lowest-energy states. The main disadvantage of this tech- lem can be solved in an efficient way. First, let us shift the nique is that ‘‘squaring’’ the effective Hamiltonian operator ␧ spectrum with the reference energy ref , also ‘‘squares’’ the condition number, which is directly re- ␺ ϭ␧ ␺ lated to the difficulty in solving the FS equation. This in- H i iO i , crease in the condition number makes solving the FS method Ϫ␧ ͒␺ ϭ ␧ Ϫ␧ ͒ ␺ much more difficult. As stated by the authors of the FS ͑H refO i ͑ i ref O i , method,15 a typical case requires ϳ100 conjugate gradient ͑ ͒ ˜ ␺ ϭ˜␧ ␺ ͑ ͒ CG steps per energy band per iteration. Each CG step re- H i iO i , 8 quires two applications of H due to the squaring operation. ˜ ϭ Ϫ␧ ˜␧ ϭ␧ Ϫ␧ This corresponds to ϳ200 applications of H per band per where H H refO and i i ref . iteration. As the authors of FS method also point out, this is Now we can apply the oblique projection with WϭH˜ V ␺ ϭ about the ‘‘square’’ of the normal number of CG steps re- and i Vui to the eigenvalue equation giving quired for solving the original eigenvalue equation.15 † ˜ ϭ˜␧ † ͑ ͒ W HVui iW OVui . 9 B. Extending the FS method to generalized eigenvalue problems Because W is orthogonal, we obtain

Even if never used in this context, the FS method can W†H˜ Vu ϭ˜␧ W†OVu , easily be extended to handle generalized eigenvalue prob- i i i lems. The resulting generalized folded spectrum equation is † ϭ˜␧ † W Wui iW OVui , Ϫ␧ ͒ Ϫ1 Ϫ␧ ͒␺ ϭ ␧ Ϫ␧ ͒2 ␺ ͑ ͒ ͑H refO O ͑H refO i ͑ i ref O i . 4 1 W†OVu ϭ u , However, from the above equation it is obvious that now i ˜␧ i the condition number and difficulty has increased ‘‘cubi- i cally’’ over the original eigenvalue problem, and we have 16 1 implicitly assumed that the O operator can be inverted. W†OH˜ Ϫ1Wu ϭ u , ͑10͒ i ˜␧ i i III. JACOBI-DAVIDSON METHOD since VϭH˜ Ϫ1W. The Jacobi-Davidson method,10 briefly described here, is Notice that this choice of the test subspace is mathemati- an oblique projection method that solves the eigenvalue cally equivalent to using a normal orthogonal projection equation directly. This means that the condition number and method for computing the eigenvalues of difficulty in solving for the selected eigensolutions is the ˜ Ϫ1ϭ Ϫ␧ ͒Ϫ1 ͑ ͒ same as the original eigenvalue equation. As a result, han- H ͑H refO . 11

245104-2 TARGETING SPECIFIC EIGENVECTORS AND . . . PHYSICAL REVIEW B 66, 245104 ͑2002͒

the Schur vectors. There is also a one-to-one correspondence between the converged Schur vectors and the actual eigen- vectors. A partial generalized Schur form for the matrix pair (H,O) is defined as

ϭ ϭ ͑ ͒ HQk ZkSk , OQk ZkTk , 14 ϫ where the matrices Qk and Zk are orthogonal n k matrices, with Sk and Tk both being upper triangular matrices. Each column of Qk , denoted by qi , is a generalized Schur vector. The diagonal elements of Sk and Tk are related to the eigen- values according to

FIG. 1. Plot of the harmonic Ritz values vs original eigenvalue S ͑i,i͒ ␧ ϭ k ͑ ͒ spectrum. The dashed lines correspond to the original eigenvalues i ͒ . 15 Tk͑i,i with the solid vertical line in the center representing the reference energy chosen for targeting. The harmonic Ritz values are located at The pair (qi ,͗Sk(i,i),Tk(i,i)͘) is referred to as a generalized the intersection of the curved and dashed lines. Notice that original ͑ ͒ Schur pair. Since Qk and Zk are both orthonormal, Eq. 14 eigenvalues for states 4 and 5 are extrema of the harmonic Ritz can be rewritten as problem. † ϭ † ϭ ͑ ͒ Z HQk Sk , Z OQk Tk . 16 However, no explicit inversion is necessary in the solution k k of Eq. ͑10͒. In this scheme the eigenvectors are the same as Applying this to the original eigenvalue equation, we see it is the original eigenvalue problem, but the eigenvalues are now easy to get the eigenvalues and eigenvectors from the partial shifted and inverted as generalized Schur form. ␺ ϭ Let i Qkui then 1 ͑ ͒ ␧ Ϫ␧ 12 ␺ ϭ␧ ␺ i ref H i iO i , and are called harmonic Ritz values.10 This makes the origi- ϭ␧ HQkui iOQkui , nal eigenvalues extremal eigenvalues of the shifted and in- verted eigenproblem. This is illustrated in Fig. 1, where Eq. † † Z HQ u ϭ␧ Z OQ u , ͑12͒ is plotted as a function of the eigenvalue ␧. k k i i k k i ϭ␧ ͑ ͒ Skui iTkui . 17 IV. PARTIAL GENERALIZED SCHUR FORM AND DEFLATION The eigenvectors are then calculated according to the origi- ␺ ϭ nal equation, i Qkui . In the Jacobi-Davidson approach, one typically targets a The partial generalized Schur form can efficiently be used single eigenvector and iterates until that eigenvector con- in conjunction with deflation. Assume that Q and Z cur- verges. In order to make sure that a converged eigenvector is k k rently exist and we seek to expand the generalized Schur not ‘‘found’’ again, it is important to be able to remove the form by finding suitable vectors q and z to calculate Q ϩ converged eigenvectors from the eigenvalue problem. This is k 1 ϭ͓Q q͔ and Z ϩ ϭ͓Z z͔. Then according to the definition, accomplished by deflating the original problem. If the test k k 1 k these vectors must satisfy and search subspaces are the same, this is accomplished by simply projecting out the converged eigenvectors from the ϭ ϭ ͑ ͒ ⌿ϭ ␺ ␺ ␺ HQkϩ1 Zkϩ1Skϩ1 , OQkϩ1 Zkϩ1Tkϩ1 . 18 original problem. Let ͓ 1 2 n͔ where each column ␺ ••• i is a converged eigenvector. The deflated eigenproblem is Substituting the above definitions into the previous equations then defined as gives ͑ Ϫ ⌿⌿†͒͑ Ϫ␧ ͒͑ Ϫ⌿⌿† †͒␺ ϭ ͑ ͒ 1 O H refO 1 O new 0. 13 S s ͓ ͔ϭ͓ ͔ͫ k ͬ H Qkq Zkz , ␺ ␺ 0 ␣ This requires memory for two vectors ( i and O i) for each converged eigenvector. A similar equation can be writ- ten if both the test and search subspaces are different but Tk t O͓Q q͔ϭ͓Z z͔ͫ ͬ. ͑19͒ requiring four vectors for each converged eigenvector. k k 0 ␤ A better choice is to use a partial generalized Schur form that requires only two vectors per converged vector. The We have introduced two new real numbers ␣ and ␤, such Schur vectors themselves are not eigenvectors of the eigen- that ␧ϭ␣/␤. Expanding the above equations gives for the value equation, but it is easy to extract the eigenvectors from new columns

245104-3 A. R. TACKETT AND M. DI VENTRA PHYSICAL REVIEW B 66, 245104 ͑2002͒

ϭ ϩ ␣→ ϭ †͑ Ϫ ␣͒ ␧ Hq Zks z s Zk Hq z , ref 1 ␣ ϭ , ␤ ϭ . ͑26͒ ref ͱ ϩ␧2 ref ͱ ϩ␧2 ϭ ϩ ␤→ ϭ †͑ Ϫ ␤͒ ͑ ͒ 1 ref 1 ref Oq Zkt z t Zk Oq z . 20 Using the substitutions given above for s and t, and combin- The next step is to update the test and search subspaces. ing the equations to eliminate the terms involving z gives Since we are dealing with the orthonormal matrices, the search subspace is updated as ͑ Ϫ †͒͑␤ Ϫ␣ ͒ ϭ ͑ ͒ 1 ZkZk H O q 0. 21 vЌvЌV, Note that the new vectors must also satisfy the orthonor- mal constraints (qЌQ and zЌZ) and that the eigenvalues are vЌvЌ /ʈvЌʈ, defined as ␧ϭ␣/␤, so that Eq. ͑21͒ can be expressed as V͓VvЌ͔. ͑27͒ ͑1ϪZ Z†͒͑␤HϪ␣O͒͑1ϪQ Q†͒qϭ0. ͑22͒ k k k k We recall that v is by definition orthogonal to Q. The test This means that the generalized Schur pairs are also solu- subspace vector w is defined as tions to the deflated eigenvalue problem. The eigenvectors ϭ ␤ Ϫ␣ ͒ ͑ ͒ can then be calculated from the Schur pairs by using Eq. ͑17͒ w ͑ refH refO v. 28 along with the definition ␺ ϭQ u . i k i As before, we are only interested in the component orthogo- nal to both W and Z: V. IMPLEMENTATION OF THE JACOBI-DAVIDSON

METHOD wЌwЌ͑W and Z͒, In an actual implementation of the method, we start from ʈ ʈ a random guess for q and z with the Q,Z,V, and W matrices wЌ wЌ / wЌ , set to null. Q and Z contain the partial generalized Schur ͓ ͔ ͑ ͒ form of the converged Schur vectors with V and W defining W WwЌ . 29 the search and test subspaces. The first step is to solve the The next step is to perform a subspace rotation by solving Jacobi-Davidson equation for the correction vector v, which the projected generalized Schur problem for the matrix pair will be used to augment the search and test subspaces. The or Jacobi-Davidson equation is easily derived: U†͑W†HV͒U ϭS, U†͑W†OV͒U ϭT, ͑30͒ Ϫ␧ ͒ ϩ ͒ϭ L R L R ͑H refO ͑q v 0, for the left (UL) and right (UR) generalized Schur vectors Ϫ␧ ͒ ϭϪ Ϫ␧ ͒ ͑H refO v ͑H refO q, and upper triangular matrices S and T. Remember that the eigenvalues can be calculated with the diagonal elements of Ϫ␧ ͒ ϭϪ ͑ ͒ ͑H refO v r, 23 S and T, according to Eq. ͑15͒. ϭ Ϫ␧ where r (H refO)q. Since only the component of v orthogonal to q contains A. Arbitrary selection criteria any new information, we can enforce this condition by re- The most obvious selection criterion is targeting a specific moving this direction from both the test and search sub- range of the eigenvalue spectrum. Another option consists of spaces according to targeting the eigenvectors based on their localization prop- erty. In general, using the present approach, an arbitrary se- ͑ Ϫ †͒͑ Ϫ␧ ͒͑ Ϫ †͒ ϭϪ ͑ ͒ 1 zz H refO 1 qq v r. 24 lection criterion can be used for selecting eigenvectors. This As stated earlier one also wants to ensure that already con- can be done in the following way. It is possible to reorder the verged Schur vectors are not ‘‘revisited’’ by deflating the matrices S, T, UL , and UR such that the vector to be targeted correction equation. The converged Schur vectors are stored is stored in the first column of UR , denoted by UR(:,1), with in Q and Z as described earlier. Using this and the definition the corresponding eigenvalue stored in S(1,1)/T(1,1). This ␧ ϭ␣ ␤ reordering is not difficult and is discussed in Ref. 19 with an ref ref / ref , the general form for the Jacobi-Davidson correction equation is given by actual implementation given in Ref. 20. The power of the method comes from the fact that the reordering is arbitrary. Ϫ †͒ Ϫ †͒ ␤ Ϫ␣ ͒ ͑1 ZZ ͑1 zz ͑ refH refO For targeting eigenvectors in the interior of the spectrum, one would order the matrices according to how close they are to ϫ Ϫ † Ϫ † ϭϪ ͑ ͒ ͑1 qq ͒͑1 QQ ͒v r. 25 the reference energy or This can also be combined with a preconditioner as dis- ͉␧ ϪS͑1,1͒/T͑1,1͒р͉␧ ϪS͑2,2͒/T͑2,2͉͒р . cussed in Sec. 2.6 of Ref. 10. It is not necessary to solve Eq. ref ref ••• ͑31͒ ͑25͒ exactly. Typically just a few steps of an iterative method such as GMRES or BICGSTAB are required.17,18 The choice of Another option is to order the matrices based on their local- ␣ ␤ ref and ref is important and discussed in detail in Sec. 2.4 ization properties in space, for example, states localized at an of Ref. 10 and given below interface or at a surface. In principle, any property that can

245104-4 TARGETING SPECIFIC EIGENVECTORS AND . . . PHYSICAL REVIEW B 66, 245104 ͑2002͒ be obtained from the eigenvectors can be targeted. Examples vectors. Since only a single eigenvector is targeted at a time are given later demonstrating both eigenvalues and localiza- there is the worst-case possibility of selecting a different de- tion property targeting. generate vector to target at each iteration. However, if all the Once the matrices have been reordered, the new target degenerate vectors can be held in the search subspace then vectors can be calculated as they would all tend to converge at about the same rate. On the other hand, if the search subspace is too small, then every ϭ ͑ ͒ ϭ ͑ ͒ ͑ ͒ q UR :,1 , z UL :,1 . 32 correction vector added could add information on a vector From this, the new residual can be calculated to test for not contained in the search subspace. The subsequent shrink- convergence as follows: ing of the subspace when it had reached its maximum size would eliminate some of these degenerate vectors causing rϭ͑T͑1,1͒HϪS͑1,1͒O͒q. ͑33͒ the process to repeat. In this case, one could always be add- ing a vector that corresponds to a new degenerate vector. If the residual is less than the convergence tolerance, updat- We now discuss the scalability of the method with system ing the generalized Schur matrices deflates the eigenprob- size. We assume in the following that the number of eigen- lem: pairs that need to be found is much less than the total number of eigensolutions of H in a given basis set. The number of Q͓Qq͔, Z͓Zz͔. ͑34͒ eigenpairs needed is typically independent of the number of One then selects the next vector in the sort to target and the atoms. Take for example, using spectrum targeting for deter- process continues until all eigenvectors are found. mining the band gap. In theory one only needs two eigen- vectors, the highest occupied eigenstate and lowest unoccu- B. Restarting pied eigenstate, to determine the band gap. This does not depend on the number of atoms. In practice though one is not The test and search subspaces are not allowed to grow guaranteed to find the above states first. Instead one will find without bound. Instead they are allowed to grow only up to a several states on both sides of the Fermi surface and from maximum size nmax before they are shrunk back down to a these determine the band gap. In this case, the number of minimum base nmin . This is easily accomplished with eigenpairs found is still independent of the number of atoms, i.e., if the system size is doubled the total number of states ͑ ͒ Vrestart VUR :,1:nmin , found remains fixed. Although this does correspond to a slightly larger prefactor for the overall scaling. ͑ ͒ ͑ ͒ Wrestart WUL :,1:nmin . 35 The work for each iteration scales the same as an indi- vidual matrix-vector operation for H␺ or O␺. For large sys- Because of the reordering process discussed previously, tems each H␺ operation is dominated by the number of non- this allows the most promising vectors to be kept while dis- local terms ͑e.g., in the pseudopotential approach͒, which carding the rest. Typically the range of n is 10–20 and min scales linearly with the number of atoms. The size of each n is 20–40. max vector also scales linearly with the number of atoms. For this reason, if a plane-wave basis set is chosen and the nonlocal VI. CONVERGENCE AND SCALABILITY terms are evaluated in plane-wave space, the algorithm has 2 ͑ ͒ If the Jacobi-Davidson correction equation is solved ex- quadratic scaling or O(n ) where n is the number of atoms . actly, the method seems to have cubic convergence.23 How- On the other hand, if these terms are evaluated in real space ever, this is not explicitly proven. Even though the method is they can be performed in parallel by making use of the space designed to target a single eigenvector at a time, one builds locality of these terms. This approach has a scaling of up information on nearby eigenvectors. For this reason one O(n ln2n) due to the two fast Fourier transforms to transfer would expect that after the first vector is found the remaining the solution to/from Fourier space. Finally, if all computa- vectors would converge at a fairly uniform rate, which is tions are performed in real space, the method scales linearly, shown to be true in the examples below. ͓O(n)͔ with the number of atoms. The degenerate and nearly degenerate eigenvalues also do not pose a problem ͑see examples below͒. This is mainly due VII. EXAMPLES to two reasons. The first is due to deflation of the eigenprob- The following are the three examples of application of the lem. With deflation the degenerate eigenvectors found are method for three different materials in the solid state within removed from the spectrum. This keeps eigenvectors already density-functional theory ͑DFT͒.13 The examples have been found from interfering with the current target vector. The chosen to highlight the different strengths of the method. The other reason can be understood by looking at Fig. 1. Notice desired accuracy in the wave function has been chosen to be that if the reference energy is close to a nearly degenerate 10Ϫ5, i.e., eigenvector, the shifted and inverted eigenvalue tends to infinity—widely separating it from other nearby nearly de- ʈH␺Ϫ␧O␺ʈр10Ϫ5. ͑36͒ generate eigenvectors and making the eigenvalue an extre- mum that is easily targeted. One potential problem with de- When the number of basis functions are taken into account generate eigenvalues can occur if the test and search this corresponds to a rms accuracy of 10Ϫ7 for each basis subspaces are not large enough to hold all the degenerate function coefficient. Note that this accuracy is considerably

245104-5 A. R. TACKETT AND M. DI VENTRA PHYSICAL REVIEW B 66, 245104 ͑2002͒

FIG. 3. Example of eigenvalue targeting with a generalized ei- FIG. 2. Convergence for the nine closest eigenvectors to the genvalue problem. A nine-atom SiO2 supercell was used with a target energy for an In64P64 supercell using semiempirical pseudo- fixed PAW Hamiltonian. The ten eigenstates closest to the reference potentials. The energy chosen was to test the method’s ability to energy were found. handle degenerate and nearly degenerate eigenstates. There are a total of 150 eigenstates within Ϯ0.1 Ry of the reference energy. A considerable improvement with respect to the FS The pseudopotentials used result in a standard eigenvalue problem. method can be readily seen. As stated previously, the FS method requires on average ϳ200 applications of H per higher than usually required in the total-energy calculations. band per iteration.15 In general, about 5–10 iterations are The iterative solver GMRES ͑Ref. 17͒ has been used with a required to reach convergence using the FS method. This maximum of 10 iterations allowed per target vector. In all amounts to about 1000–2000 applications of H per band. cases, we plot the logarithm of the error in the currently From Figs. 2 and 3, it is evident that we need less than 4000 ␺ targeted wave function versus the total number of H opera- H␺ operations for 9 and 10 eigenvalues, respectively, which tions performed. Deflation has been used to remove the con- corresponds to less than 400 applications of H per band. verged eigenvectors so that they are not ‘‘found’’ again as Furthermore, the example in Fig. 3 represents a generalized described earlier. No preconditioning was used in the spec- eigenvalue problem. As we have stated in Sec. II B, in the FS trum targeting examples, and only a simple preconditioner method the condition number of this problem increases cu- was used in the localization targeting example. Use of an bically over the original eigenvalue problem and, therefore, appropriate preconditioner can considerably decrease the would require more than 1000 applications of H per band per ␺ number of H operations performed. iteration, or, equivalently, more than 104 applications of H per band to reach convergence. On the other hand, as it is A. Spectrum targeting evident from Fig. 3, the condition number of the generalized eigenvalue problem is practically unchanged within the The first example is an In64P64 supercell. We used the semiempirical pseudopotentials obtained from Fu and present method. Zunger21 and an energy cutoff of 32 Ry. This is an example of a standard eigenvalue problem, i.e., OϭI, or the identity B. Localization targeting operator. The reference energy was chosen because of the The last example demonstrates the ability to target local- high number of nearly degenerate eigenstates. There exist ization properties of the eigenvectors by finding the lowest- over 150 eigenstates within an energy range of Ϯ0.1Ry energy eigenvector situated around each of the 27 Ca atoms around the reference energy. This represents a very challeng- ͑ ͒ inaCa27F54 supercell see Fig. 4 . An energy cutoff of 64 Ry ing problem due to high degeneracy. The nine eigenstates has been used. In the present case, we look for the eigenvec- closest to the reference were chosen ͑see Fig. 2͒. The test and tors ␺ such that the probability ϭ ϭ search subspaces are limited to nmin 20 and nmax 40. These are much smaller than the degeneracy and could lead r0 ͵ ͉␺͑ Ϫ ͉͒2 ͑ ͒ ͚ dr r ri 37 to problems as discussed previously. However, in the case at i 0 hand we found that this did not occur. Notice that over half of the work goes to building up a good test and search sub- is maximized, where ri is the position of the ith Ca atom in space. the cell, and r0 is a ‘‘localization radius,’’ which we assume The second example is a small ␣-quartz supercell of nine to be 3 a.u. Again, the PAW method was used, requiring the atoms. We used the PAW method with a fixed Hamiltonian to solution of a generalized eigenvalue problem. It should be solve the eigenproblem and an energy cutoff of 36 Ry. As noted that the wave functions were not truncated in any way stated earlier, the PAW method requires solving a generalized outside the augmentation region. With the use of standard eigenvalue problem. The results are shown in Fig. 3 where approaches, such a problem would require spanning the the ten eigenstates closest to the target were selected. It is whole energy spectrum with subsequent analysis of each in- evident from Figs. 2 and 3 that either the standard eigenvalue dividual eigenvector. problem or the generalized eigenvalue problem do not pose A simple preconditioner was used in order to speed con- any difficulty and require a comparable number of H␺ op- vergence. The preconditioner M simply damps the wave erations. function outside the localization radius. This is similar to the

245104-6 TARGETING SPECIFIC EIGENVECTORS AND . . . PHYSICAL REVIEW B 66, 245104 ͑2002͒

the solution to the original eigenvalue problem. Any solu- tion, ␺, to the eigenvalue problem is also a solution to

M͑H␺Ϫ␧O␺͒ϭ0. ͑39͒ Substituting in the preconditioner definition gives ␺Ϫ␧ ␺͒ϭ ͉ Ϫ ͉р ͑H O 0, r ri 0 ,

3 ͑H␺Ϫ␧O␺͒ϭ0, ͉rϪr ͉Ͼr . ͑40͒ 4 i 0

In order for the localization targeting to work, one needs to convert the Schur vectors to actual eigenvectors. This is easily done using methods previously discussed. FIG. 4. Space localization example targeting the lowest wave function located on each of the 27 Ca atoms in Ca F . A fixed 27 54 VIII. CONCLUSION PAW Hamiltonian was used resulting in a generalized eigenvalue equation. The simple real-space preconditioner discussed in the text In conclusion, we have presented an efficient method to was used. target eigenvalues and eigenvectors of a given Hamiltonian using arbitrary selection criteria. The method can easily preconditioner used in Ref. 1 to damp the unwanted large handle systems with highly degenerate ͑or quasidegenerate͒ eigenvalue solutions for the standard DFT eigenvalue prob- electronic structures, and does not require the diagonaliza- lem. In the localization targeting case, we are simply damp- tion of the full Hamiltonian. ing components of wave functions that exist outside the tar- Structures with large numbers of atoms can also be easily geted region. This preconditioner does not, in any way, handled since the method scales linearly with the number of change the solution. It only affects the convergence rate. It atoms. Finally, the method can easily be extended to gener- should also be noted that this preconditioner does not attempt alized eigenvalue problems without an increase in solving Ϫ␧ to approximate H refO as discussed in Ref. 10. The Ref. difficulty. 10 preconditioner is designed for spectrum targeting only. The preconditioner discussed here is designed for localiza- ACKNOWLEDGMENTS tion targeting only. The form is given below A. Tackett would like to acknowledge Natalie A. W. ͑ ͒ ͉ Ϫ ͉р x r , r ri r0 Holzwarth and G. Eric Matthews at Wake Forest University Mx͑r͒ϭͭ 3 ͑38͒ for numerous helpful discussions, and also for the use of ͉ Ϫ ͉Ͼ x͑r͒, r ri r0 , their SP2 where the calculations presented in this paper were 4 carried out. M. Di Ventra acknowledges partial support from where x(r) is an arbitrary vector. It can easily be seen that the NSF Grant Nos. DMR-01-02277 and DMR-01-33075 the diagnonal preconditioner defined above does not effect and the Carilion Biomedical Institute.

1 M.C. Payne, M.P. Teter, D.C. Allan, T.A. Arias, and J.D. Joan- SIAM J. Matrix Anal. Appl. 17, 401 ͑1996͒ for a more exhaus- nopoulos, Rev. Mod. Phys. 64, 1045 ͑1992͒. tive list and comparison. 15 2 C. Lanczos, J. Res. Natl. Bur. Stand. 45, 255 ͑1950͒. See endnote 10 in Ref. 6. 16 3 E.R. Davidson, J. Comp. Physiol. 17,87͑1975͒. In the PAW and ultrasoft framework, for instance, this can easily 4 C.W. Murray, S.C. Racine, and E.R. Davidson, J. Comp. Physiol. be done by using the Woodbury formula. See, e.g., p. 35, CRC Standard Mathematical Tables, 26th ed. ͑CRC Press, Boca Ra- 103, 382 ͑1992͒. ton, 1981͒. 5 D.M. Wood and A. Zunger, J. Phys. A 18, 1343 ͑1985͒. 17 Y. Saad and M.H. Schultz, SIAM ͑Soc. Ind. Appl. Math.͒ J. Sci. 6 L.-W. Wang and A. Zunger, J. Chem. Phys. 100, 2394 ͑1994͒. Stat. Comput. 7, 856 ͑1986͒. 7 ͑ ͒ L.-W. Wang and A. Zunger, Phys. Rev. B 53, 9579 1996 . 18 G.L.G. Sleijpen and H.A. Van der Vorst, Elec. Trans. Numer. 8 ͑ ͒ ͑ ͒ A. Franceschetti and A. Zunger, Nature London 402,60 1999 . Anal. 1,11͑1993͒. 9 ͑ G.H. Golub and C.F. Van Loan, Matrix Computations Johns 19 P. Van Dooren, SIAM ͑Soc. Ind. Appl. Math.͒ J. Sci. Stat. Com- ͒ Hopkins University Press, Baltimore, 1996 . put. 2, 121 ͑1981͒. 10 D.R. Fokkema, G.L.G. Sleijpen, and H.A. Van der Vorst, SIAM J. 20 P. Van Dooren, ACM Trans. Math. Softw. 8, 376 ͑1982͒. Sci. Comput. ͑USA͒ 20,94͑1998͒. 21 H. Fu and A. Zunger, Phys. Rev. B 55, 1642 ͑1997͒. 11 P.E. Blo¨chl, Phys. Rev. B 50,17953͑1992͒. 22 J.P. Killingbeck and G. Jolicard, Chem. Phys. Lasers 255,79 12 D. Vanderbilt, Phys. Rev. B 41, 7892 ͑1990͒. ͑1996͒. 13 W. Kohn and L.J. Sham, Phys. Rev. 140, A1133 ͑1965͒. 23 G.L.G. Sleijpen and H.A. Van der Vorst, SIAM J. Matrix Anal. 14 See the introduction in G.L.G. Sleijpen and H.A. Van der Vorst, Appl. 17, 401 ͑1996͒.

245104-7