A class to calculate the onsite desnity useful for self-consistent calculations.
More...
|
function | Density (Opt, varargin) |
| Constructor of the class. More...
|
|
function | DensityCalc (varargin) |
| Calculates the onsite desnity using the method in Nanotechnology 25 (2014), 465201. More...
|
|
function | DensityCalcSmall (num_occupied_states) |
| determine the number of sites in the calculations to preallocate memory More...
|
|
function | diagInv (A) |
| Calculates the diagonal part of the inverse of a sparse matrix. More...
|
|
function | display (message, nosilent) |
| Displays output messages on the screen. More...
|
|
function | DOSCalc (Evec, varargin) |
| Calculates the onsite desnity of states. More...
|
|
function | eig (A, B) |
| Calculates the generalized eigenvalue problem based on the zggev and dggev LAPACK functions. More...
|
|
function | Fermi (E) |
| A function of the Fermi-Dirac statistics. More...
|
|
function | getBandWidth () |
| creating site indexes corresponding to the elements of the density vector More...
|
|
function | getOpt () |
| Retrives the structure containing the calculation parameters. More...
|
|
function | getProgramName () |
| Gets the name of the package. More...
|
|
function | getProgramShortName () |
| Gets the short name of the package. More...
|
|
function | getVersion () |
| Gets the current version of the package. More...
|
|
function | IsDeployedMKL () |
| Checks whether the MKL component is deployed. More...
|
|
function | LocalDOSCalc (Energy, varargin) |
| preallocate memory for Densitysurf More...
|
|
function | partialInv (A, sizeInv) |
| Calculates a partial inverse of a sparse matrix. More...
|
|
function | SetEnergy (newE, varargin) |
| Sets the energy for the calculations. More...
|
|
function | setTemperature (T) |
| Sets the temperature for the calculations. More...
|
|
function | xmlread (filename) |
| Function to load XML files (based on xerces libraries), providing octave compatibility. More...
|
|
function | xmlwrite (filename, DOM) |
| Function to export XML files (based on xerces libraries), providing octave compatibility. More...
|
|
A class to calculate the onsite desnity useful for self-consistent calculations.
EQuUs v4.9 or later
Definition at line 26 of file Density.m.
◆ Density()
Constructor of the class.
- Parameters
-
Opt | An instance of structure Opt. |
varargin | Cell array of optional parameters. For details see InputParsing. |
- Returns
- An instance of the class
◆ BadInputType()
static function Messages::BadInputType |
( |
variable |
, |
|
|
type |
|
|
) |
| |
|
staticinherited |
Throws a "bad input type" warning, with using the default value.
- Parameters
-
variable | A string conatining the name of the variable. |
type | A string describing the desired type. |
◆ BadInputTypeNoDefault()
static function Messages::BadInputTypeNoDefault |
( |
variable |
, |
|
|
type |
|
|
) |
| |
|
staticinherited |
Throws a "bad input type" warning without setting it to default.
- Parameters
-
variable | A string conatining the name of the variable. |
type | A string describing the desired type. |
◆ checkMEXfile()
static function CommonFunctions::checkMEXfile |
( |
fncname |
| ) |
|
|
staticinherited |
Checks the presence of a given MEX file.
- Parameters
-
fncname | The name of the function. |
- Returns
- Returns true if the MEX file is present, false otherwise.
◆ complexDensity()
function Density::complexDensity |
( |
junction_loc |
, |
|
|
JustScatter |
|
|
) |
| |
|
protected |
Calculates the density at a complex energy.
- Parameters
-
junction_loc | An instance of class NTerminal or its subclass describing the junction. |
JustScatter | Logical value. True if only an isolated scattering center should be considered in the self-consistent calculations, false otherwise. |
◆ complexSpectral()
function DOS::complexSpectral |
( |
junction_loc |
, |
|
|
JustScatter |
|
|
) |
| |
|
protectedinherited |
setting the current energy
creating the Hamiltonian of the scattering region evaluating the energy resolved density creating the data structure of the local density of states Calculates the spectral function at a complex energy
- Parameters
-
junction_loc | An instance of class NTerminal or its subclass representing the junction. |
JustScatter | logical value. True if only an isolated scattering center should be considered in the calculations, false otherwise. |
- Returns
- spectral_function The calculted spectral function and a data structure containing geometry data of the junction.
◆ create_Hamiltonians()
Creates the Hamiltonians of the system.
- Parameters
-
varargin | Cell array of optional parameters:. |
◆ create_scatter()
cerating Hamiltonian of the scattering region
creating the Lead Hamiltonians Creates the Hamiltonian of the scattering center
- Parameters
-
varargin | Cell array of optional parameters:. |
◆ DensityCalc()
Calculates the onsite desnity using the method in Nanotechnology 25 (2014), 465201.
- Parameters
-
varargin | Cell array of optional parameters: |
'Edb' | The number of the energy points over the contour integral. |
'DeltaPhi' | A parameter to control the incident angle of the integration contour near the real axis. (Default value is $$\Delta\Phi=0.5\pi$$. |
'Evec' | The complex energy points in case of custom integration path. (Overrides all other optional parameters.) |
'Emin' | The minimum of the energy array. |
'JustScatter' | Logical value. True if only an isolated scattering center should be considered in the self-consistent calculations, false otherwise. |
- Returns
- An array of the calculated density and a structure describing the geometry of the sites.
◆ DensityCalcSmall()
function Density::DensityCalcSmall |
( |
num_occupied_states |
| ) |
|
determine the number of sites in the calculations to preallocate memory
preallocate memory for Densitysurf creating function handles for parallel for setting the current energy creating the Hamiltonian of the scattering region evaluating the energy resolved density closing the parallel pool calculating the contour integrals Calculates the onsite desnity using the method in Nanotechnology 25 (2014), 465201. This method is usable for small isolated scattering centers for which an exact diagonalization can be performed
- Parameters
-
num_occupied_states | Number of occupied states |
- Returns
- An array of the calculated density and a structure describing the geometry of the sites.
◆ diagInv()
Calculates the diagonal part of the inverse of a sparse matrix.
If MKL component is advised to build.
- Parameters
-
A | A sparse matrix to be inverted |
- Returns
- Returns the diagonal elements of the inverse
◆ display()
function Messages::display |
( |
message |
, |
|
|
nosilent |
|
|
) |
| |
|
inherited |
Displays output messages on the screen.
- Parameters
-
message | String containing the message to be displayed |
nosilent | Set true to override the silent option given in Opt.Silent. |
◆ DOSCalc()
Calculates the onsite desnity of states.
- Parameters
-
Evec | One-dimensional array of the energy points. |
varargin | Cell array of optional parameters: |
'JustScatter' | Logical value. Set true to omit the contacts from the system |
◆ eig()
Calculates the generalized eigenvalue problem based on the zggev and dggev LAPACK functions.
- Parameters
-
A | A square matrix on the left side. |
B | A square matrix on the right side. |
- Returns
- Returns the calculated generalized eigenvalues and the right and left sided eigenvectors.
◆ ExceedIteration()
static function Messages::ExceedIteration |
( |
| ) |
|
|
staticinherited |
Throws an "iteration exceeded" warning.
◆ Fermi()
A function of the Fermi-Dirac statistics.
- Parameters
-
E | The energy value in eV (scalar or an array of energy values). |
- Returns
- Returns with the occupation number (numbers).
◆ getBandWidth()
creating site indexes corresponding to the elements of the density vector
Determines the band width of the leads and of the scattering region.
- Returns
- ret An instance of structure BandWidth containing the bandwidths.
◆ getOpt()
Retrives the structure containing the calculation parameters.
- Returns
- Return an instance of structure Opt.
◆ getProgramName()
function CommonFunctions::getProgramName |
( |
| ) |
|
|
inherited |
Gets the name of the package.
- Returns
- Returns the name of the package.
◆ getProgramShortName()
function CommonFunctions::getProgramShortName |
( |
| ) |
|
|
inherited |
Gets the short name of the package.
- Returns
- Returns the short name of the package.
◆ getVersion()
function CommonFunctions::getVersion |
( |
| ) |
|
|
inherited |
Gets the current version of the package.
- Returns
- Returns the current version of the package.
◆ InputParsing()
Parses the optional parameters for the class constructor.
- Parameters
-
varargin | Cell array of optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html): |
'T' | The absolute temperature in Kelvins. |
'silent' | Set true to suppress output messages. |
'scatterPotential' | A function handle y=f( #coordinates coords ) or y=f( CreateHamiltonians CreateH, E ) of the potential across the junction. |
'useSelfEnergy' | Logical value. Set true (default) to solve the Dyson equation with the self energies of the leads, or false to use the surface Green operators. |
'gfininvfromHamiltonian' | Logical value. Set true calculate the surface Greens function of the scattering region from the Hamiltonaian of the scattering region, or false (default) to calculate it by the fast way (see Phys. Rev. B 90, 125428 (2014) for details). |
'junction' | An instance of a class NTerminal or its subclass describing the junction. |
◆ inv_SVD()
static function CommonFunctions::inv_SVD |
( |
A |
| ) |
|
|
staticinherited |
Inverts badly conditioned matrix A with SVD regularization.
- Parameters
-
A | A square matrix to be inverted. |
- Returns
- Returns the calculated inverse.
◆ IsDeployedMKL()
function CommonFunctions::IsDeployedMKL |
( |
| ) |
|
|
inherited |
Checks whether the MKL component is deployed.
- Returns
- Returns with true if MKL component is deployed, false otherwise.
◆ isOctave()
static function CommonFunctions::isOctave |
( |
| ) |
|
|
staticinherited |
Checks whether the running environment is matlab or octave.
- Returns
- Returns true if running environment is octave, false otherwise.
◆ LocalDOSCalc()
preallocate memory for Densitysurf
creating function handles for parallel for setting the current energy creating the Hamiltonian of the scattering region evaluating the energy resolved density closing the parallel pool Calculates the local desnity of states for a given energy.
- Parameters
-
Energy | The energy value in the units of the Hamiltonians |
varargin | Cell array of optional parameters: |
'JustScatter' | Logical value. Set true to omit the contacts from the system |
- Returns
- Returns with the calculated local DOS. (An instance of structure LocalDOS)
◆ partialInv()
function CommonFunctions::partialInv |
( |
A |
, |
|
|
sizeInv |
|
|
) |
| |
|
inherited |
Calculates a partial inverse of a sparse matrix.
If MKL component is not developed, the backslash operator is used insted.
- Parameters
-
A | A sparse matrix to be inverted |
sizeInv | The size of partial inverse to be calculated. |
- Returns
- Returns the calculated partial inverse
◆ SetEnergy()
Sets the energy for the calculations.
- Parameters
-
◆ setTemperature()
Sets the temperature for the calculations.
- Parameters
-
T | The temperature in Kelvin (scalar or an array) |
◆ SimphsonInt()
static function CommonFunctions::SimphsonInt |
( |
y |
, |
|
|
h |
|
|
) |
| |
|
staticinherited |
Simphson integral: y is a vector of function values at equal distant points: y_i = f(x_i), x_i-x_{i-1}=h.
- Parameters
-
y | Function values to be integrated |
h | Increment between the x_i points. |
◆ xmlread()
function CommonFunctions::xmlread |
( |
filename |
| ) |
|
|
inherited |
◆ xmlwrite()
function CommonFunctions::xmlwrite |
( |
filename |
, |
|
|
DOM |
|
|
) |
| |
|
inherited |
Function to export XML files (based on xerces libraries), providing octave compatibility.
- Parameters
-
◆ BandWidth
Property UtilsBase::BandWidth |
|
inherited |
◆ beta
Property FermiDirac::beta |
|
protectedinherited |
◆ DeployedMKL
Property CommonFunctions::DeployedMKL |
|
protectedinherited |
True if MKL component is built, false otherwise.
Definition at line 32 of file CommonFunctions.m.
◆ DOSdata
Definition at line 34 of file DOS.m.
◆ DOSvec
Array of the density of states values.
Definition at line 198 of file structures.m.
◆ Evec
◆ gfininvfromHamiltonian
Property UtilsBase::gfininvfromHamiltonian |
|
inherited |
logical value. Set true for calculate the Greens function of the scattering region from Hamiltonian, or false (default) otherwise.
Definition at line 45 of file UtilsBase.m.
◆ junction
Property UtilsBase::junction |
|
inherited |
An instance of class NTerminal (or its subclass) representing the junction.
Definition at line 33 of file UtilsBase.m.
◆ k_B
Boltzmann constant in eV/K.
Definition at line 32 of file FermiDirac.m.
◆ MaxSize
Property CommonFunctions::MaxSize |
|
protectedinherited |
◆ mu
The Chemical potential in the same unit as other energy scales in the Hamiltonians.
Definition at line 44 of file FermiDirac.m.
◆ Opt
◆ ProgramName
Property CommonFunctions::ProgramName |
|
protectedinherited |
◆ ProgramShortName
Property CommonFunctions::ProgramShortName |
|
protectedinherited |
◆ scatterPotential
Property UtilsBase::scatterPotential |
|
inherited |
Function handle pot = f(#coordinates) for the additional potential to be applied in the scattering region.
Definition at line 42 of file UtilsBase.m.
The temperature in Kelvin.
Definition at line 35 of file FermiDirac.m.
◆ T_treshold
Property FermiDirac::T_treshold |
|
protectedinherited |
treshold temperature (makes difference between T=0 and T>0)
Definition at line 41 of file FermiDirac.m.
◆ useSelfEnergy
Property UtilsBase::useSelfEnergy |
|
inherited |
logical value. Set true (default) for solve the Dyson equation with the self energies, or false otherwise.
Definition at line 39 of file UtilsBase.m.
◆ varargin
Property UtilsBase::varargin |
|
inherited |
◆ version
Property CommonFunctions::version |
|
protectedinherited |
The documentation for this class was generated from the following file: