3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-11 05:43:48 +02:00

minor doc fixes

This commit is contained in:
Alexander Hampel 2023-06-19 11:03:56 -04:00
parent 28c0ab45e0
commit 59bef9f5f8
4 changed files with 75 additions and 64 deletions

View File

@ -83,7 +83,7 @@ For plotting the density of states, you type::
SK.density_of_states(mu, broadening, mesh, with_Sigma, with_dc, proj_type, dosocc, save_to_file)
where a brief description of all of the inputs are given in :meth:`density_of_states <dft.sumk_dft_tools.SumkDFTTools.density_of_states>`, which a more in depth discussion of using this routine is given here.
where a description of all of the inputs are given in :meth:`density_of_states <dft.sumk_dft_tools.SumkDFTTools.density_of_states>`:
.. automethod:: triqs_dft_tools.sumk_dft_tools.SumkDFTTools.density_of_states
:noindex:
@ -92,7 +92,7 @@ where a brief description of all of the inputs are given in :meth:`density_of_st
:width: 600
:align: center
The figure above shows the DFT SrVO\ :sub:`3`\ density of states generated from 2925 k-points in the irreducible Brillouin zone with the V t\ :sub:`2g`\ Wanner projectors generated within a correlated energy window of [-13.6, 13.6] eV. The `broadening` input has been set to the temperature (i.e., 1/Beta). The total, V t\ :sub:`2g`\ Wannier and occupied total density of states generated from the SK.density_of_states() routine are shown. Note that the noise in the density of states comes from the number of k-points used. This can be removed upon by either using more k-points or using a larger `broadening` value.
The figure above shows the DFT SrVO\ :sub:`3`\ density of states generated from 2925 k-points in the irreducible Brillouin zone with the V t\ :sub:`2g`\ Wannier projectors generated within a correlated energy window of [-13.6, 13.6] eV. The `broadening` input has been set to the temperature (i.e., 1/Beta). The total, V t\ :sub:`2g`\ Wannier and occupied total density of states generated from the SK.density_of_states() routine are shown. Note that the noise in the density of states comes from the number of k-points used. This can be removed upon by either using more k-points or using a larger `broadening` value.
Band resolved density matrices
@ -123,7 +123,7 @@ This spectral function is calculated by typing::
:width: 1000
:align: center
The figure above shows the DFT SrVO\ :sub:`3`\ spaghetti plot (generated using V t\ :sub:`2g`\ Wanner projectors generated within a correlated energy window of [-13.6, 13.6] eV). As before, the broadening input has been set to the temperature (i.e., 1/Beta). The left panel shows the total A(k, :math:`\omega`) whereas the right gives the Wannier A(k, :math:`\omega`), both generated from this SK.spaghettis().
The figure above shows the DFT SrVO\ :sub:`3`\ spaghetti plot (generated using V t\ :sub:`2g`\ Wannier projectors generated within a correlated energy window of [-13.6, 13.6] eV). As before, the broadening input has been set to the temperature (i.e., 1/Beta). The left panel shows the total A(k, :math:`\omega`) whereas the right gives the Wannier A(k, :math:`\omega`), both generated from this SK.spaghettis().
Energy contours of the k-resolved Spectral function
@ -142,7 +142,7 @@ This routine calculates the k-resolved spectral function evaluated at the Fermi
:width: 1000
:align: center
The figure above shows the DFT SrVO\ :sub:`3`\ energy contour plots (again, generated using V t\ :sub:`2g`\ Wanner projectors generated within a correlated energy window of [-13.6, 13,6] eV and broadening of 1/Beta). Both panels have been generated on a k-mesh within the first Brilluoin zone on the k\ :sub:`z`\ = 0.0 plane centered at the :math:`\Gamma` point. Here, each panel generated using the outputs from this SK.spectral_contours_plot() routine shows the A(k, :math:`\omega`) evaluated at :math:`\omega` = -0.5 eV (left) and the Fermi level, :math:`\omega` = 0.0 eV, (right).
The figure above shows the DFT SrVO\ :sub:`3`\ energy contour plots (again, generated using V t\ :sub:`2g`\ Wannier projectors generated within a correlated energy window of [-13.6, 13,6] eV and broadening of 1/Beta). Both panels have been generated on a k-mesh within the first Brillouin zone on the k\ :sub:`z`\ = 0.0 plane centered at the :math:`\Gamma` point. Here, each panel generated using the outputs from this SK.spectral_contours_plot() routine shows the A(k, :math:`\omega`) evaluated at :math:`\omega` = -0.5 eV (left) and the Fermi level, :math:`\omega` = 0.0 eV, (right).
Partial charges

View File

@ -152,7 +152,7 @@ These outputs are converted to the HDF5 file by::
The kgrid and ngrid are user-defined numpy array inputs containing the plot3d inputs described above.
These inputs are needed to generate the reciprocal lattice coordinates for the output files.
The default for both of these variables is None, which in this case the converter automatically generates the
full Brilluoin zone by applying all of the symmetry operators to the read IBZ coordinates. However,
full Brillouin zone by applying all of the symmetry operators to the read IBZ coordinates. However,
if the plot3d input is a k-mesh not centered around the origin and/or a k-mesh which only requires
a subset of the symmetry operators (say a 2D k-mesh) then the plot3d input needs to be an input to
the converter. Here, kgrid would be a double numpy array of size (4,3) specifying the k-mesh corner,

View File

@ -168,7 +168,7 @@ Example
-------
Here we present an example calculation of the DFT optical conductivity of SrVO3 comparing the results from the Elk and Wien2k inputs. The DFT codes used 4495 k-points in the
irreducible Brillouin zone with Wanner projectors generated within a correlated energy window of [-8, 7.5] eV. We assume that the required DFT files have been read and saved by the TRIQS
irreducible Brillouin zone with Wannier projectors generated within a correlated energy window of [-8, 7.5] eV. We assume that the required DFT files have been read and saved by the TRIQS
interface routines as discussed previously. Below is an example script to generate the conductivities::
from sumk_dft_tools import *

View File

@ -58,6 +58,14 @@ class SumkDFTTools(SumkDFT):
Calculates the density of states and the projected density of states.
The basis of the projected density of states is specified by proj_type.
The output files (if `save_to_file = True`) have two (three in the orbital-resolved case) columns representing the frequency and real part of the DOS (and imaginary part of the DOS) in that order.
The output files are as follows:
- DOS_(spn).dat, the total DOS.
- DOS_(proj_type)_(spn)_proj(i).dat, the DOS projected to an orbital with index i which refers to the index given in SK.shells (or SK.corr_shells for proj_type = "wann").
- DOS_(proj_type)_(sp)_proj(i)_(m)_(n).dat, As above, but printed as orbitally-resolved matrix in indices "m" and "n". For example, for "d" orbitals, it gives the DOS separately for each orbital (e.g., `d_(xy)`, `d_(x^2-y^2)`, and so on).
Parameters
----------
mu : double, optional
@ -81,6 +89,7 @@ class SumkDFTTools(SumkDFT):
These projected spectral functions will be determined alongside the total spectral function.
By default, no projected DOS type will be calculated (the corresponding projected arrays will be empty).
The following options are:
'None' - Only total DOS calculated
'wann' - Wannier DOS calculated from the Wannier projectors
'vasp' - Vasp orbital-projected DOS only from Vasp inputs
@ -101,15 +110,8 @@ class SumkDFTTools(SumkDFT):
DOSproj_orb : Dict of numpy arrays
Orbital-projected DOS projected to atom (shell) and resolved into orbital contributions with the form of DOSproj_orb[n_shells][spn][n_om,dim,dim] where "dim" specifies the orbital dimension of the correlated/uncorrelated shell (depending on the input "proj_type").
Empty if proj_type = None
The output files (if `save_to_file = True`) have two (three in the orbital-resolved case) columns representing the frequency and real part of the DOS (and imaginary part of the DOS) in that order.
The output files are as follows:
DOS_(spn).dat : The total DOS.
DOS_(proj_type)_(spn)_proj(i).dat : The DOS projected to an orbital with index i which refers to the index given in SK.shells (or SK.corr_shells for proj_type = "wann").
DOS_(proj_type)_(sp)_proj(i)_(m)_(n).dat: As above, but printed as orbitally-resolved matrix in indices "m" and "n". For example, for "d" orbitals, it gives the DOS separately for each orbital (e.g., "d_(xy)", "d_(x^2-y^2), and so on).
"""
# Note the proj_type = 'elk' (- Elk orbital-projected DOS only from Elk inputs) is not included for now.
# Brief description to why can be found in the comment above the currently commented out dft_band_characters() routine
# in converters/elk.py.
@ -284,6 +286,7 @@ class SumkDFTTools(SumkDFT):
"""
Internal routine which calculates the project Green's function subject to the
proj_type input.
Parameters
----------
G_latt : Gf
@ -306,6 +309,7 @@ class SumkDFTTools(SumkDFT):
projected/downfolded lattice Green's function
Contains the band-resolved density matrices per k-point.
"""
# Note the proj_type = 'elk' (- Elk orbital-projected DOS only from Elk inputs) is not included for now.
# Brief description to why can be found in the comment above the currently commented out dft_band_characters() routine
# in converters/elk.py.
@ -354,6 +358,7 @@ class SumkDFTTools(SumkDFT):
"""
Internal routine which loads the n_parproj, proj_mat_all, rot_mat_all and
rot_mat_all_time_inv from parproj data from .h5 file.
Parameters
----------
data_type : string, optional
@ -361,6 +366,7 @@ class SumkDFTTools(SumkDFT):
'band' - reads data converted by bands_convert()
None - reads data converted by parproj_convert()
"""
# read in the projectors
things_to_read = ['n_parproj', 'proj_mat_all']
if data_type == 'band':
@ -399,7 +405,7 @@ class SumkDFTTools(SumkDFT):
save_occ : boolean, optional
If True, saves the band resolved density matrix in misc_data.
save_to_file : boolean, optional
If True, text files with the calculated data will be created.\
If True, text files with the calculated data will be created.
Returns
-------
@ -451,6 +457,16 @@ class SumkDFTTools(SumkDFT):
Calculates the correlated spectral function at the Fermi level (relating to the Fermi
surface) or at specific frequencies.
The output files have three columns representing the k-point index, frequency and A(k,w) in that order. The output files are as follows:
* `Akw_(sp).dat`, the total A(k,w)
* `Akw_(proj_type)_(spn)_proj(i).dat`, the A(k,w) projected to shell with index (i).
* `Akw_(proj_type)_(spn)_proj(i)_(m)_(n).dat`, as above, but for each (m) and (n) orbital contribution.
The files are prepended with either of the following:
For `FS` set to True the output files name include _FS_ and these files contain four columns which are the cartesian reciprocal coordinates (kx, ky, kz) and Akw.
For `FS` set to False the output files name include _omega_(iom) (with `iom` being the frequency mesh index). These files also contain four columns as described above along with a comment at the top of the file which gives the frequency value at which the spectral function was evaluated.
Parameters
----------
mu : double, optional
@ -483,8 +499,9 @@ class SumkDFTTools(SumkDFT):
These projected spectral functions will be determined alongside the total spectral function.
By default, no projected DOS type will be calculated (the corresponding projected arrays will be empty).
The following options are:
'None' - Only total DOS calculated
'wann' - Wannier DOS calculated from the Wannier projectors
* `None` Only total DOS calculated
* `wann` Wannier DOS calculated from the Wannier projectors
save_to_file : boolean, optional
If True, text files with the calculated data will be created.
@ -495,23 +512,13 @@ class SumkDFTTools(SumkDFT):
This dictionary has the form of `Akw[spn][n_k, n_om]` where spn, n_k and n_om are the spin, number of k-points, and number of frequencies used in the calculation.
pAkw : Dict of numpy arrays
(Correlated) k-resolved spectral function projected to atoms (i.e., the Trace of the orbital-projected A(k,w)).
This dictionary has the form of pAkw[n_shells][spn][n_k, n_om] where n_shells is the total number of correlated or uncorrelated shells.
Empty if proj_type = None
This dictionary has the form of pAkw[n_shells][spn][n_k, n_om] where n_shells is the total number of correlated or uncorrelated shells. Empty if `proj_type = None`
pAkw_orb : Dict of numpy arrays
(Correlated) k-resolved spectral function projected to atoms and
resolved into orbital contributions.
This dictionary has the form of pAkw[n_shells][spn][n_k, n_om,dim,dim] where dim specifies the orbital dimension of the correlated/uncorrelated shell.
Empty if proj_type = None
The output files have three columns representing the k-point index, frequency and A(k,w) in that order. The output files are as follows:
Akw_(sp).dat : The total A(k,w).
Akw_(proj_type)_(spn)_proj(i).dat: The A(k,w) projected to shell with index (i).
Akw_(proj_type)_(spn)_proj(i)_(m)_(n).dat`: As above, but for each (m) and (n) orbital contribution.
The files are prepended with either of the following:
For `FS` set to True : The output files' name include _FS_ and these files contain four columns which are the cartesian reciprocal coordinates (kx, ky, kz) and Akw.
For `FS` set to False : The output files' name include _omega_(iom) (with `iom` being the frequency mesh index). These files also contain four columns as described above along with a comment at the top of the file which gives the frequency value at which the spectral function was evaluated.
This dictionary has the form of pAkw[n_shells][spn][n_k, n_om,dim,dim] where dim specifies the orbital dimension of the correlated/uncorrelated shell. Empty if `proj_type = None`
"""
if (proj_type != None):
assert proj_type in ('wann'), "'proj_type' must be 'wann' if not None"
# read in the energy contour energies and projectors
@ -631,6 +638,14 @@ class SumkDFTTools(SumkDFT):
"""
Calculates the k-resolved spectral function A(k,w) (band structure)
The output files have three columns representing the k-point index, frequency and A(k,w) (in this order).
The output files are as follows:
- Akw_(sp).dat, the total A(k,w).
- Akw_(proj_type)_(spn)_proj(i).dat, the A(k,w) projected to shell with index (i).
- Akw_(proj_type)_(spn)_proj(i)_(m)_(n).dat, as above, but for each (m) and (n) orbital contribution.
Parameters
----------
mu : double, optional
@ -665,6 +680,7 @@ class SumkDFTTools(SumkDFT):
These projected spectral functions will be determined alongside the total spectral function.
By default, no projected DOS type will be calculated (the corresponding projected arrays will be empty).
The following options are:
'None' - Only total DOS calculated
'wann' - Wannier DOS calculated from the Wannier projectors
'wien2k' - Wien2k orbital-projected DOS from the wien2k theta projectors
@ -685,11 +701,6 @@ class SumkDFTTools(SumkDFT):
resolved into orbital contributions.
This dictionary has the form of pAkw[n_shells][spn][n_k, n_om,dim,dim] where dim specifies the orbital dimension of the correlated/uncorrelated shell.
Empty if proj_type = None
The output files have three columns representing the k-point index, frequency and A(k,w) in that order. The output files are as follows:
Akw_(sp).dat : The total A(k,w).
Akw_(proj_type)_(spn)_proj(i).dat: The A(k,w) projected to shell with index (i).
Akw_(proj_type)_(spn)_proj(i)_(m)_(n).dat`: As above, but for each (m) and (n) orbital contribution.
"""
# initialisation