.. _specifics:
===================
Specifics
===================
Spex and Fleur
---------------
In the Fleur [[input]] file there is a flag for writing out the necessary data for a Spex calculation. It is called ``gw`` and is appended to line 23 of the Fleur ``inp`` file.
[`23|vchk=F,cdinf=F,pot8=F,gw=n,numbands=N`]
``n`` can take four values:
* ``gw=0``: No output files are generated (default; the same as omitting ``gw`` and ``numbands`` altogether).
* ``gw=1``: Some basic parameters are written to several files. Otherwise Fleur runs as usual.
* ``gw=2``: All output files necessary for Spex are created and Fleur stops after one iteration (without updating the potential). In this case you should also set ``pot8=T`` and the maximal number of bands ``N``. The latter overrides the default ``neigd`` value in [[fl7para]].
* ``gw=3``: Self-consistent cycle for QSGW. Same as ``gw=1`` but adds {$ \Sigma^{\mathrm{QSGW}}_{\mathrm{xc}}(\mathbf{r},\mathbf{r}')-v_{\mathrm{xc}}(\mathbf{r}) $} to the Hamiltonian in each iteration.
The output files are
* ``gwa``: Basic parameters including the atomic numbers and positions in the unit cell, lattice parameters and basis vectors, FLAPW l cutoff, and local-orbital parameters,
* ``LATTC``: FLAPW G cutoff,
* ``radfun``: radial basis functions,
* ``ecore``: core-electron functions,
* ``eig``: k points, wave-function coeffients (interstitial), energies,
* ``abcoeff``: wave-function coefficients (muffin tins),
* ``vxc``: expectation values of the xc potential (diagonal elements),
* ``vxcfull``: matrix of the xc potential,
* ``qsgw``: matrix of the QSGW self-energy (only for QSGW calculations).
Furthermore Spex needs the Fleur files [[fl7para]] and ``sym.out``.
Some comments about the DFT calculation
---------------------------------------
Accurate description of conduction states
"""""""""""""""""""""""""""""""""""""""""
As in a ''GW'' calculation the conduction states enter both the Green function and the screened interaction, they should be accurately described already in the KS system which is our starting point for the perturbation treatment. The LAPW basis, however, only guarantees well described occupied states. In order to obtain well-converged ''GW'' results, one must make the basis set more flexible, especially in the MT regions, by introducing local orbitals either at high energy parameters or as higher-order energy derivatives [see C. Friedrich et al., Phys. Rev. B 74, 045104 (2006)].
Role of semicore states
""""""""""""""""""""""""
High-lying semicore states can appear as badly described "ghost bands" in the valence band region leading to a wrong DFT ground state. A possible solution is to use local orbitals and extend the energy window, such that the semicore states are treated as valence states. On the other hand if the ghost bands are above the Fermi energy, they usually pose no problem in a DFT calculation. In a ''GW'' calculation, however, the conduction states are also relevant, and one must make sure that there are no ghost bands at all in the energy spectrum. Therefore, it might be necessary to treat more (and deeper) semicore states as valence states than are needed in the DFT calculation.
As an indication for such a case the overlap of core states with basis and wave functions calculated in the routine "checkinput" should be checked. As an example, here is the output for Strontium Titanate with a Titanium 3s ghost band::
Overlap
Atom type 1
u(s) udot(s)
1s -0.001431 0.000644
2s -0.000830 0.000414
3s 0.287789 -0.878671
u(p) udot(p) ulo(p) ...
2p -0.000665 0.000112 -0.000494
...
Maximum overlap at (band/kpoint)
Atom type 1
1s 0.000611 (031/ 001)
2s 0.000343 (031/ 001)
3s 0.664265 (047/ 001)
2p 0.000340 (003/ 036) 0.000481 (003/ 042) 0.000340 (003/ 036)
...
(:OBSOLETE: !!! Overcompleteness of the interstitial plane waves
The set of interstitial plane waves (IPW) (i.e., plane waves where the MT spheres are cut out) is overcomplete in the sense that a function (defined only in the interstitial region) has a nonunique representation in this set: one can always add the Fourier coefficients of a function, which is restricted to the MT spheres and zero outside. This leads to the fact that the IPW coefficients of the wave functions might not go quickly to zero for large G vectors, especially for a large '''G''' cutoff in the DFT calculation and large MT radii. In the ''GW'' calculation this gives rise to bad convergence with respect to the parameter ``GCUT`` ('''G''' cutoff in Spex) as well as jumps in the band structure. In this case Spex can exploit the nonuniqueness of the coefficients to make them approach zero for large '''G''' vectors as quickly as possible. Use the keyword ``MINCPW`` for this.:)
Setting up ``spex.inp``
-----------------------
Mixed Basis (section ``MBASIS``)
""""""""""""""""""""""""""""""""""""
The bare Coulomb scattering {$ v(\mathbf r,\mathbf r') $} couples two electrons whose incoming and outgoing waves give rise to wave-function products (occupied/unoccupied). The mixed basis is optimized for representing wave-function products and derived from the FLAPW basis set. It is a combined set of interstitial plane waves (IPWs) and MT functions and is defined in section ``MBASIS`` of the input file ``spex.inp`` with the keywords
* ``GCUT``: '''G''' cutoff for the interstitial plane waves,
* ``LCUT``: L cutoffs (one for every atom type) for the MT functions,
* ``SELECT``: determines the pairs of radial functions from whose products the MT functions are constructed. For every atom type two l cutoffs ``l1`` and ``l2`` must be specified for the functions {$u_l(r)$}. Optionally l cutoffs ``l3`` and ``l4`` can also be defined for {$\dot u_l(r)$}, which are neglected by default. The local orbitals, on the other hand, are always used in the construction of the products by default, but can also be chosen individually by series of zeros (neglect) and ones (select), e.g., ``10100``, ``lo1`` and ``lo2`` for occupied and unoccupied states. (Instead of ``0000111``, one can also use ``4031``.) Examples are --- ``2;3`` --- ``2,2;3,2`` --- ``2,2,10100;3,2,1110`` --- ``2,,10100;3,2,1110``
The so-defined set of product MT functions is usually highly linearly dependent. Therefore, in a subsequent optimization step one diagonalizes the overlap matrix and retains only those eigenfunctions with eigenvalues exceeding a tolerance value which is defined by the keyword ``TOL``.
* ``OPTIMIZE``: Truncation of the polarization and related matrices to ``n``x``n`` by ``MB=n`` where ``n`` is an integer number between 1 and the size of the full mixed basis. Alternatively, one can use ``PW=n`` where plane waves are used instead of the mixed basis (or better: projections of plane waves onto the mixed basis) in which case the Coulomb matrix is analytically known. In both cases (``MB`` and ``PW``), you can also specify the minimum Coulomb eigenvalue instead of ``n`` as a negative real number, e.g. ``MB=-1.0`` . Alternatively, you can specify a "pseudo" reciprocal cutoff radius as a positive real number, e.g. ``MB=4.5``, which is more suitable for convergence tests. This cutoff value {$K$} is related to the minimum Coulomb eigenvalue {$c$} by {$K= \sqrt{4\pi/c}$}. The options ``MB`` and ``PW`` can speed up the calculation considerably.
If any of the keywords (or the whole section) is not defined, Spex guesses reasonable values according to the FLAPW basis parameters.
Coulomb Matrix (section ``COULOMB``)
""""""""""""""""""""""""""""""""""""
In many-body perturbation theory the perturbing force is the Coulomb interaction. Thus its representation in the mixed basis is one of the basic ingredients in the implementation. The IPWs are plane waves {$\exp[i(\mathbf{k+G})\mathbf{r}]$} from which the MT spheres are cut away. In a MT sphere a plane wave is given by the Rayleigh expansion over l quantum numbers. In a practical implementation we must introduce an l cutoff here (keyword ``LEXP``). Multipole interactions between the periodic MT functions and their periodic images are calculated in an Ewald summation involving a real and a Fourier-space sum. The cutoff radii of these are determined during the program run. There is a scaling parameter (``SCALE``) which must be adjusted if one of the sums take much longer to evaluate than the other one. In most calculations, the default values work reliably, though.
Labels for k points (keyword ``KPT``)
"""""""""""""""""""""""""""""""""""""
The keyword ``KPT`` allows you to define labels (single characters) for k points, e.g. ``KPT X=[0,0,1]``. Here, ``X`` is the label and the square brackets denote that cartesian coordinates are used instead of internal coordinates (round brackets). Note: In order for the cartesian coordinates (square brackets) to be interpreted correctly, Spex must know the lattice constant. (In Fleur, this is the global scaling factor for the lattice vectors.) You can also add a prefactor by ``L=0.5*(0,0,1)`` or ``L=1/2*(0,0,1)``. The so-defined k points must be elements of the k mesh defined by ``BZ``. A single k point outside that mesh can be specified by the plus sign ``+`` as a special label. Each time you change this single k point you have to regenerate the k-point set and rerun the DFT code.
Job definition (keyword ``JOB``)
""""""""""""""""""""""""""""""""
The most important entry in ``spex.inp`` is the job definition. It defines what Spex should do. Each job begins with one of the keywords ``HF, QP, SUSCEP, SUSCEPR, DIELEC`` or ``SCREEN`` followed by additional parameters:
* ``HF``: Hartree-Fock correction, e.g., ``HF A:(1-3,5)`` where A is a k-point label or index and ``1-3,5`` are band indices. A spin index (up or down) can be specified by ``A:u(...)`` and ``A:d(...)``. More than one k-point definition is possible in one job, e.g., ``HF A:(1-3,5) 12:(1,2,6)``. Normally, only diagonal elements are calculated, i.e., {$ \langle \phi_{n\mathbf{k}} | \Sigma_{\mathrm{x}} | \phi_{n'\mathbf{k}} \rangle $} with {$ n=n' $}. Full calculations of the self-energy matrix (i.e., {$ n \neq n' $}) are possible by adding ``FULL`` (e.g., ``HF FULL A:(1-10)``). This allows a subsequent self-consistent HF calculation.
* ``GW``: Quasiparticle correction with the ''GW'' approximation. Spin, k points and bands are defined as in ``HF``. A full self-energy calculation is also possible with ``GW FULL``.
* ``SUSCEP``: Calculation of the susceptibility, e.g., ``SUSCEP A:{0..2,0.01}`` where A is a k-point label or index and a frequency mesh from 0 to 2 Ha in 0.02 Ha steps is specified. A more general frequency mesh can also be specified as a list of real or complex frequencies in a file. Then simply write the file name into the brackets, e.g., ``{foo}``. A spin index (``uu, dd, ud, du`` or ``+``) can be specified with ``A:ud{...}``. The spin index ``+`` denotes addition of ``uu`` and ``dd`` and is the default. Furthermore you can add ``MB`` or ``PW`` (see above) and ``OUT=n`` (separated with commas) to the job definition. With ``OUT=n`` an ``n``x``n`` matrix is written instead of only the head element. You can also write the full matrix to a binary file with ``OUT=BIN``. An expression like ``A:u{0..2,0.01},MB=100,OUT=4`` defines one job which can be followed by additional expressions each defining one job.
* ``SUSCEPR``: Calculation of the renormalized susceptibility. Spin, k points and frequencies are defined as in ``SUSCEP``. Additionally you can specify a TDDFT kernel as in ``SUSCEPR A:{0..2,0.01},KERN=ALDA,MB=100``. As spin labels only ``ud``, ``du`` and ``+`` are allowed where the latter is the default. The former spin indices require a TDDFT kernel.
* ``DIELEC``: Calculation of the dielectric function. K points and frequencies are defined as in ``SUSCEP``. A spin index cannot be specified.
* ``SCREEN``: Calculation of the screened interaction. Syntax as in ``DIELEC``.
In the case of an "empty" job definition (``JOB``), Spex will do basic checkings and then stop. (This is useful, e.g., for a simple Wannier interpolation or P/DOS calculation.)
Output files
------------
The main results of the Spex calculation is written to standard output ([[SpexOutputFile|output example]]). You should pipe the output to a file (e.g. ``spex > spex.out``). The spectra are written to separate files:
* ``suscep``: Susceptibility head element.
* ``suscep.XXX.YYY``: Susceptibility ``XXX/YYY`` matrix element (key: ``OUT=NNN`` and ``XXX,YYY`` {$\le$} ``NNN``).
* ``suscep.bin``: Binary output of the susceptibility matrix (key: ``OUT=BIN``).
* ``suscepr``: Renormalized susceptibility head element.
* ``suscepr.XXX.YYY``: Corresponding matrix element.
* ``suscepr.bin``: Binary output.
* ``dielec``: Head element of the dielectric matrix (dielectric function).
* ``dielec.XXX.YYY``: Corresponding matrix element.
* ``dielecLF``: Dielectric function with local-field effects.
* ``screen``: Screened interaction head element.
* ``screen.XXX.YYY``: Corresponding matrix element.
* ``screen.bin``: Binary output.
If more than one job is defined, the job number is appended to the file names (before the dot), e.g. ``suscep001.bin``.
There are a number of additional files which can be written during the program run (``WRITE INFO``) and which tell you more about intermediate results. Some of them are numbered, such that files are never overwritten. From time to time you should remove them from disk, because the highest file count is ``NNN=999``, and they clog up directory listings.
* ``spex.sf.NNN``: If projections ``MB=...`` or ``PW=...`` are used, these files contain the spectral function on the mesh given by ``FSPEC`` for any '''k''' point projected on {$exp(ikr)$}. Column 1: Frequency, column 2: value. The files are useful to check whether the mesh is dense enough and whether the spectral function approaches zero quickly. If it does not, ``GCUT`` might be underconverged or you must use ``MINCPW``.
* ``spex.sew.NNN``: Correlation self-energy on the imaginary frequency axis (only for ``CONTINUE``). Column 1: imaginary frequency, column 2: fitted value (real part), column 3: fitted value (imaginary part), column 4: numerical value (real part), column 5: numerical value (imaginary part).
* ``spex.sec.NNN``: Correlation self-energy on the real frequency axis. Column 1: real frequency, column 2: (fitted) value (real part), column 3: (fitted) value (imaginary part).
* ``spex.head``: Head element of screened interaction on imaginary axis.
Other output files written during the run are
* ``spex.dos.NNN``: (Partial) density of states (keyword ``BANDINFO``).
* ``bands``: Wannier-interpolated band structure (written after the Wannier construction and if ``KPTPATH`` is defined).
* ``hamiltonian_r``: Wannier Hamiltonian at all R points defined by ``BZ`` (if ``bands`` is written).
* ``hamiltonian_k``: Wannier-interpolated Hamiltonian at k points defined in the file ``klist`` (if ``bands`` is written).
For certain keywords in ``spex.inp`` there are special output files that can be used for subsequent calculations.
* ``spex.mb``: Mixed product basis (keyword ``RESTART``).
* ``spex.core``: Core susceptibility (keyword ``CORES``, unmaintained).
* ``spex.cou``: Coulomb matrix (keyword ``RESTART``).
* ``spex.cous``: Special Coulomb matrix for calculation of spectra (keywords ``RESTART`` and ``NOSTORE``).
* ``spex.cor``: Renormalized dielectric matrix for correlation self-energy (keyword ``RESTART``).
* ``spex.spc``: Susceptibility/dielectric/etc. matrix for calculation of spectra (keyword ``RESTART``).
* ``spex.sigx``: Exchange self-energy (HF) matrix elements (keyword ``JOB ... FULL``, can be used with ``RESTART SIG``).
* ``spex.sigc``: Correlation self-energy (GW) matrix elements (keyword ``JOB ... FULL``, can be used with ``RESTART SIG``).
* ``spex.qsgw``: QSGW (or HF) self-energy matrix (keyword ``JOB ... FULL``) for a subsequent self-consistent-field run (``gw=3`` in the FLEUR inp file).
* ``spex.qp``: Quasiparticle energies and amplitudes (keyword ``JOB ... FULL``).
.. note:: ``spex.set.NNN``: Correlation self-energy for any quasiparticle state on the imaginary time axis (only for ``CONTINUE`` and ``IMAGTIME``). Column 1: imaginary time, column 2: interpolated value, column 3: numerical value. :)