2 % Copyright (C) 2009-2016 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 basic Basic Functionalities
20 %> @brief A
class to calculate the Green functions and
self energies of a translational invariant lead
22 %> @brief A
class to calculate the Green functions and self energies of a translational invariant lead
23 %> The notations and the structure of the Hamiltonian is defined accroding to the following image:
24 %> @image html Lead_Hamiltonian.jpg
25 %> @image latex Lead_Hamiltonian.jpg
27 %> EQuUs v4.8 or later
32 properties ( Access =
protected )
33 %>
function handle to calculate the
self energy
35 %>Function
handle to calculate the retarded infinite Greens
function.
37 %>The normalization matrix in the Greens
function.
39 %>The inverse of the normalization matrix.
41 %>The matrix of the surface Greens
function of the semi-infinite ribbon.
43 %>The inverse of the retarded surface Greens
function.
45 %>The matrix of the retarded Greens
function of the infinite ribbon.
47 %>The matrix of the retarded surface Greens
function of a finite ribbon.
49 %>The inverse of the retarded surface Greens
function of a finite ribbon.
51 %>The retarded
self-energy of the semi-infinite ribbon.
59 methods ( Access =
public )
61 %> @brief Constructor of the
class.
65 %> @
return An instance of the
class 71 %> @brief Calculates the Green
function of the infinite lead
for eregy #E between slabs z1 and z2. The calculated Greens
function is stored by attribute #ginf.
72 %> @
param z1 The index of the first slab.
73 %> @
param z2 The index of the second slab.
74 %> @
param varargin Optional parameters (https:
75 %> @
param 'z1points' Array of
sites in the slab z1 to include in the calculations. By
default each site in the given slab is included.
76 %> @
param 'z2points' Array of
sites in the slab z2 to include in the calculations. By
default each site in the given slab is included.
77 %> @
return Return with the Green
function of the infinite lead between the given slabs.
78 function ret = InfGreenFunction(obj, z1,z2, varargin)
83 p.addParameter(
'z1points', 1:size(obj.modusmtx_p,1));
84 p.addParameter(
'z2points', 1:size(obj.modusmtx_p,2));
86 p.addParameter(
'z1points', 1:size(obj.modusmtx_m,1));
87 p.addParameter(
'z2points', 1:size(obj.modusmtx_m,2));
91 z1points = p.Results.z1points;
92 z2points = p.Results.z2points;
94 obj.ginf = obj.GinfCalc(z1, z2, z1points, z2points);
103 methods ( Access =
protected )
104 %% GinfCalcWithDualModes
105 %> @brief Calculates the Green
function of the infinite ribbon with dual modes. The calculated Greens
function is stored by attribute #ginf.
106 %> @
param z1 The index of the first slab.
107 %> @
param z2 The index of the second slab.
108 %> @
param z1points Site indexes in the slab at z1.
109 %> @
param z2points Site indexes in the slab at z2.
110 %> @
return Return with the Greens
function of the infinite lead between the given slabs.
111 function ginf = GinfCalcWithDualModes(obj, z1, z2, z1points, z2points)
112 obj.NormamtxSzamolo();
116 ginf = obj.modusmtx_p(z1points,:)*diag(obj.expk_p.^(obj.Lead_Orientation*(z1-z2)))*obj.d_modusmtx_p;
119 % xi_m = modusmtx_m(z1points,idx);
120 % d_xi_m = d_modusmtx_m(idx,:);
121 % ginf = ginf + xi_m*d_xi_m*exp(1i*k_m(idx)*Lead_Orientation*(z1-z2));
123 ginf = obj.modusmtx_m(z1points,:)*diag(obj.expk_m.^(obj.Lead_Orientation*(z1-z2)))*obj.d_modusmtx_m;
126 ginf = ginf*obj.invNormamtx(:,z2points);
128 %--------------------------------------------------------------------------
130 %% GinfCalcWithLeftModes
131 %> @brief Calculates the Green
function of the infinite ribbon with with the left-sided modes. The calculated Greens
function is stored by attribute #ginf.
132 %> @
param z1 The index of the first slab.
133 %> @
param z2 The index of the second slab.
134 %> @
param z1points Site indexes in the slab at z1.
135 %> @
param z2points Site indexes in the slab at z2.
136 %> @
return Return with the Greens
function of the infinite lead between the given slabs.
137 function ginf = GinfCalcWithLeftModes(obj, z1, z2, z1points, z2points)
140 ginf = obj.modusmtx_p(z1points,:)*diag(obj.expk_p.^(obj.Lead_Orientation*(z1-z2))./(1i*obj.vcsop_p*obj.Lead_Orientation))*obj.modusmtx_p_left(:,z2points);
142 ginf = obj.modusmtx_m(z1points,:)*diag(obj.expk_m.^(obj.Lead_Orientation*(z1-z2))./(-1i*obj.vcsop_m*obj.Lead_Orientation))*obj.modusmtx_m_left(:,z2points);
146 %--------------------------------------------------------------------------
151 methods ( Access =
public )
154 %> @brief Calculates the effective coupling of the lead to the scattering region according to Eq (3) in Eur. Phys. J. B 53, 537-549 (2006)
155 %> @return Return with the matrix of the effective coupling.
157 if isempty( obj.Sigma )
161 ret = 1i*( obj.Sigma - (obj.Sigma)' );
166 %> @brief Calculates the retarded self energy of the semi-infinite lead according to Eq (36) of Ref PRB 78, 035407 (2008). The calculated self energy is stored by attribure
#Sigma. 167 %> @
return Returns with the calculated
self energy.
168 function ret = SelfEnergy( obj )
171 obj.Sigma = obj.SelfEnergyCalc();
180 methods ( Access =
protected )
182 %% SelfEnergyCalcWithDualModes
183 %> @brief Calculates the
self energy with dual modes according to Eqs (17) and (36) in PRB 78 035407
184 %> @return Return with the self energy.
185 function Sigma = SelfEnergyCalcWithDualModes( obj )
186 %>Eq (17) and (36) in PRB 78 035407
187 %>g00 = inv(Normamtx)
188 obj.NormamtxSzamolo();
189 [~, K1_eff, K1adj_eff] = obj.Get_Effective_Hamiltonians();
190 Sigma = obj.modusmtx_m*diag(obj.expk_m.^(-obj.Lead_Orientation))*obj.d_modusmtx_m;
191 if obj.Lead_Orientation == 1
192 Sigma = K1adj_eff*Sigma;
194 Sigma = K1_eff*Sigma;
197 %--------------------------------------------------------------------------
199 %% SelfEnergyCalcWithLeftModes
200 %> @brief Calculates the self energy with the left-sided modes according to Eqs (20), (17) and (36) in PRB 78 035407
201 %> @return Return with the self energy.
202 function Sigma = SelfEnergyCalcWithLeftModes( obj )
203 %>Eq (20), (17) and (36) in PRB 78 035407
204 %>g00 = inv(Normamtx)
205 obj.NormamtxSzamolo();
206 [~, K1_eff, K1adj_eff] = obj.Get_Effective_Hamiltonians();
207 Sigma = obj.modusmtx_m*diag(obj.expk_m.^(-obj.Lead_Orientation)./(-1i*obj.vcsop_m*obj.Lead_Orientation))*obj.modusmtx_m_left;
208 if obj.Lead_Orientation == 1
209 Sigma = K1adj_eff*Sigma*obj.Normamtx;
211 Sigma = K1_eff*Sigma*obj.Normamtx;
214 %--------------------------------------------------------------------------
218 methods ( Access = public )
220 %% FiniteGreenFunction
221 %> @brief Calculates the Green
function of a finite piece of the lead for eregy
#E between slabs z1 and z2. The calculated Greens function is stored by attribute #gfin. 222 %> @
param z1 The index of the first slab.
223 %> @
param z2 The index of the second slab.
224 %> @
param varargin Optional parameters (https:
225 %> @
param 'onlygfininv' If
true, only the inverse of the Green
function is calculated. (Default value is
false)
226 %> @
return Return with the Green
function of the infinite lead between the given slabs.
227 function ret = FiniteGreenFunction(obj, z1,z2, varargin)
230 p.addParameter(
'onlygfininv',
false );
232 p.parse(varargin{:});
233 onlygfininv = p.Results.onlygfininv;
236 obj.NormamtxSzamolo();
238 Neff = obj.Get_Neff();
239 obj.gfin = zeros(4*Neff,4*Neff);
242 points = 1:size(obj.modusmtx_p,1);
243 dpoints = 1:size(obj.modusmtx_p,1);
245 points = 1:size(obj.modusmtx_m,1);
246 dpoints = 1:size(obj.modusmtx_m,1);
249 gtmp = obj.GinfCalc(z1-1, z1-1, points, dpoints);
250 obj.gfin(1:Neff,1:Neff) = gtmp;
251 obj.gfin(1+Neff:2*Neff, 1+Neff:2*Neff) = gtmp;
252 obj.gfin(1+2*Neff:3*Neff, 1+2*Neff:3*Neff) = gtmp;
253 obj.gfin(1+3*Neff:4*Neff, 1+3*Neff:4*Neff) = gtmp;
255 gtmp = obj.GinfCalc(z1-1, z1, points, dpoints);
256 obj.gfin(1:Neff,1+Neff:2*Neff) = gtmp;
257 obj.gfin(1+2*Neff:3*Neff,1+3*Neff:4*Neff) = gtmp;
259 gtmp = obj.GinfCalc(z1, z1-1, points, dpoints);
260 obj.gfin(1+Neff:2*Neff,1:Neff) = gtmp;
261 obj.gfin(1+3*Neff:4*Neff, 1+2*Neff:3*Neff) = gtmp;
263 gtmp = obj.GinfCalc(z1-1, z2, points, dpoints);
264 obj.gfin(1:Neff,1+2*Neff:3*Neff) = gtmp;
266 gtmp = obj.GinfCalc(z2, z1-1, points, dpoints);
267 obj.gfin(1+2*Neff:3*Neff,1:Neff) = gtmp;
269 gtmp = obj.GinfCalc(z1-1, z2+1, points, dpoints);
270 obj.gfin(1:Neff,1+3*Neff:4*Neff) = gtmp;
272 gtmp = obj.GinfCalc(z2+1, z1-1, points, dpoints);
273 obj.gfin(1+3*Neff:4*Neff,1:Neff) = gtmp;
275 gtmp = obj.GinfCalc(z1, z2, points, dpoints);
276 obj.gfin(1+Neff:2*Neff,1+2*Neff:3*Neff) = gtmp;
278 gtmp = obj.GinfCalc(z2, z1, points, dpoints);
279 obj.gfin(1+2*Neff:3*Neff,1+Neff:2*Neff) = gtmp;
281 gtmp = obj.GinfCalc(z1, z2+1, points, dpoints);
282 obj.gfin(1+Neff:2*Neff,1+3*Neff:4*Neff) = gtmp;
284 gtmp = obj.GinfCalc(z2+1, z1, points, dpoints);
285 obj.gfin(1+3*Neff:4*Neff,1+Neff:2*Neff) = gtmp;
287 rcond_gfin = rcond(obj.gfin);
288 if isnan(rcond_gfin) || abs( rcond_gfin ) < 1e-15
289 obj.display(
'EQuUs:Lead:FiniteGreenFunction: Regularizing gfin by SVD',1);
290 obj.gfininv = obj.inv_SVD( obj.gfin );
292 obj.gfininv = inv(obj.gfin);
294 obj.gfininv = obj.gfininv( 1+Neff:3*Neff, 1+Neff:3*Neff );
299 rcond_gfinin = rcond(obj.gfininv);
300 if isnan(rcond_gfinin ) || abs( rcond_gfinin ) < 1e-15
301 obj.display(
'EQuUs:Lead:FiniteGreenFunction: Regularizing gfininv by SVD',1);
302 obj.gfin = obj.inv_SVD( obj.gfininv );
304 obj.gfin = inv(obj.gfininv);
312 %% SurfaceGreenFunction
313 %> @brief Calculates the surface Green
function of a semi-infinite lead
for eregy #E. The calculated Green
function is stored in attribute #gsurf.
314 %> @
param varargin Optional parameters (https:
315 %> @
param 'OnlyInverse' If
true (
default), only the inverse of the Green
function is calculated.
316 %> @
param 'CalcInverse' If true (
default), the inverse of the Green
function is also calculated.
317 function SurfaceGreenFunction( obj, varargin )
320 p.addParameter(
'OnlyInverse',
true );
321 p.addParameter(
'CalcInverse',
true );
322 p.parse(varargin{:});
323 OnlyInverse = p.Results.OnlyInverse;
324 CalcInverse = p.Results.CalcInverse;
327 obj.NormamtxSzamolo();
328 if obj.Opt.usingDualModes
329 obj.GsurfSzamoloWithDualModes();
331 obj.GsurfSzamoloWithLeftModes();
338 rcond_gsurf = rcond(obj.gsurf);
339 if isnan(rcond_gsurf) || abs( rcond_gsurf ) < 1e-15
340 obj.display( [
'EQuUs:',
class(obj),
':SurfaceGreenFunction: Regularizing gsurf by SVD'],1);
341 obj.gsurfinv = obj.inv_SVD( obj.gsurf );
343 obj.gsurfinv = inv(obj.gsurf);
354 methods ( Access =
protected )
356 %> @brief Calculates the surface Green
function with dual modes. The calculated Green
function is stored by attribute #gsurf.
357 function GsurfSzamoloWithDualModes( obj )
359 %
test for the
self energy
361 % [K0_eff] = obj.Get_Effective_Hamiltonians();
362 % gsurf2 = -inv(K0_eff + obj.Sigma);
365 gsurf_m = obj.modusmtx_m*diag(obj.expk_m.^(-obj.Lead_Orientation))*obj.d_modusmtx_m;
366 gsurf_p = obj.modusmtx_p*diag(obj.expk_p.^(obj.Lead_Orientation))*obj.d_modusmtx_p;
369 %gsurf = (eye(M) - gsurf_p*gsurf_m)*inv(Normamtx);
370 obj.gsurf = (eye(obj.Get_Neff()) - gsurf_m*gsurf_p)*obj.invNormamtx;
373 %--------------------------------------------------------------------------
376 %> @brief Calculates the surface Green
function with the left-sided modes according to Eq (33) in PRB 78, 035407 (2008). The calculated Green
function is stored by attribute
#gsurf. 377 function GsurfSzamoloWithLeftModes( obj )
378 Neff = obj.Get_Neff();
382 %>right SGF Eq (33) in PRB 78, 035407 (2008)
383 %>g00 = inv(Normamtx)
384 % g01 = GinfCalc(0, 1, points, dpoints);
385 % g10 = GinfCalc(1, 0, points, dpoints);
386 % gsurfR = invNormamtx - g10*Normamtx*g01;
388 %>left SGF Eq (33) in PRB 78, 035407 (2008)
389 %>g00 = inv(Normamtx)
390 g0m1 = obj.GinfCalc(0, -1, points, dpoints);
391 gm10 = obj.GinfCalc(-1, 0, points, dpoints);
392 obj.gsurf = obj.invNormamtx - gm10*obj.Normamtx*g0m1;
396 %--------------------------------------------------------------------------
400 methods ( Access = public )
403 %> @brief The normalization matrix to calculate the Green
function. The calculated normalization matrix is stored by attribute
#Normamtx. 404 function NormamtxSzamolo( obj )
406 if ~isempty(obj.Normamtx) && ~isempty(obj.invNormamtx)
408 elseif obj.
Opt.usingDualModes
409 obj.NormamtxSzamoloWithDualModes();
411 obj.NormamtxSzamoloWithLeftModes();
418 methods ( Access = protected )
419 %% NormamtxSzamoloWithDualModes
420 %> @brief Calculates the normalization matrix to calculate the Green
function using the dual modes. The calculated normalization matrix is stored by attribute
#Normamtx. 421 function NormamtxSzamoloWithDualModes(obj)
428 obj.Normamtx = (obj.modusmtx_p*diag(obj.expk_p.^(-1))*obj.d_modusmtx_p - ...
429 obj.modusmtx_m*diag(obj.expk_m.^(-1))*obj.d_modusmtx_m)*obj.Lead_Orientation;
431 [~, ~, K1adj_eff] = obj.Get_Effective_Hamiltonians();
432 obj.Normamtx = K1adj_eff*obj.Normamtx;
435 rcond_Normamtx = rcond(obj.Normamtx);
436 if isnan(rcond_Normamtx) || abs( rcond_Normamtx ) < 1e-15
437 obj.display(
'EQuUs:Lead:NormamtxSzamoloWithDualModes: Regularizing Normamtx by SVD',1);
438 obj.invNormamtx = obj.inv_SVD( obj.Normamtx );
440 obj.invNormamtx = obj.Normamtx\(eye(size(obj.Normamtx)));%inv(Normamtx);
443 err = MException(
'EQuUs:Lead:NormamtxSzamoloWithDualModes',
'The inversion of the Normamtx failed');
444 err = addCause(err, errCause);
445 save(
'Error_Lead_NormamtxSzamoloWithDualModes.mat');
449 %---------------------------------------------------------------
450 %% NormamtxSzamoloWithLeftModes
451 %> @brief Calculates the normalization matrix to calculate the Green
function using the left-sided modes. The calculated normalization matrix is stored by attribute #Normamtx.
452 function NormamtxSzamoloWithLeftModes(obj)
454 obj.invNormamtx = obj.InfGreenFunction(0,0);
455 rcond_invNormamtx = rcond(obj.invNormamtx);
456 if isnan(rcond_invNormamtx) || abs( rcond_invNormamtx ) < 1e-15
457 obj.display(
'EQuUs:Lead:NormamtxSzamoloWithLeftModes: Regularizing invNormamtx by SVD',1);
458 obj.Normamtx = obj.inv_SVD( obj.invNormamtx );
460 obj.Normamtx = obj.invNormamtx\(eye(size(obj.invNormamtx)));
467 %> @brief Calculates the dual modes. The dual modes is stored by attributes #d_modusmtx_m and #d_modusmtx_p.
468 function calcDualModes( obj )
469 if isempty(obj.d_modusmtx_m)
470 obj.display('EQuUs:
Lead:calcDualModes: Calculating dual modes for m')
471 if obj.
Opt.usingDualModes
472 obj.d_modusmtx_m = obj.CalcDualModesEigenvec( obj.modusmtx_m ); %a dualis modusok
474 obj.d_modusmtx_m = obj.CalcDualModesEigenvecWithLeftModes( obj.modusmtx_m_left, -obj.vcsop_m*obj.Lead_Orientation ); %a dualis modusok
478 if isempty(obj.d_modusmtx_p)
479 obj.display('EQuUs:
Lead:calcDualModes: Calculating dual modes for p')
480 if obj.
Opt.usingDualModes
481 obj.d_modusmtx_p = obj.CalcDualModesEigenvec( obj.modusmtx_p ); %a dualis modusok
483 obj.d_modusmtx_p = obj.CalcDualModesEigenvecWithLeftModes( obj.modusmtx_p_left, obj.vcsop_p*obj.Lead_Orientation ); %a dualis modusok
487 % obj.display('modusmtx inverse',1);
488 % obj.display(num2str(norm( obj.d_modusmtx_m*obj.modusmtx_m - eye(obj.Get_Neff()) )), 1);
489 % obj.display(num2str(norm( obj.d_modusmtx_p*obj.modusmtx_p - eye(obj.Get_Neff()) )), 1);
493 %% CalcDualModesEigenvec
494 %> @brief Calculates the dual modes by inverting the right-sided eigenvectors.
495 %> @
param modusmtx The right-sided eigenvectors.
496 %> @return Returns with the calculated dual modes.
497 function d_modes = CalcDualModesEigenvec( obj, modusmtx )
499 rcond_modusmtx = rcond(modusmtx);
500 if isnan(rcond_modusmtx ) || abs( rcond_modusmtx ) < 1e-15
501 obj.display( 'EQuUs:
Lead:CalcDualModesEigenvec: Regularizing modusmtx by SVD',1);
502 d_modes = obj.inv_SVD( modusmtx );
504 d_modes = (modusmtx)\eye(size(modusmtx)); % a dualis modusok
508 err = MException('EQuUs::
Lead::CalcDualModesEigenvec', 'The calculation of the dual wavefunctions failed.');
509 err = addCause(err, errCause);
510 save('Error_Lead_CalcDualModesEigenvec.mat');
516 %% CalcDualModesEigenvecWithLeftModes
517 %> @brief Calculates the dual modes using the left-sided eigenvectors.
518 %> @
param modusmtx_left The left-sided eigenvectors.
519 %> @
param vcsop The group velocities.
520 %> @return Returns with the calculated dual modes
521 function d_modes = CalcDualModesEigenvecWithLeftModes( obj, modusmtx_left, vcsop )
522 %>Eq (20) in PRB 78, 035407 (2008)
523 d_modes = diag(1./(1i*vcsop))*modusmtx_left*obj.Normamtx;
528 %> @brief Initializes class attributes.
533 if obj.
Opt.usingDualModes
534 obj.display( 'EQuUs:
Lead:Initialize: Using dual modes in the calculations.');
535 obj.GinfCalc = @(z1, z2, z1points, z2points)(obj.GinfCalcWithDualModes(z1, z2, z1points, z2points));
536 obj.SelfEnergyCalc = @()(obj.SelfEnergyCalcWithDualModes);
538 obj.display( 'EQuUs:
Lead:Initialize: Using left-sided modes in the calculations.');
539 obj.GinfCalc = @(z1, z2, z1points, z2points)(obj.GinfCalcWithLeftModes(z1, z2, z1points, z2points));
540 obj.SelfEnergyCalc = @()(obj.SelfEnergyCalcWithLeftModes);
546 methods ( Access = public )
548 %% TrukkosSajatertekek
549 %> @brief Calculates the wave numbers corresponding to the propagating states at given energy. The calculated wave numbers are stored in attribute
#expk. The normalization matrix is set to empty. 550 %> @
param E The energy value used in the calculations.
551 function TrukkosSajatertekek(obj, E)
554 obj.invNormamtx = [];
558 %> @brief Shifts the on-site energies in the leads by a given energy. The normalization matrix is set to empty.
559 %> @
param Energy The enrgy value.
560 function ShiftLead( obj, Energy )
566 %> @brief Adds on-site potential to the Hamiltonian H0.
567 %> @
param V The potential calculated on the
sites. The normalization matrix is set to empty.
568 function AddPotential( obj, V )
575 %> @brief Transforms the effective
Hamiltonians and the calculated surface Green
operator and selfenergy by a unitary transformation
576 %> @
param Umtx The matrix of the unitary transformation.
577 function Unitary_Transform(obj, Umtx)
580 if ~isempty(obj.gsurfinv)
581 obj.gsurfinv = Umtx*obj.gsurfinv*Umtx';
584 if ~isempty(obj.Sigma)
585 obj.Sigma = Umtx*obj.Sigma*Umtx';
588 if ~isempty(obj.Normamtx)
589 obj.Normamtx = Umtx*obj.Normamtx*Umtx';
595 %> @brief Creates a clone of the present
Lead object.
596 %> @return Returns with the cloned
object.
597 %> @
param varargin Cell array of optional parameters (https:
598 %> @
param 'empty' Set true to create an empty clone, or false (default) to clone all atributes.
599 function ret = CreateClone( obj, varargin )
602 p.addParameter('empty', false );
604 p.parse(varargin{:});
605 empty = p.Results.empty;
607 ret =
Lead(obj.Opt, obj.param,...
608 'Hanyadik_Lead', obj.Hanyadik_Lead,...
609 'Lead_Orientation', obj.Lead_Orientation, ...
616 meta_data = metaclass(obj);
618 for idx = 1:length(meta_data.PropertyList)
619 prop_name = meta_data.PropertyList(idx).Name;
620 if strcmpi( prop_name, 'SelfEnergyCalc' ) || strcmpi( prop_name, 'GinfCalc' )
622 elseif strcmpi( prop_name, 'next_SVD_cycle' )
623 if ~isempty( obj.next_SVD_cycle )
624 ret.next_SVD_cycle = obj.next_SVD_cycle.CreateClone();
627 ret.Write( prop_name, obj.(prop_name));
634 %> @brief Resets all elements in the
object.
637 if strcmpi( class(obj), '
Lead' )
638 meta_data = metaclass(obj);
640 for idx = 1:length(meta_data.PropertyList)
641 prop_name = meta_data.PropertyList(idx).Name;
642 if strcmp(prop_name, '
Opt') || strcmp( prop_name, '
param') || strcmp(prop_name, 'varargin')
645 obj.Clear( prop_name );
654 %> @brief Sets the value of an attribute in the class.
655 %> @
param MemberName The name of the attribute to be set.
656 %> @
param input The value to be set.
657 function Write(obj, MemberName, input)
659 if strcmp(MemberName, '
param') || strcmp(MemberName, 'params')
664 obj.(MemberName) = input;
666 error(['EQuUs:', class(obj), ':Read'], ['No property to write with name: ', MemberName]);
672 %> @brief Query for the value of an attribute in the class.
673 %> @
param MemberName The name of the attribute to be set.
674 %> @return Returns with the value of the attribute.
675 function ret = Read(obj, MemberName)
677 if strcmpi(MemberName, 'd_modusmtx_p')
679 ret = obj.d_modusmtx_p;
681 elseif strcmpi(MemberName, 'd_modusmtx_m')
683 ret = obj.d_modusmtx_m;
687 ret = obj.(MemberName);
689 error(['EQuUs:', class(obj), ':Read'], ['No property to read with name: ', MemberName]);
696 %> @brief Clears the value of an attribute in the class.
697 %> @
param MemberName The name of the attribute to be cleared.
700 obj.(MemberName) = [];
702 error(['EQuUs:', class(obj), ':Clear'], ['No property to clear with name: ', MemberName]);
709 %------------------------------------------------------------------
function test(arg1, arg2)
Brief description of the function.
Structure Opt contains the basic computational parameters used in EQuUs.
Class to create and store Hamiltonian of the translational invariant leads.
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.
function EigenProblemLead(Opt, param, varargin)
Constructor of the class.
A class containing common basic functionalities.
A class to calculate the Green functions and self energies of a translational invariant lead The nota...
Structure param contains data structures describing the physical parameters of the scattering center ...
Structure sites contains data to identify the individual sites in a matrix.
Class to solve the eigenproblem of a translational invariant leads and calculate the group velocities...