FHI-gap is an all-electron GW implementation based on the full-potential linearized augmented planewave plus local orbital ((L)APW+lo) method, which handle core, semicore, and valence states on the same footing and therefore allows for a correct treatment of core-valence interaction. It is, therefore, able to handle a wide range of materials, irrespective of their composition. At present, FHI-gap is interfaced to the WIEN2k code, and an implementation into the EXCITING code is in progress.
The main features of FHI-gap are the following:
An advantage of our code is the capability to explore d- and f-electron systems, materials traditionally categorized as strongly correlated. For such materials, a full-potential all-electron treatment is highly desirable. DFT with LDA or GGA exchange-correlation functionals fails dramatically for many such systems, and so may G0W0 carried out on top of LDA or GGA. Here, much of the problem may stem from the LDA/GGA starting point. As a first step towards establishing G0W0 for d and f-electron systems, we have implemented G0W0 based on LDA+U. This simple and effective approach has been applied to a series of prototype d and f-electron systems and shown to overcome the major shortcomings of LDA/GGA.
Warning: The treatment of metallic systems is still in the experimental state, and has not been well tested.
All system-specific setups are defined in make.inc-$SYSTEM, which is used in makefile.
Currently it supports SYSTEM=Linux/SunOS/AIX
You are strongly encouraged to use the INTEL MKL library.
First generate the sequential version by "make seq" and then parallel version with "make para" (only subroutines related to parallelization are recompiled)
In some systems like SunOS, awk does not support -v < variable = value > but nawk does. In that case, one should change alias for awk in gap_init
In more recent versions of WIEN2k (maybe since version 11), core states wave functions are not written to files (case.corewf) by default. It is possible to enable writing case.corewf by setting IPRINT in case.inc manually. In a more straightforward way, one can also modify SRC_lcore/hfsd.f slightly so that case.corewf is always written. For example, in WIEN2k version 13, the following changes can be made:
Original
...... 3999 if(iprint.ne.0) then WRITE(29,2003) NQN(J),TITRE(J),DEN(j)*2.0d0+shift write(29,iform1) (dp(i),i=1,np-npxx) write(29,iform1) (dq(i),i=1,np-npxx) endif ......
3999 continue WRITE(29,2003) NQN(J),TITRE(J),DEN(j)*2.0d0+shift write(29,iform1) (dp(i),i=1,np-npxx) write(29,iform1) (dq(i),i=1,np-npxx)
gap_init -f casename -d gwdir -nkp number_of_kpoints_for_gw ......
gwdir is the working diretory for the gw calculation to be carried out. It is strongly recommended that gwdir be different from w2kdir. More detailed information about the options for gap_init can be obtained by "gap_init -h"
A sample of the master input file, case.ingw, reads as follows
Task = "gw" # Option for task Restart = F # Option for whether retarting a previous calculation nspin = 1 # 1 for spin-unpolarized and 2 for spin-polarized calculations ComplexVector = F # T for for systems without inverse symmetry SymVector = F # whether to use Kohn-Sham eigenvectors in the irreducible Brillouin zone barcevtol = 0.0 # tolerance used to reduce the bare Coulomb matrix eigenvectors as the basis set # for sp systems, barcevtol=0.6 is usually quite safe. emingw = -2.0 # emingw and emaxgw ( unit -- Ry. ) are used to control the range of bands emaxgw = 2.0 # for which GW correction are calculated. Only states # falling between E_Fermi+emingw and E_Fermi+emaxgw are calculated %SelfEnergy # option for correlation self-energy 2 | 0 | 1 # <npol> | <iopes> | <iopac> % # Number of poles ( previous maxexp + 1, valid range: 2.. nomeg/2 ) # iopes: 0/1/2/3 - without or with itereration > # iopac:0/1 - Pade's approximation / multipole fitting %BZConv # BZ convolution options "tetra" | "imfreq" % %FreqGrid # Frequency grid parameters 3 | 16 | 0.42 |0.0 | 0 # iopfreq | nomeg | omegmax | omegmin | nomeg_blk % # iopfreq= 1 (equally spaced), 2 (Gauss-Laguerre) # or 3 (double Gauss-Legendre) %MixBasis # Mixed basis parameters 1.0 | 3 | 1.E-4 # Q, lmax_MB, lamda % ºreCoul # Options to control the calculation of the bare Coulomb matrix 2.0 | 1.E-15 % nvel = 8.0 # the number of valence electrons
A detailed description of all available input parameters can be found here.
The main results of a G0W0 calculation by running the FHI-gap code are a set of quasi-particle energies on an equally spaced k-mesh. To calculate densities of states or plot the band structure diagram along high symmetry directions in the BZ, one usually needs QP energies on a fine k-mesh. Calculating QP energies at an arbitrary k is possible, but computationally expensive. Currently, the FHI-gap code uses the Fourier interpolation approach (Pickett et al. Phys. Rev. B 38, 2721 (1988)) to obtain QP energies on k-points that are not included in the original k-mesh. For that purpose, the C-shell scripts gap_analy and gap_gwnvf can be used.
The script gap_gwnvf generates two files, namely case.energy_gw and case.vector_gw, which contain interpolated quasiparticle energies, using data from case.energy and case.vector in the current directory. These QP interpolated energies and vectors can then be used for further analysis or other calculations.
The script gap_analy first call "x lapw1" to calculate KS energies and vectors on a new k-mesh, and then use gap_gwnvf to obtain QP corrected energies and vectors on the same k-mesh, from which either DOS ("x tetra") or band structure diagrams ("x spaghetti") can be obtained.
Note that both gap_analy and gap_gwnvf should be run in the w2kdir. More information about these two scripts can be obtained by running them with a command-line argument "-h".
To use gap_analy properly, some changes have to be made to x_lapw and SRC_spaghetti/spag.f in the WIEN2k package so that spaghetti reads band energies from case.energy instead of case.output1. The part related to spaghetti in x_lapw is changed as followings.
cat << theend > $def 5, '$file.insp', 'old', 'formatted',0 6, '$file.outputsp$updn', 'unknown','formatted',0 10,'$file.spaghetti${updn}_ene','unknown','formatted',0 11,'$file.spaghetti${updn}_ps', 'unknown','formatted',0 20,'$file.struct', 'old', 'formatted',0 30,'$file.irrep$so$updn', 'unknown','formatted',0 40,'$file.bands${updn}.agr', 'unknown','formatted',0 theend echo "8, '$file.energy$so$updn', 'old','formatted',0" >>$def if($?qtl) then echo "9, '$file.qtl$updn', 'unknown','formatted',0" >>$def endif
The modified x_lapw and SRC_spaghetti/spag.f are included in the directory src_misc. Note: the included x_lapw is based on that of WIEN2k version 11.0; if you are using a different version of WIEN2k, you should modify x_lapw manually so that other functions of x_lapw are not affected.
When publishing the work that has used the FHI-gap code, please cite the following paper
Hong Jiang, Ricardo I. Gomez-Abal, Xinzheng Li, Christian Meisenbichler, Claudia Ambrosch-Draxl, and Matthias Scheffler, FHI-gap: a GW code based on the All-electron augmented plane wave method, Computer Phys. Commun.,184, 348 (2013).
The FHI-gap code will be made available to the WIEN2k users free of charge. The stable version of the code will be available from the WIEN2k website. The latest version can be downloaded here.