The interface consists of two parts, :ref:`PLOVASP<refPLOVASP>`, a collection of
python classes and functions converting the raw VASP output to proper projector
functions, and the python based :ref:`VaspConverter<refVASPconverter>`, which
creates a h5 archive from the :ref:`PLOVASP<refPLOVASP>` output readable by
`SumkDFT`. Therefore, the conversion consist always of two steps.
Here, we will present a guide how the interface `can` be used to create input for a DMFT calculation, using SrVO3 as an example. Full examples can be found in the :ref:`tutorial section of DFTTools<tutorials>`.
Limitations of the interface
============================
* The interface works correctly only if the k-point symmetries
are turned off during the VASP run (ISYM=-1).
* Generation of projectors for k-point lines (option `Lines` in KPOINTS)
needed for Bloch spectral function calculations is not possible at the moment.
* The interface currently supports only collinear-magnetism calculation
(this implies no spin-orbit coupling) and spin-polarized projectors have not
The VASP **INCAR** option `LOCPROJ` selects a set of localized projectors that
will be written to the file **LOCPROJ** after a successful VASP run. A projector set is specified by site indices, labels of the target local states, and projector type:
:ref:`PLOVASP<refPLOVASP>` is a collection of python functions and classes, post-processing the raw VASP `LOCPROJ` output creating proper projector functions.
To run `PLOVASP`, one first prepares an input file `<name>.cfg` (default name `plo.cfg`) that describes the definition of the correlated subspace. For SrVO3 this input file would look like this:
This will create the xml files `vasp.ctrl` and `vasp.pg1` containing the orthonormalized projector functions readable by the :ref:`VaspConverter<refVASPconverter>`. Moreover, `PLOVASP` will output important information of the orthonormalization process, such as the density matrix of the correlated shell and the local Hamiltonian.
Running the VASP converter
-------------------------------------
The actual conversion to a h5-file is performed with the orthonormalized projector functions readable by the :ref:`VaspConverter<refVASPconverter>` in the same fashion as with the other `DFTTools` converters::
However, this should only be done after a careful study of the density matrix and the projected DOS in the localized basis. For the complete process for SrVO3 see the tutorial for the VASP interface `here <../tutorials/svo_vasp/svo_notebook.html>`_.
PLOVASP detailed guide
======================
The general purpose of the PLOVASP tool is to transform raw, non-normalized
projectors generated by VASP into normalized projectors corresponding to
user-defined projected localized orbitals (PLO). To enhance the performance
parsing the raw VASP output files, the parser is implemented in plain C. The
idea is that the python part of the parser first reads the first line of
**LOCPROJ** and then calls the C-routine with necessary parameters to parse
**PROJCAR**. The resulting PLOs can then be used for DFT+DMFT calculations with
or without charge self-consistency. PLOVASP also provides some utilities for
basic analysis of the generated projectors, such as outputting density matrices,
local Hamiltonians, and projected density of states.
PLOs are determined by the energy window in which the raw projectors are
normalized. This allows to define either atomic-like strongly localized Wannier
functions (large energy window) or extended Wannier functions focusing on
selected low-energy states (small energy window).
In PLOVASP, all projectors sharing the same energy window are combined into a
`projector group`. This allows one in principal to define several groups with
different energy windows for the same set of raw projectors. Note: multiple groups are not yet implemented.
A set of projectors defined on sites related to each other either by symmetry
or by an atomic sort, along with a set of :math:`l`, :math:`m` quantum numbers,
forms a `projector shell`. There could be several projectors shells in a
projector group, implying that they will be normalized within the same energy
window.
Projector shells and groups are specified by a user-defined input file whose
format is described below. Additionally, each shell can be marked correlated or non-correlated, to tell `SumkDFT` whether or not these should be treated in the DMFT impurity problem.
Input file format
-----------------
The input file is written in the standard config-file format.
Parameters (or 'options') are grouped into sections specified as
`[Section name]`. All parameters must be defined inside some section.
A PLOVASP input file can contain three types of sections:
#.**[General]**: includes parameters that are independent
of a particular projector set, such as the Fermi level, additional
output (e.g. the density of states), etc.
#.**[Group <Ng>]**: describes projector groups, i.e. a set of
projectors sharing the same energy window and normalization type.
At the moment, DFTtools support only one projector group, therefore
there should be no more than one projector group.
#.**[Shell <Ns>]**: contains parameters of a projector shell labelled
with `<Ns>`. If there is only one group section and one shell section,
the group section can be omitted but in this case, the group required
parameters must be provided inside the shell section.
Section [General]
"""""""""""""""""
The entire section is optional and it contains four parameters:
***BASENAME** (string): provides a base name for output files.
Default filenames are :file:`vasp.*`.
***DOSMESH** ([float float] integer): if this parameter is given,
the projected density of states for each projected orbital will be
evaluated and stored to files :file:`pdos_<s>_<n>.dat`, where `s` is the
shell index and `n` the ion index. The energy mesh is defined by three
numbers: `EMIN``EMAX``NPOINTS`. The first two
can be omitted in which case they are taken to be equal to the projector
energy window. **Important note**: at the moment this option works
only if the tetrahedron integration method (`ISMEAR = -4` or `-5`)
is used in VASP to produce `LOCPROJ`.
***EFERMI** (float): provides the Fermi level. This value overrides
the one extracted from VASP output files.
***HK** (True/False): If True, the projectors are applied the the Kohn-Sham
eigenvalues which results in a Hamitlonian H(k) in orbital basis. The H(k)
is written for each group to a file :file:`Basename.hk<Ng>`. It is recommended
to also set `COMPLEMENT = True` (see below). Default is False.
There are no required parameters in this section.
Section [Shell]
"""""""""""""""
This section specifies a projector shell. Each `[Shell]` section must be
labeled by an index, e.g. `[Shell 1]`. These indices can then be referenced
in a `[Group]` section.
In each `[Shell]` section two parameters are required:
***IONS** (list of integer): indices of sites included in the shell.
The sites can be given either by a list of integers `IONS = 5 6 7 8`
or by a range `IONS = 5..8`. The site indices must be compatible with
the POSCAR file.
***LSHELL** (integer): :math:`l` quantum number of the desired local states.
It is important that a given combination of site indices and local states
given by `LSHELL` must be present in the LOCPROJ file.
There are additional optional parameters that allow one to transform
the local states:
***CORR** (True/False): Determines if shell is correlated or not. At least one
In the current version of the interface the Fermi energy is extracted from the
`LOCPROJ` file. The file should contain the Fermi energy in the header. One can
either copy the Fermi energy manually there after a successful VASP run, or
modify the VASP source code slightly, by replacing the following line in
`locproj.F` (around line 695):
::
WRITE(99,'(4I6," # of spin, # of k-points, # of bands, # of proj" )') NS,NK,NB,NF
with:
::
WRITE(99,'(4I6,F12.7," # of spin, # of k-points, # of bands, # of proj, Efermi" )') W%WDES%NCDIJ,NK,NB,NF,EFERMI
Another critical point for CSC calculations is the function call of
`LPRJ_LDApU` in VASP. This function is not needed, and was left there for debug
purposes, but is called every iteration. Removing the call to this function in `electron.F` in line 644 speeds up the calculation significantly in the `ICHARG=5` mode. Moreover, this prevents VASP from generating the `GAMMA` file, which should ideally only be done by the DMFT code after a successful DMFT step, and then be read by VASP.