Commit fe5da534 authored by anoop chandran's avatar anoop chandran

section pages created

parent 5326f902
This diff is collapsed.
.. _spex_faq:
===============
Spex FAQ
===============
Configuration
---------------
**Configuration stops with "MPI-3 compiler requested, but couldn't use MPI-3."**
.. highlights:: Your MPI compiler does not support the MPI-3 standard, which is required for the parallelized version.
**Configuration stops with "Could not link HDF5 library."**
.. highlights:: Either (1) you do not have the HDF5 library, or (2) you have HDF5 but it is not installed in a standard directory (then, use the environment variables ``LDFLAGS`` and ``FCFLAGS``), or (3) you have HDF5 but it has been compiled with a different compiler.
You can get further information from the file ``config.log``.
Installation
-------------
**I want to use my own DFT program instead of Fleur.**
.. highlights:: You will have to rewrite or modify the routines in ``read_write.f`` according to your output files and recompile the source. If you use a different mesh for radial integration than Fleur/Spex, you must either interpolate the values to the new mesh (recommended) or write new integration routines in ``numerics.f`` (``intgr, intgrf_init, intgrf, primitive, primitivef``).
**My compiler fails to compile the source.**
.. highlights:: We have successfully compiled and run the code with the Intel Fortran compiler (since version 12.1.3), Gfortran (since version 5), and NAG Fortran (since version 6.2 6214). As of May 2018, PGI compilers have a bug (TPR 23745) that prevents compilation of the Spex code. For the parallelized version, we have used IntelMPI and MPICH. In case of configuration or compilation problems, please inform us.
Usage
-------
**Spex needs too much memory.**
.. highlights:: Try the options ``STOREIBZ`` and/or ``NOSTORE``. You can also reduce the maximally allowed memory storage with the keyword ``MEM``.
**The program stops with a segmentation fault.**
.. highlights:: If this is caused by a too high memory demand you should try the option ``STOREIBZ`` (and ``NOSTORE``) or reduce the maximally allowed storage with the keyword ``MEM``. With some compilers this can also happen, if the stack size is limited. In this case set the stack size to "unlimited" (e.g., ``limit stacksize unlimited`` in csh). However, this is not possible with Mac computers. In this case add "Wl,-stack_size,0x10000000,-stack_addr,0xc0000000" to LDFLAGS or "-heap-arrays" to FFLAGS in Makefile.
**Degenerate quasiparticle states have slightly different energies or I get slightly different results at equivalent k points**
.. highlights:: There are several possible reasons for this:
* In your DFT output groups of degenerate states are cut at the top. Then you should specify ``NBAND`` explicitly.
* In the calculation of the susceptibility groups of degenerate states are split into different packets. This can only be avoided with a larger ``MEM`` if possible.
* The tetrahedron method breaks the symmetry. You can use ``GAUSS`` to test this.
**My ``GW`` calculations do not converge wrt the k-point set.**
.. highlights:: In systems with small band gaps (e.g. GaAs) the default treatment of the point k=0 might lead to bad k-point convergence. In this case try the option ``NOZERO`` which guarantees a smooth (but slower) convergence.
**My calculations do not converge wrt the number of bands.**
.. highlights:: The parameters are not completely independent. If you increase the number of bands, you might need a higher G cutoff (``GCUT`` in section ``MBASIS``). You might also have to increase the number of frequencies for sampling the spectral function. Instead, you can also specify the value of the first nonzero frequency point as the first argument to ``FSPEC``. Then the number of frequencies automatically increases as you increase the number of bands.
**The real-space (reciprocal-space) summation in the routine structureconstant takes very long.**
.. highlights:: Increase (decrease) ``SCALE`` in section ``COULOMB``.
**There are jumps in the band structure.**
.. highlights:: Band structures should not be calculated without the keyword ``NOZERO``. In the case of a metal a jagged band structure (especially in Hartree-Fock) might also be caused by the tetrahedron method. Then you must improve the k-point sampling. Alternatively, you may try the Gauss integration method (``GAUSS``).
Error Messages
--------------
.. highlights:: This is not a complete list of errors. In many error messages a possible solution is already indicated. These are not listed. The program might also stop at places where this is not supposed to happen. Then the message ends with ``...(bug?)``. In this case you should contact the programmers.
**error while loading shared libraries: lib...: cannot open shared object file: No such file or directory**
.. highlights:: The library "lib..." is not found in standard directories. In this case, the location of the library has to be defined in the environment variable ``LD_LIBRARY_PATH``.
**correlation: Solution of quasiparticle equation did not converge after 1000 iterations.**
.. highlights:: You probably have poles very close to the real frequency axis (normally with a small weight). Usually a slight change of parameters solves the problem.
**diagonalize_coulomb: Negative/Residual eigenvalue.**
.. highlights:: Your Coulomb matrix seems to be underconverged. Try to increase the parameter ``LEXP`` or adjust the scaling with ``SCALE``. If this does not solve the problem, the reason might be that the LAPACK routine fails to solve the general eigenvalue problem because of a nearly singular overlap matrix. Then you might try the option ``CUTZERO`` which removes linear dependencies from the overlap matrix and reattempts the diagonalization.
**intgrf: Negative exponent x in extrapolation a+c*r**x.**
.. highlights:: The first (nonzero) point of your radial MT mesh might be too far away from zero. Modify the mesh accordingly. You can also try to increase ``TOL`` in section ``MBASIS``.
**modulo1: argument not an element of k-point set.**
.. highlights:: This message is caused by an error in the k-point set. Either the k-point sets defined by ``BZ`` and in the DFT output file are different or the k points defined by ``KPT`` are not elements of the set. The latter happens, if you use ``KPT ?=[?,?,?]`` and the lattice constant is not properly defined since ``[?,?,?]`` is interpreted with respect to the lattice constant.
To be continued ...
.. _theory:
========
Theory
========
``GW`` calculations [[#GW]]
---------------------------
The ''GW'' approach has become a routine method to calculate quasiparticle spectra from first principles. It is based on many-body perturbation theory, in which the Dyson equation (here in simplified notation)
:math:`{\displaystyle G(\omega)=G_0(\omega)+G_0(\omega)[\Sigma^{\mathrm{xc}}(\omega)-v^{\mathrm{xc}}]G(\omega)}`
links the interacting Green function :math:`{G}` to the non-interacting one :math:`{G_0}`. (A non-magnetic system is considered in this section for simplicity.) The latter is obtained from a mean-field solution with frequency-independent potential :math:`{v^{\mathrm{xc}}}`, which in the case of a KS system would correspond to the local exchange-correlation potential (the nonlocal Hartree-Fock exchange potential and the ''hermitianized'' self-energy of QSGW are other examples). The self-energy :math:`{\Sigma^{\mathrm{xc}}}` connects the non-interacting mean-field system to the real interacting system and thus accounts for the many-body electronic exchange and correlation effects. It is not known exactly and must be approximated in practice. The most popular approximation to the electronic self-energy is the GW approximation,
:math:`{\displaystyle\Sigma^{\mathrm{xc}}(\mathbf{r},\mathbf{r}';\omega)=\frac{i}{2\pi}\int_{-\infty}^\infty G(\mathbf{r},\mathbf{r}';\omega+\omega')\,W(\mathbf{r},\mathbf{r}';\omega')e^{i\eta\omega'}\,d\omega'\,}`
which has been shown to yield accurate band structures for a wide range of materials. Here, :math:`{G}` is the single-particle Green function (usually :math:`{G_0}` is employed) and :math:`{W}` is the screened Coulomb interaction, which is the effective interaction potential in an interacting system, incorporating the dynamical screening processes. The screened Coulomb interaction is the solution of a Dyson-type equation
:math:`{\displaystyle W(\omega)=v+vP(\omega)W(\omega)\,}`
with the random-phase approximation for the polarization function :math:`{P}`
:math:`{\displaystyle P(\omega)=-\frac{i}{\pi}\int_{-\infty}^\infty G(\omega-\omega')G(\omega')d\omega'\,.}` [[#eq:P]]
Usually, the Green function :math:`{G_0}` of a mean-field system is taken for :math:`{G}`, in which case it takes the form
:math:`{\displaystyle G_0(\mathbf{r},\mathbf{r}';\omega)=\sum_\mathbf{k}\sum_n \frac{\phi_{\mathbf{k}n}(\mathbf{r})\phi^*_{\mathbf{k}n}(\mathbf{r}')}{\omega-\epsilon_{\mathbf{k}n}+ i\eta\mathrm{sgn}(-\epsilon_{\mathbf{k}n}\mathrm{F}}\,,}` [[#eq:G0]]
where :math:`{\phi_{n\mathbf{k}}(\mathbf{r})}` and :math:`{\epsilon_{n\mathbf{k}}}` are the eigenfunctions and eigenvalues, respectively, of the mean-field system. Here, a natural choice is to employ the solution of the KS equations
:math:`{\displaystyle\left\{-\frac{\nabla}{2}+v^\mathrm{ext}(\mathbf{r})+v^\mathrm{H}(\mathbf{r})+v^\mathrm{xc}(\mathbf{r})\right\}\phi_{\mathbf{k}n}(\mathbf{r})=\epsilon_{\mathbf{k}n}\phi_{\mathbf{k}n}(\mathbf{r})\,,}`
often with the local-density approximation (LDA) for the exchange-correlation potential. In this respect, one says that LDA is the ''starting point'' for the ''GW'' calculation. Other starting points are generalized gradient approximation (GGA), LDA+''U'', hybrid functionals, Hartree-Fock, QSGW, et cetera. The explicit form of :math:`{G_0}` enables us to perform the frequency integration in [[#eq:P|:math:`{P}`]], which yields
:math:`{\displaystyle P\left(\mathbf{r},\mathbf{r}',\omega\right)=2\sum_{\mathbf{q},\mathbf{k}}^{\mathrm{BZ}}\sum_{n}^{\mathrm{occ}}\sum_{n'}^{\mathrm{unocc}}\phi_{\mathbf{q}n}\left(\mathbf{r}\right)\phi_{\mathbf{q}n}^{*}\left(\mathbf{r}'\right)\phi_{\mathbf{q}+\mathbf{k}n'}\left(\mathbf{r}'\right)\phi_{\mathbf{q}+\mathbf{k}n'}^{*}\left(\mathbf{r}\right)\cdot\left(\frac{1}{\omega+\epsilon_{\mathbf{q}n}-\epsilon_{\mathbf{q}+\mathbf{k}n'}+i\eta}-\frac{1}{\omega-\epsilon_{\mathbf{q}n}+\epsilon_{\mathbf{q}+\mathbf{k}n'}-i\eta}\right)=\int_{-\infty}^\infty \frac{S(\mathbf{r},\mathbf{r}';\omega')}{\omega-\omega'+i\eta\mathrm{sgn}(\omega')}d\omega'\,,}` [[#eq:Pexp]]
where the last equality implicitly defines the spectral function :math:`{S(\omega)}`.
The Dyson equation can be rewritten in the form of an effective equation of motion of a single particle, the quasiparticle equation
:math:`{\displaystyle\left\{-\frac{\nabla}{2}+v^\mathrm{ext}(\mathbf{r})+v^\mathrm{H}(\mathbf{r})\right\}\psi_{\mathbf{k}n}(\mathbf{r})+\int \Sigma^\mathrm{xc}(\mathbf{r},\mathbf{r}';E_{\mathbf{k}n})\psi_{\mathbf{k}n}(\mathbf{r}')d^3 r=E_{\mathbf{k}n}\psi_{\mathbf{k}n}(\mathbf{r})}` [[#eq:qpeq]]
with the (non-orthonormal) quasiparticle wavefunctions and (complex-valued) quasiparticle energies. It can be shown that the interacting Green function takes the same form as [[#eq:G0|:math:`{G_0}`]] (Lehmann representation) if the eigenfunctions and eigenvalues are replaced by the latter. The fact that this equation of motion is formally similar to the KS equation motivates to use perturbation theory of first order and write the quasiparticle energies as
:math:`{\displaystyle E_{n\mathbf{k}}=\epsilon_{n\mathbf{k}}+\langle\phi_{n\mathbf{k}}|\Sigma^\mathrm{xc}(E_{n\mathbf{k}})-v^\mathrm{xc}|\phi_{n\mathbf{k}}\rangle\approx\epsilon_{n\mathbf{k}}+Z_{n\mathbf{k}}\langle\phi_{n\mathbf{k}}|\Sigma^\mathrm{xc}(\epsilon_{n\mathbf{k}})-v^\mathrm{xc}|\phi_{n\mathbf{k}}\rangle}` [[#eq:qppert]]
with the renormalization constant :math:`{Z_{n\mathbf{k}}=[1-\partial\Sigma^{\mathrm{xc}}/\partial\omega(\epsilon_{n\mathbf{k}})]^{-1}}`. Both expressions can be taken to evaluate the quasiparticle energy, the first one is a non-linear equation in :math:`{E_{n\mathbf{k}}}` and requires an iterative solution. We thus have three ways to calculate the quasiparticle energies: (a) by solving the full [[#eq:qpeq|quasiparticle equation]], (b) with the [[#eq:qppert|non-linear equation]], and (c) using the [[#eq:qppert|linearized solution]]. The mathematical complexity, the computational cost, and the accuracy decreases in this order. For example, solution (a) requires the full self-energy matrix (i.e., including the off-diagonal elements) to be evaluated. Once the full matrix :math:`{\Sigma^\mathrm{xc}_{\mathbf{k},nn'}(\omega)}` is known, one can proceed to perform a self-consistent calculation within the QSGW approach. In this approach, the self-energy matrix is ''hermitianized'' and made frequency independent. This self-energy can then be used to replace :math:`{v^\mathrm{xc}}` in the KS equation, defining a new mean-field system. A self-consistent solution of this mean-field system (using a DFT code) is then employed as a new starting point and so on until self-consistency in the quasiparticle energies is achieved.
Interaction parameters (Hubbard ``U``)
--------------------------------------
Wannier functions
--------------------
RPA exchange-correlation energy
-------------------------------
Spectra (EELS, spin excitation spectra etc.)
--------------------------------------------
The spectral function of response quantities (e.g., [[#eq:Pexp|:math:`{S(\omega)}`]]) are often related to spectra measured in experiments. The imaginary part of the head element (:math:`{\varepsilon^{-1}_{\mathbf{k},\mathbf{GG}'}, \mathbf{G}=\mathbf{G}'=0}`) of the inverse of the dielectric matrix
:math:`{\displaystyle \varepsilon_\mathbf{k}(\omega)=I - P_\mathbf{k}(\omega) v_\mathbf{k}}`
with [[#eq:Pexp|:math:`{P(\omega)}`]], the identity matrix :math:`{I}`, and the bare Coulomb interaction :math:`{v}` is measured in valence electron-energy loss spectroscopy (EELS). Note that :math:`{W_\mathbf{k}(\omega)=\varepsilon_\mathbf{k}^{-1}(\omega)v_\mathbf{k}}`. Optical absorption is related to the macroscopic dielectric function :math:`{\varepsilon_\mathrm{M}(\omega)=1/\varepsilon^{-1}_{\mathbf{k=0},\mathbf{00}'}(\omega)}`. We have adopted a pure plane-wave representation. The dielectric function can also be used to calculate the density response function :math:`{R_\mathbf{k}(\omega)=\varepsilon_\mathbf{k}^{-1}(\omega)P_\mathbf{k}(\omega)}`, where :math:`{R(\mathbf{r},\mathbf{r}';\omega)=\delta n(\mathbf{r},\omega)/\delta v_\mathrm{ext}(\mathbf{r}',\omega)}` gives the dynamical linear response of the electron number density with respect to changes in the external potential. In this respect, :math:`{P(\mathbf{r},\mathbf{r}';\omega)}` gives the linear response of the density with respect to changes in the effective potential, e.g., the effective KS potential.
In photoelectron spectroscopy, one measures the imaginary part of the Green function, which, using the Dyson equation, can be written as
:math:`{\displaystyle A_\mathbf{k}(\omega)=\mathrm{Im} \sum_n \frac{1}{\omega-\epsilon_{\mathbf{k}n}-\Sigma_\mathbf{k}^{\mathrm{xc}}(\omega)}.}`
``GT`` self-energy
------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment