Adding links to reference manual. Minor updates.

This commit is contained in:
Manuel Zingl 2015-08-20 18:39:30 +02:00
parent 00a775a93d
commit 9935aa552d
5 changed files with 38 additions and 38 deletions

View File

@ -7,13 +7,13 @@ This section explains how to use some tools of the package in order to analyse t
There are two practical tools for which a self energy on the real axis is not needed, namely:
* :meth:`dos_wannier_basis <pytriqs.applications.dft.sumk_dft_tools.dos_wannier_basis>` for the density of states of the Wannier orbitals and
* :meth:`partial_charges <pytriqs.applications.dft.sumk_dft_tools.partial_charges>` for the partial charges according to the Wien2k definition.
* :meth:`dos_wannier_basis <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools.dos_wannier_basis>` for the density of states of the Wannier orbitals and
* :meth:`partial_charges <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools.partial_charges>` for the partial charges according to the :program:`Wien2k` definition.
However, a real frequency self energy has to be provided by the user to use the methods:
However, a real frequency self energy has to be provided by the user for the methods:
* :meth:`dos_parproj_basis <pytriqs.applications.dft.sumk_dft_tools.dos_parproj_basis>` for the momentum-integrated spectral function including self energy effects and
* :meth:`spaghettis <pytriqs.applications.dft.sumk_dft_tools.spaghettis>` for the momentum-resolved spectral function (i.e. ARPES)
* :meth:`dos_parproj_basis <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools.dos_parproj_basis>` for the momentum-integrated spectral function including self energy effects and
* :meth:`spaghettis <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools.spaghettis>` for the momentum-resolved spectral function (i.e. ARPES)
.. warning::
This package does NOT provide an explicit method to do an **analytic continuation** of the
@ -24,27 +24,27 @@ However, a real frequency self energy has to be provided by the user to use the
Initialisation
--------------
All tools described below are collected in an extension of the :class:`SumkDFT` class and are
loaded by importing the module :class:`SumkDFTTools`::
All tools described below are collected in an extension of the :class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>` class and are
loaded by importing the module :class:`SumkDFTTools <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools>`::
from pytriqs.applications.dft.sumk_dft_tools import *
The initialisation of the class is equivalent to that of the :class:`SumkDFT`
The initialisation of the class is equivalent to that of the :class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>`
class::
SK = SumkDFTTools(hdf_file = filename + '.h5')
Note that all routines available in :class:`SumkDFT` are also available here.
Note that all routines available in :class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>` are also available here.
If required, we have to load and initialise the real frequency self energy. Most conveniently,
you have your self energy already stored as a real frequency :class:`BlockGf` object
you have your self energy already stored as a real frequency :class:`BlockGf <pytriqs.gf.local.BlockGf>` object
in a hdf5 file::
ar = HDFArchive('case.h5', 'a')
SigmaReFreq = ar['dmft_output']['Sigma_w']
You may also have your self energy stored in text files. For this case we provide the function
:meth:`constr_Sigma_real_axis`, which loads the data and puts it into a real frequency :class:`BlockGf` object::
:meth:`constr_Sigma_real_axis`, which loads the data and puts it into a real frequency :class:`BlockGf <pytriqs.gf.local.BlockGf>` object::
from pytriqs.applications.dft.build_sigma_from_txt import *
SigmaReFreq = constr_Sigma_real_axis(SK, filename, hdf=False, hdf_dataset='SigmaReFreq',n_om=0, orb=0)
@ -57,9 +57,8 @@ where:
* `orb`: index of an inequivalent shell,
* `n_om`: the number of points in the real-axis mesh (used only if `hdf=False`).
It is important that some rules concerning the structure of the data is followed:
* Each data file should contain the three columns: real frequency, real part and imaginary part of the self-energy in exactly this order.
It is important that you follow some rules concerning the structure of your data files:
* Each data file should contain three columns: real frequency, real part and imaginary part of the self energy exactly in this order.
* If all blocks of your self energy are of dimension 1x1, you store them in `filename_(block)0.dat` files. Here `(block)` is a block name (`up`, `down`, or combined `ud`).
* In the case when you have matrix blocks, you store them in `(i)_(j).dat` files, where `(i)` and `(j)` are the zero based orbital indices, in the `filename_(block)` directory.
@ -74,6 +73,7 @@ and additionally set the chemical potential and the double counting correction f
SK.set_dc(dc_imp,dc_energ)
del ar
.. _dos_wannier:
Density of states of the Wannier orbitals
-----------------------------------------
@ -92,9 +92,9 @@ the output is printed into the files
* `DOS_wannier_(sp)_proj(i).dat`: The DOS projected to an orbital with index `(i)`. The index `(i)` refers to
the indices given in ``SK.shells``.
* `DOS_wannier_(sp)_proj(i)_(m)_(n).dat`: As above, but printed as orbitally-resolved matrix in indices
`(m)` and `(n)`. For `d` orbitals, it gives the DOS seperately for, e.g., :math:`d_{xy}`, :math:`d_{x^2-y^2}`, and so on,
`(m)` and `(n)`. For `d` orbitals, it gives the DOS separately for, e.g., :math:`d_{xy}`, :math:`d_{x^2-y^2}`, and so on,
otherwise, the ouptut is returend by the function for further use in python.
otherwise, the ouptput is returned by the function for a further usage in :program:`python`.
Partial charges
---------------
@ -107,8 +107,8 @@ real frequency self energy for this purpose. The calculation is done by::
which calculates the partial charges using the self energy, double counting, and chemical potential as set in the
`SK` object. On return, `dm` is a list, where the list items correspond to the density matrices of all shells
defined in the list `SK.shells`. This list is constructed by the Wien2k converter routines and stored automatically
in the hdf5 archive. For the detailed structure of `dm`, see the reference manual.
defined in the list `SK.shells`. This list is constructed by the :program:`Wien2k` converter routines and stored automatically
in the hdf5 archive. For the structure of `dm`, see also :meth:`reference manual <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools.partial_charges>`.
Correlated spectral function (with real frequency self energy)
--------------------------------------------------------------
@ -119,7 +119,7 @@ we can execute::
SK.dos_parproj_basis(broadening=0.0, with_Sigma=True, with_dc=True, save_to_file=True)
The variable `broadening` is an additional Lorentzian broadening (default: `0.01 eV`) applied to the resulting spectra.
The output is written in the same way as described above for Wannier density of states, but with file names
The output is written in the same way as described above for the :ref:`Wannier density of states <dos_wannier>`, but with filenames
`DOS_parproj_*` instead.
Momentum resolved spectral function (with real frequency self energy)
@ -127,12 +127,12 @@ Momentum resolved spectral function (with real frequency self energy)
Another quantity of interest is the momentum-resolved spectral function, which can directly be compared to ARPES
experiments. First we have to execute `lapw1`, `lapw2 -almd` and :program:`dmftproj` with the `-band`
option and use the :meth:`convert_bands_input()` routine to convert the required files. For a detailed description
see :ref:`conversion`. The spectral function is then calculated by::
option and use the :meth:`convert_bands_input <pytriqs.applications.dft.converters.wien2k_converter.Wien2kConverter.convert_bands_input>`
routine, which converts the required files (for a more detailed description see :ref:`conversion`). The spectral function is then calculated by typing::
SK.spaghettis(broadening=0.01,plot_shift=0.0,plot_range=None,ishell=None,save_to_file='Akw_')
Optional parameters are
Here, optional parameters are
* `shift`: An additional shift added as `(ik-1)*shift`, where `ik` is the index of the `k` point. This is useful for plotting purposes.
The default value is 0.0.

View File

@ -105,7 +105,7 @@ directory name):
Now we convert these files into an hdf5 file that can be used for the
DMFT calculations. For this purpose we
use the python module :class:`Wien2kConverter`. It is initialised as::
use the python module :class:`Wien2kConverter <pytriqs.applications.dft.converters.wien2k_converter.Wien2kConverter>`. It is initialised as::
from pytriqs.applications.dft.converters.wien2k_converter import *
Converter = Wien2kConverter(filename = case)
@ -133,8 +133,8 @@ After this step, all the necessary information for the DMFT loop is
stored in the hdf5 archive, where the string variable
`Converter.hdf_filename` gives the file name of the archive.
At this point you should use the method :meth:`dos_wannier_basis`
contained in the module :class:`SumkDFTTools` to check the density of
At this point you should use the method :meth:`dos_wannier_basis <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools.dos_wannier_basis>`
contained in the module :class:`SumkDFTTools <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools>` to check the density of
states of the Wannier orbitals (see :ref:`analysis`).
You have now everything for performing a DMFT calculation, and you can
@ -144,7 +144,7 @@ Data for post-processing
""""""""""""""""""""""""
In case you want to do post-processing of your data using the module
:class:`SumkDFTTools`, some more files
:class:`SumkDFTTools <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools>`, some more files
have to be converted to the hdf5 archive. For instance, for
calculating the partial density of states or partial charges
consistent with the definition of :program:`Wien2k`, you have to invoke::
@ -165,7 +165,7 @@ following. First, one has to do the Wien2k calculation on the given
Again, maybe with the optional additional extra flags according to
Wien2k. Now we use a routine of the converter module allows to read
and convert the input for :class:`SumkDFTTools`::
and convert the input for :class:`SumkDFTTools <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools>`::
Converter.convert_bands_input()
@ -234,13 +234,13 @@ The interface packages are written such that all the file operations
are done only on the master node. In general, the philosophy of the
package is that whenever you read in something from the archive
yourself, you have to *manually* broadcast it to the nodes. An
exception to this rule is when you use routines from :class:`SumkDFT`
or :class:`SumkDFTTools`, where the broadcasting is done for you.
exception to this rule is when you use routines from :class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>`
or :class:`SumkDFTTools <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools>`, where the broadcasting is done for you.
Interfaces to other packages
----------------------------
Because of the modular structure, it is straight forward to extend the TRIQS package
Because of the modular structure, it is straight forward to extend the :ref:`TRIQS <triqslibs:welcome>` package
in order to work with other band-structure codes. The only necessary requirement is that
the interface module produces an hdf5 archive, that stores all the data in the specified
form. For the details of what data is stored in detail, see the

View File

@ -16,7 +16,7 @@ Wien2k + dmftproj
In order to do charge self-consistent calculations, we have to tell the band structure program about the
changes in the charge density due to correlation effects. In the following, we discuss how to use the
:program:`TRIQS` tools in combination with the :program:`Wien2k` program.
:ref:`TRIQS <triqslibs:welcome>` tools in combination with the :program:`Wien2k` program.
We can use the DMFT script as introduced in section :ref:`singleshot`,
with just a few simple

View File

@ -14,7 +14,7 @@ Initialisation of the calculation
---------------------------------
Before doing the calculation, we have to intialize all the objects that we will need. The first thing is the
:class:`SumkDFT` class. It contains all basic routines that are necessary to perform a summation in k-space
:class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>` class. It contains all basic routines that are necessary to perform a summation in k-space
to get the local quantities used in DMFT. It is initialized by::
from pytriqs.applications.dft.sumk_dft import *
@ -25,7 +25,7 @@ Setting up the impurity solver
------------------------------
The next step is to setup an impurity solver. There are different
solvers available within the TRIQS framework. Below, we will discuss
solvers available within the :ref:`TRIQS <triqslibs:welcome>` framework. Below, we will discuss
the example of the hybridisation
expansion :ref:`CTHYB solver <triqscthyb:welcome>`. Later on, we will
see also the example of the Hubbard-I solver. They all have in common,
@ -62,7 +62,7 @@ iterations and the self-consistency condition::
SK.save(['chemical_potential','dc_imp','dc_energ']) # Save data in the hdf5 archive
These basic steps are enough to set up the basic DMFT Loop. For a detailed
description of the :class:`SumkDFT` routines, see the reference
description of the :class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>` routines, see the reference
manual.
After
@ -170,11 +170,11 @@ will be stored in a separate subgroup in the hdf5 file, called
`dmft_output`. Removing this subgroup allows you to reset your
calculation to the starting point easily.
Now we can use all this information to initialise the :class:`SumkDFT` class::
Now we can use all this information to initialise the :class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>` class::
SK = SumkDFT(hdf_file=dft_filename+'.h5',use_dft_blocks=use_blocks)
The next step is to initialise the :class:`Solver` class. It consist
The next step is to initialise the :class:`Solver <pytriqs.applications.impurity_solvers.cthyb.Solver>` class. It consist
of two steps
#. Calculating the multi-band interaction matrix, and setting up the

View File

@ -89,7 +89,7 @@ however there are also some differences. First difference is that we import the
The Hubbard-I solver is very fast and we do not need to take into account the DFT block structure or use any approximation for the *U*-matrix.
We load and convert the :program:`dmftproj` output and initialize the
:class:`SumkDFT` class as described in :ref:`conversion` and
:class:`SumkDFT <pytriqs.applications.dft.sumk_dft.SumkDFT>` class as described in :ref:`conversion` and
:ref:`singleshot` and then set up the Hubbard-I solver ::
S = Solver(beta = beta, l = l)
@ -206,7 +206,7 @@ symmetries::
Converter.convert_parpoj_input()
To get access to analysing tools we initialize the
:class:`SumkDFTTools` class ::
:class:`SumkDFTTools <pytriqs.applications.dft.sumk_dft_tools.SumkDFTTools>` class ::
SK = SumkDFTTools(hdf_file=dft_filename+'.h5', use_dft_blocks=False)