Commit 8f627f7f authored by anoop chandran's avatar anoop chandran

add installation and getting started documentation

parent 5255f6a4
.. _getting_started:
Getting Started
This section is intended to give a first impression on how a typical calculation is carried out. Details are given in later sections.
Many-body perturbation theory is defined with respect to a formally unperturbed system, i.e., a system without electron-electron interaction. Any mean-field theory, e.g., Hartree-Fock or Kohn-Sham (KS) DFT, provides such a system. Thus before running Spex we must find a self-consistent mean-field solution. Normally this first step is fast and we can use a dense k-point set. For the calculation with Spex we have to generate a new (and usually coarser) k-point set and calculate the corresponding wave functions and energies with the mean-field program in a second run. Thus a typical procedure is
1. self-consistent DFT calculation (e.g. with Fleur),
2. generate new k-point set with Spex,
3. second run of the DFT program to generate the eigenstates at the new k points,
4. finally run Spex.
For the first and third step consult the manual of your DFT program. (Click `here`_ for the Fleur manual and also read the section `Spex and Fleur`_. You must set ``gw=1`` and ``gw=2`` for the first and third step, respectively.) For the second and fourth step you need to create an input file ``spex.inp`` for Spex. A very simple input file for a GW calculation of Si is this:
.. _here:
.. _Spex and Fleur:
.. code-block:: bash
# Quasiparticle energies of bands at the high-symmetry points Gamma, X and L.
BZ 4 4 4
KPT X=[0,0,1] L=1/2*[1,1,1]
JOB GW 1:(1,2,5) X:(1,3,5) L:(1-3,5)
For the second step only the lines beginning with ``BZ`` and ``WRTKPT`` are necessary. The line ``BZ 4 4 4`` defines a 4x4x4 k-point set, and the keyword ``WRTKPT`` tells Spex to write the (irreducible) k-points to a file (``kpts`` for Fleur) and stop.
For the fourth step you must remove (or comment out) the keyword ``WRTKPT``. Now all other parameters are needed. The results are written to standard output and should be piped to a file. As long as you do not change the k-point set, the first three steps need not be repeated for a new run of Spex.
.. note:: As an alternative to ``WRTKPT``, the command line option -w can be used (``spex -w``). It sets the keyword ``WRTKPT`` automatically.
.. _installation:
The Spex source code cannot be downloaded directly. Please contact
Install prerequisite software
For compiling the source you need:
* a modern FORTRAN compiler (the code uses some FORTRAN 2008 functionality),
* the BLAS, LAPACK, FFTW, and HDF5 libraries as well as the Wannier90 library if you need Wannier support,
* an implementation of the MPI-3 standard if you intend to compile the parallel version.
Configure the spex installation
Once you have obtained the code (``spexVERSION.tgz``) unpack it with your local version of tar and change to the ``spexVERSION`` directory, where ``VERSION`` is the version number, e.g. "05.00". There you should find the source code and a configure shell script that helps to generate a Makefile for your system. Consult the file ``INSTALL`` for a description of the compilation process. In short, if all necessary libraries are in standard directories, ``./configure`` and make should suffice to create a working executable. Special options can be given to the configure script:
* ``--enable-parallel``: Build parallel version (requires an MPI-3 compiler).
* ``--enable-load``: Load wave functions from harddisc when needed (otherwise stored in memory).
* ``--with-wan``: Build with Wannier-function support
* ``--prefix=PREF``: Executables will be installed in directory PREF (`/usr/local` is default).
.. note:: Enter ``./configure -h`` for a full list of configuration options
.. warning:: Wannier-function support requires the Wannier90 library, whose location can be specified with ``–with-wan=DIR``
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