Commit 1066bffd authored by Christoph Friedrich's avatar Christoph Friedrich

- RESTART generalized

- readwrite.f documentation
- VXC CALC is default
parent 90e04d84
......@@ -91,9 +91,26 @@ This is an important keyword. It enables (a) continuing a calculation that has,
* - ``RESTART``
- Read/write restart file.
* - ``RESTART 1``
- Same as ``RESTART``
* - ``RESTART 2``
- Try to reuse data from standard output files.
(*) We will come back to this keyword in the tutorials. Here, we give a more detailed explanation as reference.
Spex writes several files to harddisc during the program run (see :numref:`spex.out` for details):
"spex.cor", "spex.cot", "spex.ccou", "spex.mbas", "spex.core", "spex.sigx", "spex.sigc", "spex.sigt", "spex.wcou", "spex.uwan", "spex.kolap", as well as several files
containing spectra ("suscep", "dielec", etc.) and a file "<KS>" containing the KS wavefunctions. (The name of the latter depends on the DFT program used.)
In addition to the arguments 1 and 2, described above, the keyword ``RESTART`` can be given with a general five-digit integer number, e.g., ``32233``,
which explicitly specifies which files should be read and/or written. (The first digit is optional. It is interpreted as 0 if omitted.)
The digits can be 0 (don't read and don't write), 1 (read but don't write), 2 (write but don't read), and 3 (read and write). From right to left, the digits
refer to the files (fifth digit:) "<KS>"; (fourth digit:) "spex.cor", "spex.cot", "spex.ccou", "spex.mbas", "spex.core"; (third digit:) "spex.sigx";
(second digit:) "spex.sigc", "spex.sigt", "spex.wcou", spectra files; (first digit:) "spex.uwan", "spex.kolap". (The spectra files and "spex.core" are always
written.)
The arguments 1 and 2 correspond to ``32233`` and ``33333``, respectively. The default (i.e., without ``RESTART``) is ``02200``.
NOSTORE (COULOMB)
------------------
Most job types require the calculation of the Coulomb matrix (with respect to the mixed product basis). The Coulomb matrix is k dependent.
......@@ -252,7 +269,3 @@ The keyword ``ITERATE`` is mostly intended for testing and debugging. It is not
- Diagonalize scalar-relativistic Hamiltonian and neglect eigenvalues below -1 htr.
* - ``ITERATE FR STOP``
- Diagonalize relativistic Hamiltonian (including SOC), then stop.
......@@ -81,6 +81,9 @@ An error message starting with ``SPEX-BUG`` is likely caused by a bug in the cod
A warning message indicates a possible problem in the calculation, but the calculation continues anyway.
An info message informs about a less important issue, for example, about the usage of obsolete syntax in the input file.
Often, when an MPI run stops with an error, the output gets cluttered with many error messages from the MPI library and the
operating system. In this case, you should find the relevant Spex error message before these lines.
It is recommendable to pipe the output to a file (in Bash)
Pipes stdout to "spex.out" and stderr to the screen::
......@@ -101,3 +104,46 @@ For the parallelized version, Spex has to be run through an MPI launcher, for ex
Depending on the job type and keywords, there are additional output files containing, for example, the resulting spectra.
These output files can be in ASCII and binary format. Further details are given in :numref:`tutorials`.
For reference, we give a list here:
"spex.cor"
Bare and screened Coulomb matrix
"spex.cot"
`T` matrix
"spex.mbas"
MT product basis
"spex.core"
Core contribution to susceptibility (it is k-independent, therefore precalculated)
"spex.dos"
Density of states
"spex.sigx"
Exchange (HF or COHSEX) self-energy
"spex.sigc"
Correlation (`GW`) self-energy
"spex.sigt"
Correlation (`GT`) self-energy
"spex.ccou"
`Contracted` screened Coulomb interaction (e.g., for COHSEX)
"spex.wcou"
Wannier-projected Coulomb interaction parameters (Hubbard `U`)
"spex.uwan"
Wannier U transformation matrix
"spex.kolap"
Overlap matrix (across k points) for Wannier construction with Wannier90
"suscep", "dielec", etc.
Files containing spectra
"<KS>"
KS eigensolutions (the name depends on the DFT program used, e.g., "KS.hdf".)
......@@ -24,12 +24,13 @@ the file "INSTALL" for a description of the compilation process. In short, if al
in standard directories, ``./configure`` and ``make`` should suffice to create working executables.
Special options can be given to the configure script:
* ``--enable-parallel``: Build parallel version (requires an MPI-3 compiler).
* ``--enable-mpi``: Build parallel version (requires an MPI-3 compiler).
* ``--enable-load``: Load wavefunctions from harddisc when needed (otherwise stored in memory).
* ``--with-wan``: Build with Wannier-function support (Wannier-function support requires the Wannier90 library, whose location can be specified with ``--with-wan=DIR``).
* ``--with-dft=PROG``: Build with an interface to the DFT program "PROG" instead of the default, which is fleur.v26 (2019.02); currently, only "fleur" (Fleur MaX version 3.1) is available as an alternative.
* ``--prefix=PREF``: Executables will be installed in directory "PREF" (/usr/local is default).
Enter ``./configure -h`` for a full list of configuration options.
Enter ``./configure -h`` for a full list of configuration options. Also see :numref:`spex_faq_configuration` for common problems in the configuration step.
.. note:: If the configuration fails, the file "config.log" should be consulted for more details about the failure.
In most cases, the compiler does not find a required library or an include file, in which case the corresponding
......
......@@ -4,27 +4,45 @@
Spex FAQ
===============
.. _spex_faq_configuration:
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.
.. highlights:: Your MPI compiler does not support the MPI-3 standard, which is required for the parallelized version. Make sure that the correct compiler is used.
You can specify the compiler with the environment variables ``FC`` or ``MPIFC``, e.g., directly on the command line ``./configure --enable-mpi MPIFC=mpif90``.
**Configuration stops with "Could not compile with HDF5."**
.. highlights:: This problem occurs quite often. It can be caused by one of the following reasons: (1) you do not have the HDF5 library, (2) you have
HDF5, but it is not installed in a standard directory (then, use the environment variable ``FCFLAGS`` to specify the location of the include file
"hdf5.mod", e.g., ``./configure FCFLAGS=-I<path-to-hdf5-include>``), or (3) you have the HDF5 library, but it has been compiled with a different
compiler than the one you are using for compiling Spex. In the latter case (3), please note that you might be using a different compiler than you think.
(For example, even after loading a particular compiler module, some systems still use a different Fortran compiler, often GFortran, by default
if you do not specify otherwise.) Then, you should use the environment variables ``FC`` or ``MPIFC`` as described before.
**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.
.. highlights:: The linker does not find the HDF5 library. This can happen if the HDF5 library is installed in a non-standard directory (as is the case with
many computer systems). In this case, you have to specify the location of the HDF5 library with the environment variable ``LDFLAGS``, e.g.,
``./configure LDFLAGS=-L<path-to-hdf5-lib>``. Consult your system administrator to inquire about the correct path.
**Configuration stops with "Could not link parallel HDF5 library."**
.. highlights:: Your HDF5 library has been compiled without parallelization support. Consult your system administrator.
You can get further information from the file ``config.log``.
You can get further information from the file "config.log".
Installation
-------------
**I want to use my own DFT program instead of Fleur.**
**I want to interface Spex to my own DFT program.**
.. highlights:: You will have to rewrite or modify the routines in ``read_write.f`` and ``Hwrapper.f`` according to
your output files and recompile the source. If you use a different radial mesh for the MT functions than Fleur/Spex,
it is recommendable to transform to the other mesh by interpolation.
.. highlights:: The data transfer between the DFT program and Spex is controlled by the routines in "readwrite_PROG.f" (where PROG stands for the name of the
DFT program). You will have to create this file (if it does not exist yet). A template file "readwrite_tmpl.f" with explanations is provided with the source.
The new file "readwrite_PROG.f" is included in the build process by reconfiguring (``./configure``) with the option ``--with-dft=PROG``.
**My compiler fails to compile the source.**
......@@ -45,9 +63,9 @@ Usage
* 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.**
**My GW calculations converge badly 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.
.. highlights:: This might be caused by using the keyword ``ZERO`` for systems with small band gaps (e.g. GaAs). In this case, try without ``ZERO``, which should guarantee a smooth (but slower) convergence.
**My calculations do not converge wrt the number of bands.**
......@@ -59,13 +77,13 @@ Usage
**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``).
.. highlights:: Band structures should be calculated without the keyword ``ZERO``. 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
--------------
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 error message starts with ``SPEX-BUG`` (see :numref:`spex.out`).
In this case you should contact the programmers. Error messages have the form ``SPEX-ERROR (source.f:0123) Error message``, where
In this case you should contact the developers. Error messages have the form ``SPEX-ERROR (source.f:0123) Error message``, where
"source.f" is the name of the source file and 0123 is the respective line where the error occurred. We shorten this to ``(source.f) Error message`` in this list.
**(read_write.f) k-point sets inconsistent (check ...)**
......
......@@ -25,7 +25,7 @@ for the bands (1,2,5) at the first, (1,3,5) at the seventh, and (1,2,3,5) at the
according to the ordering in the mean-field input data. In the example, we have left out some band indices because of energy
degeneracy. For example, bands 3 and 4 (of the first k point) are degenerate with band 2.
In the case of a spin-polarized systems, the quasiparticle energies for both spins are calculated by default.
In the case of a spin-polarized system, Spex calculates the quasiparticle energies for both spins by default.
Alternatively, one can choose the spin index by using u (spin up) or d (spin down), e.g., ``JOB GW 1:u(1,2,5) 1:d(1,2,5)``
is identical to ``JOB GW 1:(1,2,5)``.
......@@ -106,7 +106,7 @@ with the single-particle wavefunction :math:`{\phi_{\mathbf{k}n}}` and the frequ
:math:`{v^{\mathrm{xc}}}`, which in the case of a KS solution would correspond to the
local exchange-correlation potential; the nonlocal Hartree-Fock exchange potential and
the *hermitianized* self-energy of QSGW (see below) are other examples.
:math:`{Z_{\mathbf{k}n}=[1-\partial\Sigma^{\mathrm{xc}}/\partial\omega(\epsilon_{\mathbf{k}n})]^{-1}}` is called the renormalization factor. The two expressions on the right-hand side correspond to the "linearized" and "direct" (iterative) solutions given in the output. The direct solution takes into account the non-linearity of the quasiparticle equation and is thus considered the more accurate result. However, there is usually only little difference between the two values.
:math:`{Z_{\mathbf{k}n}=[1-\partial\Sigma^{\mathrm{xc}}/\partial\omega(\epsilon_{\mathbf{k}n})]^{-1}}` is called the renormalization factor. The two expressions on the right-hand side correspond to the "direct" (iterative) and "linearized" (non-iterative) solutions given in the output. The direct solution takes into account the non-linearity of the quasiparticle equation and is thus considered the more accurate result. However, there is usually only little difference between the two values.
Up to this point, the job syntax for Hartree Fock (``JOB HF``), PBE0 (``JOB PBE0``),
screened exchange (``JOB SX``), COHSEX (``JOB COSX``), and *GT* (``JOB GT`` and ``JOB GWT``)
calculations is identical to the one of *GW* calculations, e.g., ``JOB HF FULL X:(1-10)``.
......@@ -419,7 +419,10 @@ to use ``RESTART 2`` (:numref:`RESTART_GW`), in which case the self-energy is re
VXC (SENERGY)
--------------
(*) The matrix elements of the exchange-correlation potential are needed in the solution of Eq. :eq:`qppert`.
By default, these matrix elements are taken from the input data provided by the DFT code (e.g., in the file "vxcfull" written by Fleur). Alternatively, Spex can calculate the matrix using the potentials from the input data. (This is required for PBE0.) For that, the keyword ``VXC`` in section ``SENERGY`` can take the arguments ``READ`` (default) and ``CALC``.
By default, these matrix elements are calculated by Spex using the potentials from the input data.
Alternatively, they can be taken from data provided by the DFT code (e.g., in the file "vxcfull" written by Fleur).
For that, the keyword ``VXC`` in section ``SENERGY`` can take the arguments ``CALC`` (default) and ``READ``.
(In some cases, ``VXC READ`` is not available, e.g., for PBE0 calculations.)
.. list-table:: Examples
:widths: 16 100
......@@ -1009,7 +1012,7 @@ to project this interaction potential onto the set of local Wannier functions de
(:numref:`wannier`). The resulting interaction matrix elements
.. math::
V_{n_1n_2,n_3n_4}(\omega) = \langle n_1 n_2|V(\omega)|n_3 n_4\rangle = \iint w_{n_1}^*(\mathbf{r}) w_{n_3}(\mathbf{r}) V(\mathbf{r},\mathbf{r}';\omega) w_{n_2}^*(\mathbf{r}') w_{n_4}^*(\mathbf{r}') d^3r d^3r'
V_{n_1n_2,n_3n_4}(\omega) = \langle n_1 n_2|V(\omega)|n_3 n_4\rangle = \iint w_{n_1}^*(\mathbf{r}) w_{n_3}(\mathbf{r}) V(\mathbf{r},\mathbf{r}';\omega) w_{n_2}^*(\mathbf{r}') w_{n_4}(\mathbf{r}') d^3r d^3r'
:label: screenwdef
are written to the file "spex.cou" for the bare interaction (:math:`V=v`) and the screened interaction
......
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