Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
test_TMDC_Monolayer.m
Go to the documentation of this file.
1 %% Eotvos Quantum Transport Utilities
2 % Copyright (C) 2018 Peter Rakyta, Ph.D
3 %
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.
8 %
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.
13 %
14 % You should have received a copy of the GNU General Public License
15 % along with this program. If not, see http://www.gnu.org/licenses/.
16 %
17 %> @addtogroup unit_tests Unit Tests
18 %> @{
19 %> @file test_TMDC_Monolayer.m
20 %> @brief Testfile to check the lattice construction of monolayer TMDC by classes TMDC_Monolayer_Lead_Hamiltonians and TMDC_Monolayer_SOC_Lead_Hamiltonians.
21 %> @Available
22 %> EQuUs v5.0 or later
23 %> @}
24 %> @brief Testfile to check the lattice construction of monolayer TMDC by classes TMDC_Monolayer_Lead_Hamiltonians and TMDC_Monolayer_SOC_Lead_Hamiltonians.
25 function test_TMDC_Monolayer()
26 
27 
28 filename = mfilename('fullpath');
29 [directory, fncname] = fileparts( filename );
30 
32  disp( '***** test of the class TMDC_Monolayer_Lead_Hamiltonians *****' );
33 
34  % create input structures
35  [Opt, param] = parseInput( 'TMDC_Input.xml');
36 
37  % setting the width of the lead 1
38  param.Leads{1}.M = 1;
39 
40  % create an instance of class CreateLeadHamiltonians to create Hamiltonians
41  HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',1);
42  HLead_1.CreateHamiltonians();
43 
44  % getting lattice vectors of the triangle lattice
45  cCoordinates = HLead_1.Read('coordinates');
46  a1 = cCoordinates.a*cCoordinates.LatticeConstant;
47  a2 = cCoordinates.b*cCoordinates.LatticeConstant;
48 
49  % nearest neighbour hopping vectors according to Table III in PRB 92 205108
50  delta1 = a1;
51  delta2 = a1 + a2;
52  delta3 = a2;
53 
54  % Calculate the energy eigenvalue at a specific K-point
55  kvector = [0.5; 0.3];
56  %using EQuUs
57  H_EQuUs = HLead_1.MomentumDependentHamiltonian( kvector'*a1, kvector'*a2);
58 
59  % using the Fourier-transformed Hamiltonian in PRB 92 205108
60  H_Fourier = CalcHamiltonian_k( kvector );
61 
62  checkpoint = norm( full(H_EQuUs) - full(H_Fourier) );
63  if checkpoint > 1e-10
64  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
65  end
66 
67 %% test of the energy eigenvalues for lead of width M>1
68  disp( '***** test of the energy eigenvalues for lead of width M>1 *****' );
69 
70  % create input structures
71  [Opt, param] = parseInput( 'TMDC_Input.xml');
72 
73  % setting the width of the first and second leads
74  param.Leads{1}.M = 1;
75  param.Leads{2}.M = 3;
76 
77  % Calculate the energy eigenvalue at a specific K-point
78  kvector = [0.5; 0.3];
79 
80 
81  % creating class CreateLeadHamiltonians
82  HLead_2 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',2);
83 
84  % creating Hamiltonians
85  HLead_2.CreateHamiltonians();
86 
87  % Creating the Hamiltonian of the M width lead.
88  Hamiltonian_M3 = HLead_2.MomentumDependentHamiltonian( kvector'*a1, kvector'*a2*param.Leads{2}.M);
89 
90  % Creating the Hamiltonian of the M=1 width lead.
91  Hamiltonian_M1 = HLead_1.MomentumDependentHamiltonian( kvector'*a1, kvector'*a2);
92 
93  % calculate the eigenvector of Hamiltonai M1
94  eigenvalues_M1 = real(eig(full(Hamiltonian_M1)));
95 
96  for jdx = 1:11
97  eigval = eigenvalues_M1(jdx);
98 
99  difference = eig(full(Hamiltonian_M3)) - ones(size(Hamiltonian_M3,1),1)*eigval;
100  difference = sort( abs(difference), 'ascend' );
101 
102  checkpoint = abs( difference(1) );
103  if checkpoint > 1e-10
104  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
105  end
106  end
107 
108 
109 
111  disp( '***** test of the class TMDC_Monolayer_SOC_Lead_Hamiltonians *****' );
112 
113  % create input structures
114  [Opt, param] = parseInput( 'TMDC_Input_SOC.xml');
115 
116  % setting the width of the lead 1
117  param.Leads{1}.M = 1;
118 
119  % create an instance of class CreateLeadHamiltonians to create Hamiltonians
120  HLead_1 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',1);
121  HLead_1.CreateHamiltonians();
122 
123  % getting lattice vectors of the triangle lattice
124  cCoordinates = HLead_1.Read('coordinates');
125  a1 = cCoordinates.a*cCoordinates.LatticeConstant;
126  a2 = cCoordinates.b*cCoordinates.LatticeConstant;
127 
128  % reciprocal lattice vectors
129  b1 = 2*pi/cCoordinates.LatticeConstant * [1; 1/sqrt(3)];
130  b2 = 2*pi/cCoordinates.LatticeConstant * [0; 2/sqrt(3)];
131 
132  % special points in the BZ
133  GammaPoint = [0;0];
134  Mpoint = b1/2;
135 
136  % Calculate the Hamiltonian at a specific K-point
137  kvector = 0.36*(Mpoint - GammaPoint);
138  %using EQuUs
139  H_EQuUs = HLead_1.MomentumDependentHamiltonian( kvector'*a1, kvector'*a2);
140 
141  % The spin splitting along the Gamma - M direction is zero.
142  EigenValues = sort(real(eig(full(H_EQuUs))));
143  DiffEigenValues = diff(EigenValues);
144  DiffEigenValues = DiffEigenValues(1:2:end);
145 
146  checkpoint = norm( DiffEigenValues );
147  if checkpoint > 1e-10
148  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
149  end
150 
151 
152 
153 %% test of the energy eigenvalues for lead of width M>1
154  disp( '***** test of the energy eigenvalues for lead of width M>1 *****' );
155 
156  % create input structures
157  [Opt, param] = parseInput( 'TMDC_Input_SOC.xml');
158 
159  % setting the width of the first and second leads
160  param.Leads{1}.M = 1;
161  param.Leads{2}.M = 3;
162 
163  % Calculate the energy eigenvalue at a specific K-point
164  kvector = [0.5; 0.3];
165 
166 
167  % creating class CreateLeadHamiltonians
168  HLead_2 = CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead',2);
169 
170  % creating Hamiltonians
171  HLead_2.CreateHamiltonians();
172 
173  % Creating the Hamiltonian of the M width lead.
174  Hamiltonian_M3 = HLead_2.MomentumDependentHamiltonian( kvector'*a1, kvector'*a2*param.Leads{2}.M);
175 
176  % Creating the Hamiltonian of the M=1 width lead.
177  Hamiltonian_M1 = HLead_1.MomentumDependentHamiltonian( kvector'*a1, kvector'*a2);
178 
179  % calculate the eigenvector of Hamiltonai M1
180  eigenvalues_M1 = real(eig(full(Hamiltonian_M1)));
181 
182  for jdx = 1:22
183  eigval = eigenvalues_M1(jdx);
184 
185  difference = eig(full(Hamiltonian_M3)) - ones(size(Hamiltonian_M3,1),1)*eigval;
186  difference = sort( abs(difference), 'ascend' );
187 
188  checkpoint = abs( difference(1) );
189  if checkpoint > 1e-10
190  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
191  end
192  end
193 
194 
195 
196 
197 
198 
199 
200 
201 %% CalcHamiltonian_k
202 %> @brief Calculates the spectrum on a triangle lattice from Fourier-transformed Hamiltonian
203 %> @param kvector a two-component column vector of the momentum vector in the BZ.
204 %> @return Returns with the calculated energy eigenvalue at a specific point determined by kvector.
205  function ret = CalcHamiltonian_k( kvector )
206  orbitals_num = 11;
207 
208  ret = zeros( orbitals_num );
209 
210  % obtaining derived hopping parameters t_2__i_i
211  t_2__hoppings = param.Leads{1}.Calc_t_2__i_i();
212 
213  % ******* EQ (4) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
214  for idx = 1:orbitals_num
215 
216  parameter_extension = ['__', num2str(idx), '_', num2str(idx)];
217  epsilon = param.Leads{1}.(['epsilon', num2str(idx)]);
218  t_1 = param.Leads{1}.(['t_1', parameter_extension]);
219  t_2 = t_2__hoppings.(['t_2', parameter_extension]);
220  ret( idx, idx) = ret( idx, idx) + epsilon + 2*t_1*cos(kvector'*delta1) + 2*t_2*(cos(kvector'*delta2) + cos(kvector'*delta3));
221 
222  end
223 
224 
225  % ******* EQ (5) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
226  % obtaining derived hopping parameters t_2__i_j
227  t_2__hoppings = param.Leads{1}.Calc_t_2__i_j();
228 
229  % obtaining derived hopping parameters t_3__i_j
230  t_3__hoppings = param.Leads{1}.Calc_t_3__i_j();
231 
232  % M_2 symmetry (+)
233  orbital_indexes1 = [3, 6, 9];
234  orbital_indexes2 = [5, 8, 11];
235  for idx = 1:length( orbital_indexes1 )
236  orbital_index1 = orbital_indexes1(idx);
237  orbital_index2 = orbital_indexes2(idx);
238 
239  t_1 = param.Leads{1}.(['t_1__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
240  t_2 = t_2__hoppings.(['t_2__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
241  t_3 = t_3__hoppings.(['t_3__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
242  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) + 2*t_1*cos(kvector'*delta1) + ...
243  t_2*( exp(-1i*kvector'*delta2) + exp(-1i*kvector'*delta3) ) +...
244  t_3*( exp(1i*kvector'*delta2) + exp(1i*kvector'*delta3) );
245 
246  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + 2*t_1*cos(kvector'*delta1) + ...
247  t_2*( exp(1i*kvector'*delta2) + exp(1i*kvector'*delta3) ) +...
248  t_3*( exp(-1i*kvector'*delta2) + exp(-1i*kvector'*delta3) );
249 
250  end
251 
252 
253 
254  % ******* EQ (6) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
255  % obtaining derived hopping parameters t_2__i_j
256  t_2__hoppings = param.Leads{1}.Calc_t_2__i_j();
257 
258  % obtaining derived hopping parameters t_3__i_j
259  t_3__hoppings = param.Leads{1}.Calc_t_3__i_j();
260 
261  % M_2 symmetry (-)
262  orbital_indexes1 = [1, 3, 4, 6, 7, 9, 10];
263  orbital_indexes2 = [2, 4, 5, 7, 8, 10, 11];
264  for idx = 1:length( orbital_indexes1 )
265  orbital_index1 = orbital_indexes1(idx);
266  orbital_index2 = orbital_indexes2(idx);
267 
268  t_1 = param.Leads{1}.(['t_1__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
269  t_2 = t_2__hoppings.(['t_2__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
270  t_3 = t_3__hoppings.(['t_3__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
271  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) - 2*1i*t_1*sin(kvector'*delta1) + ...
272  t_2*( exp(-1i*kvector'*delta2) - exp(-1i*kvector'*delta3) ) +...
273  t_3*( -exp(1i*kvector'*delta2) + exp(1i*kvector'*delta3) );
274 
275  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + 2*1i*t_1*sin(kvector'*delta1) + ...
276  t_2*( exp(1i*kvector'*delta2) - exp(1i*kvector'*delta3) ) +...
277  t_3*( -exp(-1i*kvector'*delta2) + exp(-1i*kvector'*delta3) );
278 
279  end
280 
281 
282  % ******* EQ (7) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
283  % obtaining derived hopping parameters t_4__i_j
284  t_4__hoppings = param.Leads{1}.Calc_t_4__i_j();
285 
286 
287  % M_2 symmetry (+)
288  orbital_indexes1 = [3, 5, 4, 10, 9, 11, 10];
289  orbital_indexes2 = [1, 1, 2, 6, 7, 7, 8];
290  for idx = 1:length( orbital_indexes1 )
291  orbital_index1 = orbital_indexes1(idx);
292  orbital_index2 = orbital_indexes2(idx);
293 
294  t_4 = t_4__hoppings.(['t_4__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
295 
296  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) + t_4*( 1 - exp(1i*kvector'*delta1) );
297  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + t_4*( 1 - exp(-1i*kvector'*delta1) );
298 
299  end
300 
301 
302  % ******* EQ (8) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
303 
304  % M_2 symmetry (-)
305  orbital_indexes1 = [4, 3, 5, 9, 11, 10, 9, 11];
306  orbital_indexes2 = [1, 2, 2, 6, 6, 7, 8, 8];
307  for idx = 1:length( orbital_indexes1 )
308  orbital_index1 = orbital_indexes1(idx);
309  orbital_index2 = orbital_indexes2(idx);
310 
311  t_4 = t_4__hoppings.(['t_4__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
312  t_5 = param.Leads{1}.(['t_5__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
313 
314  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) + t_4*( 1 + exp(1i*kvector'*delta1) ) + ...
315  t_5*exp(1i*kvector'*delta2);
316  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + t_4*( 1 + exp(-1i*kvector'*delta1) ) + ...
317  t_5*exp(-1i*kvector'*delta2);
318 
319  end
320 
321 
322  end
323 
324 
325 
326 end
function Read(MemberName)
Query for the value of an attribute in the interface.
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.
Definition: structures.m:49
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
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.
Property M
The number of the sites in the cross section.
function Hamiltonians(varargin)
Function to create the custom Hamiltonians for the 1D chain.
function MomentumDependentHamiltonian(k, q)
Construct a momentum dependent (Fourier-transformed) Hamiltonian.
function CreateHamiltonians(varargin)
Creates the Hamiltonians H_0 and H_1 of the lead.
Class to create the Hamiltonian of one unit cell in a translational invariant lead made of TMDC_Monol...
Property param
An instance of the structure param.
function CreateLeadHamiltonians(Opt, param, varargin)
Constructor of the class.
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
Class to create the Hamiltonian of one unit cell in a translational invariant lead made of TMDC_Monol...
Property Opt
An instance of structure Opt.
Definition: Messages.m:31
function CalcHamiltonian_k(kvector)
Calculates the spectrum on a triangle lattice from Fourier-transformed Hamiltonian.
function parseInput(filename)
This function parses the input file containing the input parameters.
function structures(name)