2 % Copyright (C) 2009-2017 Peter Rakyta, Ph.D.
4 % This program is free software: you can redistribute it and/or modify
5 % it under the terms of the GNU General Public License as published by
6 % the Free Software Foundation, either version 3 of the License, or
7 % (at your option) any later version.
9 % This program is distributed in the hope that it will be useful,
10 % but WITHOUT ANY WARRANTY; without even the implied warranty of
11 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 % GNU General Public License
for more details.
14 % You should have received a copy of the GNU General Public License
15 % along with
this program. If not, see http:
17 %> @addtogroup utilities Utilities
20 %> @brief This
class is a base
class containing common properties and methods utilized in several other classes.
22 %> @brief This
class is a base class containing common properties and methods utilized in several other classes.
24 %> EQuUs v4.9 or later
28 properties ( Access =
public )
29 %> An instance of
class #
NTerminal (or its subclass) representing the junction
33 %>logical value. Set
true (
default)
for solve the Dyson equation with the
self energies, or
false otherwise.
35 %>Function
handle pot = f(#coordinates)
for the additional potential to be applied in the scattering region
37 %>logical value. Set
true for calculate the Greens
function of the scattering region from Hamiltonian, or
false (
default) otherwise.
38 gfininvfromHamiltonian
39 %> cell array of optional parameters. (For details see #
InputParsing)
44 methods (Access=
public)
46 %% Contructor of the
class 47 %> @brief Constructor of the
class.
49 %> @
param varargin Cell array of optional parameters. For details see #InputParsing.
50 %> @
return An instance of the
class 57 obj.useSelfEnergy = [];
58 obj.scatterPotential = [];
59 obj.gfininvfromHamiltonian = [];
61 obj.varargin = varargin;
65 if strcmpi(
class(obj),
'UtilsBase')
66 obj.InputParsing( varargin{:} );
75 %> @brief Sets the energy
for the calculations
76 %> @
param newE The value of the energy in the same units as the Hamiltonian.
77 %> @
param varargin Cell array of optional parameters (https:
78 %> @
param 'junction' An instance of
class #
NTerminal (or its derived
class) representing the junction.
79 function SetEnergy( obj, newE, varargin )
81 p.addParameter(
'junction', obj.junction);
84 junction_loc = p.Results.junction;
93 methods (Access=
protected)
96 %> @brief Parses the optional parameters
for the
class constructor.
97 %> @
param varargin Cell array of optional parameters (https:
98 %> @
param 'T' The temperature in Kelvin (scalar or an array)
99 %> @
param 'mu' The Chemical potential in the same unit as other energy scales in the
Hamiltonians.
100 %> @
param 'scatterPotential' A
function handle pot=f( #coordinates ) or pot=f( #
CreateHamiltonians, Energy)
for the potential to be applied in the Hamiltonian (used when FiniteGreensFunctionFromHamiltonian=
true).
101 %> @
param '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).
102 %> @
param 'useSelfEnergy' Logical value. Set
true to use the
self energies of the leads in the Dyson equation, or false (
default) to use the surface Green
function instead.
103 %> @
param 'junction' An instance of
class #
NTerminal (or its derived
class) representing the junction.
104 function InputParsing( obj, varargin )
107 p.addParameter(
'T', obj.T);
108 p.addParameter(
'mu', 0, @isscalar);
109 p.addParameter(
'scatterPotential', []);
110 p.addParameter(
'gfininvfromHamiltonian',
false);
111 p.addParameter(
'useSelfEnergy',
true);
112 p.addParameter(
'junction', []);
114 p.parse(varargin{:});
116 InputParsing@
FermiDirac( obj,
'T', p.Results.T, ...
119 obj.scatterPotential = p.Results.scatterPotential;
120 obj.junction = p.Results.junction;
121 obj.gfininvfromHamiltonian = p.Results.gfininvfromHamiltonian;
122 obj.useSelfEnergy = p.Results.useSelfEnergy;
125 if ~strcmpi(
class(obj.junction),
'NTerminal' )
126 supClasses = superclasses(obj.junction);
127 if sum( strcmp( supClasses, '
NTerminal' ) ) == 0
128 error(['EQuUs:Utils:', class(obj), ':InputParsing'], 'Element junction is not valid.');
136 end % protected methods
A class describing an N-terminal geometry for equilibrium calculations mostly in the zero temperature...
A class describing the Fermi Dirac distribution of fermionic particles.
function setEnergy(Energy)
Create an instance of class CreateHamiltonians to create the Hamiltonian of the scattering region.
A class containing methodes for displaying several standard messages.
Structure Opt contains the basic computational parameters used in EQuUs.
function Transport(Energy, B)
Calculates the conductance at a given energy value.
function Hamiltonians(varargin)
Function to create the custom Hamiltonians for the 1D chain.
A class containing common basic functionalities.
Structure param contains data structures describing the physical parameters of the scattering center ...
Structure BandWidth describes the bandwidth in the lead and in the scattering center.
This class is a base class containing common properties and methods utilized in several other classes...
function InputParsing(varargin)
Parses the optional parameters for the class constructor.
A class to create and store Hamiltonian of the scattering region.