Commit 9d252d08 authored by Christoph Friedrich's avatar Christoph Friedrich

New: NOSTORE, FREQINT NONLIN, syntax of input file.

parent aa7cedb4
...@@ -94,6 +94,15 @@ This is an important keyword. It enables (a) continuing a calculation that has, ...@@ -94,6 +94,15 @@ This is an important keyword. It enables (a) continuing a calculation that has,
* - ``RESTART 2`` * - ``RESTART 2``
- Try to reuse data from standard output files. - Try to reuse data from standard output files.
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.
By default, Spex pre-calculates the Coulomb matrices for all k and stores them in memory. However, this can be quite memory-demanding (especially
for large k-point sets). Therefore, the keyword ``NOSTORE`` (section ``COULOMB``) avoids the storage of all Coulomb matrices.
Instead, at any given time, only one Coulomb matrix is stored in memory. This keyword is recommendable in particular for parallel runs (due to a
rather inefficient parallelization of calculations without ``NOSTORE``.)
Input data Input data
=========== ===========
Spex needs data from a previous self-consistent solution of a mean-field system (e.g., KS-DFT). Several keywords can be used to analyze, check, and modify the input data. Spex needs data from a previous self-consistent solution of a mean-field system (e.g., KS-DFT). Several keywords can be used to analyze, check, and modify the input data.
......
...@@ -24,15 +24,18 @@ The Spex code recognizes several command-line options (``spex [OPTIONS]``): ...@@ -24,15 +24,18 @@ The Spex code recognizes several command-line options (``spex [OPTIONS]``):
Input file Input file
++++++++++++ ++++++++++++
By default, Spex reads input parameters from the file "spex.inp". The syntax is as follows. By default, Spex reads input parameters from the file "spex.inp".
The syntax is as follows.
* The file "spex.inp" does not use a fixed format, and the keywords may be given in any order. * The file "spex.inp" does not use a fixed format, and the keywords may be given in any order.
* Each keyword is given on one line together with its parameters following it. * Each keyword is given on one line together with its parameters following it.
* Keywords must not be specified more than once. * Keywords must not be specified more than once.
* Some keywords are grouped in sections. A section starts with ``SECTION sectionname`` and ends with ``END``. * Some keywords are grouped in sections. A section starts with ``SECTION sectionname`` and ends with ``END``.
* All keywords (and section names) are in capital letters. * All keywords (and section names) are in capital letters.
* Everything after a ``#`` sign is interpreted as a comment. Empty lines are allowed. * Everything after a ``#`` sign is interpreted as a comment.
* Lines are only interpreted up to the 80th column. Line continuation is possible using a single backslash ``\`` at the end of the previous line. * Comments starting with ``##`` and ``###`` are written to standard output and standard error, respectively, see below.
* Empty lines are allowed.
* Line continuation is possible using a single backslash ``\`` at the end of the previous line.
* Most keyword parameters have default values that are used if the keyword is not specified. * Most keyword parameters have default values that are used if the keyword is not specified.
* By default, parameters are given in atomic units. In the case of energies, it is possible to use eV instead, e.g., ``1.0eV``. * By default, parameters are given in atomic units. In the case of energies, it is possible to use eV instead, e.g., ``1.0eV``.
* The input file can be truncated with the keyword ``EXIT``. Everything after ``EXIT`` is ignored. * The input file can be truncated with the keyword ``EXIT``. Everything after ``EXIT`` is ignored.
...@@ -49,6 +52,11 @@ An example for a section in the input file is ...@@ -49,6 +52,11 @@ An example for a section in the input file is
(The indentation is not mandatory and only included here for clarity.) (The indentation is not mandatory and only included here for clarity.)
Spex writes the input file in formatted form to standard output without comments except for the special ``##`` and ``###`` comments, which are
written, respectively, to standard output (as a comment) and to standard error (as a warning). The former can be used to give details about the calculation
(example ``## silicon bulk (QSGW)``) and the latter to give a special warning (example ``### test run with extreme parameters``)
that, for greater visibility, should appear in the standard error stream.
.. note:: The keywords are detailed in the coming chapters. If a keyword belongs to a section, the section's name is specified as well, for example, ``CONTINUE (SENERGY)``. .. note:: The keywords are detailed in the coming chapters. If a keyword belongs to a section, the section's name is specified as well, for example, ``CONTINUE (SENERGY)``.
.. _spex.out: .. _spex.out:
......
...@@ -324,16 +324,24 @@ For this frequency integration, we interpolate *W* and then perform the convolut ...@@ -324,16 +324,24 @@ For this frequency integration, we interpolate *W* and then perform the convolut
The keyword ``FREQINT`` determines how the interpolation should be done. It can take the two arguments ``SPLINE`` (default) and ``PADE`` The keyword ``FREQINT`` determines how the interpolation should be done. It can take the two arguments ``SPLINE`` (default) and ``PADE``
for spline [after the transformation :math:`{\omega'\rightarrow \omega'/(1+\omega')}`] and Padé interpolation, respectively. for spline [after the transformation :math:`{\omega'\rightarrow \omega'/(1+\omega')}`] and Padé interpolation, respectively.
In the case of *GT* calculations, there is a similar frequency integration with the *T* matrix replacing *W*. In the case of *GT* calculations, there is a similar frequency integration with the *T* matrix replacing *W*.
There, the default is ``PADE``. An experimental option is ``NONLIN``, which invokes a new tetrahedron k integration method that uses weight functions instead of
weight factors. This enables smooth integrations over strongly varying (highly nonlinear) functions, which is particularly useful
for the magnetic *T* matrix with its very sharp spin-wave peaks. Therefore, the default for *GT* calculations is ``NONLIN``.
``FREQINT NONLIN``, in particular, affects the calculation of the residues
part in a ``CONTOUR`` calculation but also the integration along the imaginary frequency axis (both for ``CONTINUE`` and ``CONTOUR``),
where it uses Padé interpolation. We note that ``FREQINT NONLIN`` and, to a lesser extent, also ``FREQINT PADE`` tend to break energy
degeneracies slightly.
.. list-table:: Examples .. list-table:: Examples
:widths: 28 100 :widths: 28 100
* - ``FREQINT SPLINE`` * - ``FREQINT SPLINE``
- Use spline interpolation for *W* (or *T*) in the frequency convolution :math:`{G\cdot W}` (:math:`{G\cdot T}`). - Use spline interpolation for *W* (or *T*) in the frequency convolution :math:`{G\cdot W}` (:math:`{G\cdot T}`) (default for *GW*).
* - ``FREQINT PADE`` * - ``FREQINT PADE``
- Use Padé interpolation. - Use Padé interpolation.
* - ``FREQINT NONLIN``
- Use new tetrahedron k integration method (default for *GT*).
.. _SMOOTH: .. _SMOOTH:
SMOOTH (SENERGY) SMOOTH (SENERGY)
...@@ -788,7 +796,13 @@ So, the first order of :math:`{\langle e^{i\mathbf{kr}} \phi_{\mathbf{q}n} | \ph ...@@ -788,7 +796,13 @@ So, the first order of :math:`{\langle e^{i\mathbf{kr}} \phi_{\mathbf{q}n} | \ph
(corresponding to :math:`{\mu=1}`) in :math:`k` becomes relevant. Using :math:`k\cdot p` perturbation theory, (corresponding to :math:`{\mu=1}`) in :math:`k` becomes relevant. Using :math:`k\cdot p` perturbation theory,
one can show that the linear term is proportional to :math:`{(\epsilon_{\mathbf{q}n'}-\epsilon_{\mathbf{q}n})^{-1}}`. one can show that the linear term is proportional to :math:`{(\epsilon_{\mathbf{q}n'}-\epsilon_{\mathbf{q}n})^{-1}}`.
This can lead to numerical problems if the two energies are very close to each other. This can lead to numerical problems if the two energies are very close to each other.
Therefore, when treating the :math:`{\Gamma}` point (:math:`k=0`), Spex multiplies the linear term with this energy difference, resulting in smooth and non-divergent values, and takes the energy difference into account by replacing :math:`{S(\omega)\rightarrow S(\omega)/\omega}` in the frequency integration of Eq. :eq:`eqP`, thereby avoiding the numerical difficulties. (As an alternative, the energy differences can also be incorporated into the integration weights, which is arguably even more stable numerically, see option ``INT`` below.) By default, Spex does that only at :math:`k=0`. The behavior can be changed with the keyword ``MULTDIFF`` in the section ``SUSCEP``. Therefore, when treating the :math:`{\Gamma}` point (:math:`k=0`),
Spex multiplies the linear term with this energy difference, resulting in smooth and non-divergent values,
and takes the energy difference into account by replacing :math:`{S(\omega)\rightarrow S(\omega)/\omega}` in the frequency integration of Eq. :eq:`eqP`,
thereby avoiding the numerical difficulties.
By default, Spex does that only at :math:`k=0`. The behavior can be changed with the keyword ``MULTDIFF`` in the section ``SUSCEP``.
As an alternative, the energy differences can also be incorporated into the integration weights,
which is arguably even more stable numerically, see option ``INT`` below.
.. list-table:: Examples .. list-table:: Examples
:widths: 28 100 :widths: 28 100
......
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