2 % Copyright (C) 2018 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 unit_tests Unit Tests
22 %> EQuUs v4.9.136 or later
28 filename = mfilename('fullpath');
29 [directory, fncname] = fileparts( filename );
32 disp( '*****
test of Rashba-type SOC for zigzag edged ribbon *****' );
37 % setting the
width of the lead 1
40 % setting the Rashba-type SOC
43 % The theoretical distance of the pockets from the central Dirac point
46 % A vector pointing into the K point
47 Kpoint = [0; 2*pi/3/sqrt(3)];
49 k_pocket_1 = [0; kSO] + Kpoint;
50 k_pocket_2 = [sin(pi/3); -cos(pi/3)]*kSO + Kpoint;
51 k_pocket_3 = [-sin(pi/3); -cos(pi/3)]*kSO + Kpoint;
56 HLead_1.CreateHamiltonians();
58 % getting lattice vectors of the triangle lattice
59 cCoordinates = HLead_1.Read(
'coordinates');
60 a1 = cCoordinates.a*cCoordinates.LatticeConstant;
61 a2 = cCoordinates.b*cCoordinates.LatticeConstant;
63 % The spectrum should be zero at the pocket points
64 H_EQuUs = HLead_1.MomentumDependentHamiltonian( k_pocket_1
'*a1, k_pocket_1'*a2);
65 eigvals = eig(full(H_EQuUs));
67 checkpoint = min(abs(eigvals));
69 warning([
'EQuUs:Tests:', fncname,
':checkpoint failed with error ', num2str( checkpoint)]);
73 H_EQuUs = HLead_1.MomentumDependentHamiltonian( k_pocket_2
'*a1, k_pocket_2'*a2);
74 eigvals = eig(full(H_EQuUs));
76 checkpoint = min(abs(eigvals));
78 warning([
'EQuUs:Tests:', fncname,
':checkpoint failed with error ', num2str( checkpoint)]);
82 H_EQuUs = HLead_1.MomentumDependentHamiltonian( k_pocket_3
'*a1, k_pocket_3'*a2);
83 eigvals = eig(full(H_EQuUs));
85 checkpoint = min(abs(eigvals));
87 warning([
'EQuUs:Tests:', fncname,
':checkpoint failed with error ', num2str( checkpoint)]);
90 % Calculate the spectrum
for q through the first pocket
92 % HLead_1.CreateHamiltonians(); 93 % HLead_1.CalcSpektrum('ka_min
', k_pocket_1'*a1 - 1.5*kSO*sqrt(3),
'ka_max', k_pocket_1
'*a1 + 0.5*kSO*sqrt(3), 'db
', 2, 'ToPlot
', 1); 96 % Calculate the spectrum for q through the second pocket 97 % HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',1, 'q', k_pocket_2'*a2);
98 % HLead_1.CreateHamiltonians();
99 % HLead_1.CalcSpektrum(
'ka_min', k_pocket_2
'*a1 - 0.5*kSO*sqrt(3), 'ka_max
', k_pocket_2'*a1 + 1.5*kSO*sqrt(3),
'db', 2,
'ToPlot', 1);
101 % Calculate the spectrum
for q through the third pocket
103 % HLead_1.CreateHamiltonians(); 104 % HLead_1.CalcSpektrum('ka_min
', k_pocket_3'*a1 - 0.5*kSO*sqrt(3),
'ka_max', k_pocket_3
'*a1 + 1.5*kSO*sqrt(3), 'db
', 2, 'ToPlot
', 1); 107 %% test of the class Graphene_SOC_Lead_Hamiltonians to create Hamiltonians of ribbon with armchair edges 108 disp( '*****
test of Rashba-type SOC
for armchair edged ribbon *****
' ); 110 % create input structures 111 [Opt, param] = parseInput( 'Basic_Input_Graphene_SOC_Lattice.xml
'); 113 % changing the edge of the first lead to armchair type. 114 param.Leads{1}.End_Type = 'Z
'; 116 % setting the width of the lead 1 117 param.Leads{1}.M = 1; 119 % setting the Rashba-type SOC 120 param.Leads{1}.Rashba = 0.01; 122 % The theoretical distance of the pockets from the central Dirac point 123 kSO = 2*param.Leads{1}.Rashba^2/param.Leads{1}.vargamma^2; 125 % A vector pointing into the K point 126 Kpoint = [2*pi/3/sqrt(3); 0]; 128 k_pocket_1 = [kSO; 0] + Kpoint; 129 k_pocket_2 = [-cos(pi/3); -sin(pi/3)]*kSO + Kpoint; 130 k_pocket_3 = [-cos(pi/3); sin(pi/3)]*kSO + Kpoint; 132 % create an instance of class CreateLeadHamiltonians to create Hamiltonians 134 HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',1, 'q', q); 135 HLead_1.CreateHamiltonians(); 137 % getting lattice vectors of the triangle lattice 139 a1 = cCoordinates.a*cCoordinates.LatticeConstant; 140 a2 = cCoordinates.b*cCoordinates.LatticeConstant; 143 % The spectrum should be zero at the pocket points 144 H_EQuUs = HLead_1.MomentumDependentHamiltonian( k_pocket_1'*a1, k_pocket_1
'*a2); 145 eigvals = eig(full(H_EQuUs)); 147 checkpoint = min(abs(eigvals)); 148 if checkpoint > 1e-10 149 warning(['EQuUs:Tests:
', fncname, ':checkpoint failed with error
', num2str( checkpoint)]); 153 H_EQuUs = HLead_1.MomentumDependentHamiltonian( k_pocket_2'*a1, k_pocket_2
'*a2); 154 eigvals = eig(full(H_EQuUs)); 156 checkpoint = min(abs(eigvals)); 157 if checkpoint > 1e-10 158 warning(['EQuUs:Tests:
', fncname, ':checkpoint failed with error
', num2str( checkpoint)]); 162 H_EQuUs = HLead_1.MomentumDependentHamiltonian( k_pocket_3'*a1, k_pocket_3
'*a2); 163 eigvals = eig(full(H_EQuUs)); 165 checkpoint = min(abs(eigvals)); 166 if checkpoint > 1e-10 167 warning(['EQuUs:Tests:
', fncname, ':checkpoint failed with error
', num2str( checkpoint)]); 173 % Calculate the spectrum for q through the K point 174 % HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',1, 'q', Kpoint'*a2);
175 % HLead_1.CreateHamiltonians();
176 % HLead_1.CalcSpektrum(
'ka_min', k_pocket_1
'*a1 - 1e-6, 'ka_max
', k_pocket_1'*a1 + 1e-6,
'db', 2,
'ToPlot', 1);
178 % Calculate the spectrum
for q through the first pocket
180 % HLead_1.CreateHamiltonians(); 181 % HLead_1.CalcSpektrum('ka_min
', k_pocket_1'*a1 - 1.5*kSO*sqrt(3),
'ka_max', k_pocket_1
'*a1 + 1.5*kSO*sqrt(3), 'db
', 2, 'ToPlot
', 1); 184 % Calculate the spectrum for q through the second and the third pocket 185 % HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',1, 'q', k_pocket_2'*a2);
186 % HLead_1.CreateHamiltonians();
187 % HLead_1.CalcSpektrum(
'ka_min', k_pocket_2
'*a1 - 4.5*kSO*sqrt(3), 'ka_max
', k_pocket_2'*a1 + 4.5*kSO*sqrt(3),
'db', 2,
'ToPlot', 1);
194 % create input structures 195 [Opt, param] = parseInput( 'Basic_Input_Graphene_SOC_Lattice.xml
'); 197 % changing the edge of the first lead to armchair type. 198 param.Leads{1}.End_Type = 'A
'; 200 % setting the width of the lead 1 201 param.Leads{1}.M = 2; 203 % setting the Rashba-type SOC 204 param.Leads{1}.Intrinsic = 0.01; 205 % setting the Rashba-type SOC 206 param.Leads{1}.Rashba = 0.0; 208 % A vector pointing into the K point 209 Kpoint = [0; 2*pi/3/sqrt(3)]; 211 % create an instance of class CreateLeadHamiltonians to create Hamiltonians 213 HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', q); 214 HLead_1.CreateHamiltonians(); 216 % getting lattice vectors of the triangle lattice 217 cCoordinates = HLead_1.Read('coordinates
'); 218 a1 = cCoordinates.a*cCoordinates.LatticeConstant; 219 a2 = cCoordinates.b*cCoordinates.LatticeConstant; 221 % The spectrum should be zero at the pocket points 222 H_EQuUs = HLead_1.MomentumDependentHamiltonian( Kpoint'*a1, Kpoint
'*a2); 223 eigvals = eig(full(H_EQuUs)); 225 checkpoint = min(abs(eigvals) - 3*sqrt(3)*param.Leads{1}.Intrinsic); 226 if checkpoint > 1e-10 227 warning(['EQuUs:Tests:
', fncname, ':checkpoint failed with error
', num2str( checkpoint)]); 232 % Calculate the spectrum for q through the K point 233 % param.Leads{1}.M = 2; 234 % HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', 0); 235 % HLead_1.CreateHamiltonians(); 236 % HLead_1.CalcSpektrum('ka_min
', 1.8, 'ka_max
', 2.6, 'db
', 20, 'ToPlot
', 1); 241 %% test of the class Graphene_SOC_Lead_Hamiltonians to create Hamiltonians of ribbon with zigzag edges 244 % create input structures 245 [Opt, param] = parseInput( 'Basic_Input_Graphene_SOC_Lattice.xml
'); 247 % changing the edge of the first lead to armchair type. 248 param.Leads{1}.End_Type = 'A
'; 250 % setting the width of the lead 1 251 param.Leads{1}.M = 2; 253 % setting the Rashba-type SOC 254 param.Leads{1}.ValleyZeeman = 0.01; 255 % setting the Rashba-type SOC 256 param.Leads{1}.Rashba = 0.0; 258 % A vector pointing into the K point 259 Kpoint = [0; 2*pi/3/sqrt(3)]; 261 % create an instance of class CreateLeadHamiltonians to create Hamiltonians 263 HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', q); 264 HLead_1.CreateHamiltonians(); 266 % getting lattice vectors of the triangle lattice 267 cCoordinates = HLead_1.Read('coordinates
'); 268 a1 = cCoordinates.a*cCoordinates.LatticeConstant; 269 a2 = cCoordinates.b*cCoordinates.LatticeConstant; 271 % The spectrum should be zero at the pocket points 272 H_EQuUs = HLead_1.MomentumDependentHamiltonian( Kpoint'*a1, Kpoint
'*a2); 273 eigvals = eig(full(H_EQuUs)); 275 checkpoint = min(abs(eigvals) - 3*sqrt(3)*param.Leads{1}.ValleyZeeman); 276 if checkpoint > 1e-10 277 warning(['EQuUs:Tests:
', fncname, ':checkpoint failed with error
', num2str( checkpoint)]); 282 % Calculate the spectrum for q through the K point 283 % param.Leads{1}.M = 2; 284 % HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', 0); 285 % HLead_1.CreateHamiltonians(); 286 % HLead_1.CalcSpektrum('ka_min
', 1.8, 'ka_max
', 2.6, 'db
', 20, 'ToPlot
', 1); 288 %HLead_1.CalcSpektrum('db
', 20, 'ToPlot
', 1); 292 %% test of the class Graphene_SOC_Lead_Hamiltonians to create Hamiltonians of ribbon with armchair edges 295 % create input structures 296 [Opt, param] = parseInput( 'Basic_Input_Graphene_SOC_Lattice.xml
'); 298 % changing the edge of the first lead to armchair type. 299 param.Leads{1}.End_Type = 'Z
'; 301 % setting the width of the lead 1 302 param.Leads{1}.M = 1; 304 % setting the Rashba-type SOC 305 param.Leads{1}.Intrinsic = 0.01; 306 % setting the Rashba-type SOC 307 param.Leads{1}.Rashba = 0.0; 309 % A vector pointing into the K point 310 Kpoint = [2*pi/3/sqrt(3); 0]; 312 % create an instance of class CreateLeadHamiltonians to create Hamiltonians 314 HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', q); 315 HLead_1.CreateHamiltonians(); 317 % getting lattice vectors of the triangle lattice 318 cCoordinates = HLead_1.Read('coordinates
'); 319 a1 = cCoordinates.a*cCoordinates.LatticeConstant; 320 a2 = cCoordinates.b*cCoordinates.LatticeConstant; 322 % The spectrum should be zero at the pocket points 323 H_EQuUs = HLead_1.MomentumDependentHamiltonian( Kpoint'*a1, Kpoint
'*a2); 324 eigvals = eig(full(H_EQuUs)); 326 checkpoint = min(abs(eigvals) - 3*sqrt(3)*param.Leads{1}.Intrinsic); 327 if checkpoint > 1e-10 328 warning(['EQuUs:Tests:
', fncname, ':checkpoint failed with error
', num2str( checkpoint)]); 333 % Calculate the spectrum for q through the K point 334 % param.Leads{1}.M = 1; 335 % HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', Kpoint'*a2);
336 % HLead_1.CreateHamiltonians();
337 % HLead_1.CalcSpektrum(
'ka_min', -0.3,
'ka_max', 0.3,
'db', 4,
'ToPlot', 1);
344 % create input structures 345 [Opt, param] = parseInput( 'Basic_Input_Graphene_SOC_Lattice.xml
'); 347 % changing the edge of the first lead to armchair type. 348 param.Leads{1}.End_Type = 'Z
'; 350 % setting the width of the lead 1 351 param.Leads{1}.M = 1; 353 % setting the Rashba-type SOC 354 param.Leads{1}.ValleyZeeman = 0.01; 355 % setting the Rashba-type SOC 356 param.Leads{1}.Rashba = 0.0; 359 % A vector pointing into the K point 360 Kpoint = [2*pi/3/sqrt(3); 0]; 362 % create an instance of class CreateLeadHamiltonians to create Hamiltonians 364 HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', q); 365 HLead_1.CreateHamiltonians(); 367 % getting lattice vectors of the triangle lattice 368 cCoordinates = HLead_1.Read('coordinates
'); 369 a1 = cCoordinates.a*cCoordinates.LatticeConstant; 370 a2 = cCoordinates.b*cCoordinates.LatticeConstant; 372 % The spectrum should be zero at the pocket points 373 H_EQuUs = HLead_1.MomentumDependentHamiltonian( Kpoint'*a1, Kpoint
'*a2); 374 eigvals = eig(full(H_EQuUs)); 376 checkpoint = min(abs(eigvals) - 3*sqrt(3)*param.Leads{1}.ValleyZeeman); 377 if checkpoint > 1e-10 378 warning(['EQuUs:Tests:
', fncname, ':checkpoint failed with error
', num2str( checkpoint)]); 383 % Calculate the spectrum for q through the K point 384 % param.Leads{1}.M = 1; 385 % HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead
',1, 'q
', Kpoint'*a2);
386 % HLead_1.CreateHamiltonians();
387 % HLead_1.CalcSpektrum(
'ka_min', -0.3,
'ka_max', 0.3,
'db', 4,
'ToPlot', 1);
function test(arg1, arg2)
Brief description of the function.
lead_param Leads
A list of structures lead_param containing the physical parameters for the scattering region.
Property q
The tranverse momentum for transverse computations.
Property width
The number of sites in the cross section.
Property Hanyadik_Lead
The id number of the current lead.
Structure Opt contains the basic computational parameters used in EQuUs.
Class to create and store Hamiltonian of the translational invariant leads.
function test_TMDC_Monolayer()
Testfile to check the lattice construction of monolayer TMDC by classes TMDC_Monolayer_Lead_Hamiltoni...
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 test_Graphene_SOC()
Testfile to check the lattice construction of monolayer TMDC by classes TMDC_Monolayer_Lead_Hamiltoni...
Class to create the Hamiltonian of one unit cell in a translational invariant lead made of TMDC_Monol...
function CreateLeadHamiltonians(Opt, param, varargin)
Constructor of the class.
Structure param contains data structures describing the physical parameters of the scattering center ...
Class to create the Hamiltonian of one unit cell in a translational invariant lead made of TMDC_Monol...
A class to create the Hamiltonian of one unit cell in a translational invariant graphene lead,...
function structures(name)
Property coordinates
An instance of the structure coordinates.