Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
TMDC_Monolayer_Spectrum.m
Go to the documentation of this file.
1 % Spectral density function in superconductor-graphene-superconductor junctions.
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 Examples
18 %> @{
19 %> @file TMDC_Monolayer_Spectrum.m
20 %> @brief Example to calculate the spectra of spinless monolayer \f$ M_oS_2 \f$ TMDC with nearest neighbor (EQuUs) and second nearest neighbor (<a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a>) model.
21 %> @param filenum The identification number of the filenema for the exported data (default is 1).
22 %> @Available
23 %> EQuUs v5.0 or later
24 %> @expectedresult
25 %> @image html TMDC_Monolayer_Spectrum.jpg
26 %> @image latex TMDC_Monolayer_Spectrum.jpg
27 %> @}
28 %
29 %> @brief Example to calculate the spectra of spinless monolayer \f$ M_oS_2 \f$ TMDC with nearest neighbor (EQuUs) and second nearest neighbor (<a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a>) model.
30 %> Test example for class TMDC_Monolayer_Lead_Hamiltonians.
31 %> @param filenum The identification number of the filenema for the exported data (default is 1).
32 %%
34 
35 if ~exist('filenum', 'var')
36  filenum = 1;
37 end
38 
39 filename = mfilename('fullpath');
40 [directory, fncname] = fileparts( filename );
41 
42  % filename containing the output XML
43  outfilename = [fncname, '_',num2str( filenum )];
44  % the output folder
45  outputdir = [];
46 
47  % setting the output directory
48  setOutputDir()
49 
50  % Parsing the input file and creating data structures
51  [Opt, param] = parseInput( 'TMDC_Input.xml');
52 
53  % create an instance of class CreateLeadHamiltonians to create Hamiltonians
54  HLead=CreateLeadHamiltonians(Opt, param, 'Hanyadik_Lead', 1);
55  HLead.CreateHamiltonians();
56 
57  % getting lattice vectors of the triangle lattice
58  cCoordinates = HLead.Read('coordinates');
59  a1 = cCoordinates.a*cCoordinates.LatticeConstant;
60  a2 = cCoordinates.b*cCoordinates.LatticeConstant;
61 
62  % nearest neighbour hopping vectors according to Table III in PRB 92 205108
63  delta1 = a1;
64  delta2 = a1 + a2;
65  delta3 = a2;
66 
67  delta4 = -(2*a1+a2)/3;
68  delta5 = (a1+2*a2)/3;
69  delta6 = (a1-a2)/3;
70 
71  delta7 = -2*(a1+2*a2)/3;
72  delta8 = 2*(2*a1+a2)/3;
73  delta9 = 2*(a2-a1)/3;
74 
75  % reciprocal lattice vectors
76  b1 = 2*pi/cCoordinates.LatticeConstant * [1; 1/sqrt(3)];
77  b2 = 2*pi/cCoordinates.LatticeConstant * [0; 2/sqrt(3)];
78 
79  % special points in the BZ
80  GammaPoint = [0;0];
81  Kpoint_p = (2*b1-b2)/3;
82  Kpoint_m = -(2*b1-b2)/3;
83  Mpoint = b1/2;
84 
85 
86  % creating vectors alon the Brillouine zone
87  k_points_num = 100;
88  k_section = zeros(2, 3*k_points_num);
89  % Gamma -> M
90  k_section(1, 1:k_points_num) = GammaPoint(1):(Mpoint(1)-GammaPoint(1))/(k_points_num-1):Mpoint(1);
91  k_section(2, 1:k_points_num) = GammaPoint(2):(Mpoint(2)-GammaPoint(2))/(k_points_num-1):Mpoint(2);
92 
93  % M -> K
94  k_section(1, k_points_num+1:2*k_points_num) = Mpoint(1):(Kpoint_p(1)-Mpoint(1))/(k_points_num-1):Kpoint_p(1);
95  k_section(2, k_points_num+1:2*k_points_num) = Mpoint(2):(Kpoint_p(2)-Mpoint(2))/(k_points_num-1):Kpoint_p(2);
96 
97  % K -> Gamma
98  k_section(1, 2*k_points_num+1:end) = Kpoint_p(1):(GammaPoint(1)-Kpoint_p(1))/(k_points_num-1):GammaPoint(1);
99  k_section(2, 2*k_points_num+1:end) = zeros(1,k_points_num);
100 
101  % the length of the trajectory along the k_section
102  k_length = zeros(1, 3*k_points_num);
103  difference1 = norm([k_section(1, 2)-k_section(1, 1); k_section(2, 2)-k_section(2, 1)]);
104  difference2 = norm([k_section(1, k_points_num+2)-k_section(1, k_points_num+1); k_section(2, k_points_num+2)-k_section(2, k_points_num+1)]);
105  difference3 = norm([k_section(1, 2*k_points_num+2)-k_section(1, 2*k_points_num+1); k_section(2, 2*k_points_num+2)-k_section(2, 2*k_points_num+1)]);
106  k_length(1:k_points_num) = (0:k_points_num-1)*difference1;
107  k_length(k_points_num+1:2*k_points_num) = (0:k_points_num-1)*difference2 + k_points_num*difference1;
108  k_length(2*k_points_num+1:3*k_points_num) = (0:k_points_num-1)*difference3 + k_points_num*(difference1+difference2);
109 
110  % delete duplicated points
111  k_section(:,k_points_num) = [];
112  k_section(:,2*k_points_num) = [];
113  k_length(k_points_num) = [];
114  k_length(2*k_points_num) = [];
115 
116  % calculate the spectra of monolayer TMDC (nearest and second neasrest neighbor models)
117  [SpectralData1, SpectralData2] = SpectrumCalc();
118 
119  % plot the calculated data
120  PlotFunction( )
121 
122  % exporting the calculated data
123  save( fullfile(outputdir,[outfilename, '.mat']) );
124 
125 
127 %> @brief Calculates the spectrum on a triangle lattice from Fourier-transformed Hamiltonian
128 %> @param kvector a two-component column vector of the momentum vector in the BZ.
129 %> @return Returns with the calculated energy eigenvalue at a specific point determined by kvector.
130  function ret = CalcHamiltonian_k( kvector )
131  orbitals_num = 11;
132 
133  ret = zeros( orbitals_num );
134 
135  % obtaining derived hopping parameters t_2__i_i
136  t_2__hoppings = param.scatter.Calc_t_2__i_i();
137 
138  % ******* EQ (4) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
139  for idx = 1:orbitals_num
140 
141  parameter_extension = ['__', num2str(idx), '_', num2str(idx)];
142  epsilon = param.scatter.(['epsilon', num2str(idx)]);
143  t_1 = param.scatter.(['t_1', parameter_extension]);
144  t_2 = t_2__hoppings.(['t_2', parameter_extension]);
145  ret( idx, idx) = ret( idx, idx) + epsilon + 2*t_1*cos(kvector'*delta1) + 2*t_2*(cos(kvector'*delta2) + cos(kvector'*delta3));
146 
147  end
148 
149 
150  % ******* EQ (5) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
151  % obtaining derived hopping parameters t_2__i_j
152  t_2__hoppings = param.scatter.Calc_t_2__i_j();
153 
154  % obtaining derived hopping parameters t_3__i_j
155  t_3__hoppings = param.scatter.Calc_t_3__i_j();
156 
157  % M_2 symmetry (+)
158  orbital_indexes1 = [3, 6, 9];
159  orbital_indexes2 = [5, 8, 11];
160  for idx = 1:length( orbital_indexes1 )
161  orbital_index1 = orbital_indexes1(idx);
162  orbital_index2 = orbital_indexes2(idx);
163 
164  t_1 = param.scatter.(['t_1__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
165  t_2 = t_2__hoppings.(['t_2__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
166  t_3 = t_3__hoppings.(['t_3__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
167  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) + 2*t_1*cos(kvector'*delta1) + ...
168  t_2*( exp(-1i*kvector'*delta2) + exp(-1i*kvector'*delta3) ) +...
169  t_3*( exp(1i*kvector'*delta2) + exp(1i*kvector'*delta3) );
170 
171  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + 2*t_1*cos(kvector'*delta1) + ...
172  t_2*( exp(1i*kvector'*delta2) + exp(1i*kvector'*delta3) ) +...
173  t_3*( exp(-1i*kvector'*delta2) + exp(-1i*kvector'*delta3) );
174 
175  end
176 
177 
178 
179  % ******* EQ (6) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
180  % obtaining derived hopping parameters t_2__i_j
181  t_2__hoppings = param.scatter.Calc_t_2__i_j();
182 
183  % obtaining derived hopping parameters t_3__i_j
184  t_3__hoppings = param.scatter.Calc_t_3__i_j();
185 
186  % M_2 symmetry (-)
187  orbital_indexes1 = [1, 3, 4, 6, 7, 9, 10];
188  orbital_indexes2 = [2, 4, 5, 7, 8, 10, 11];
189  for idx = 1:length( orbital_indexes1 )
190  orbital_index1 = orbital_indexes1(idx);
191  orbital_index2 = orbital_indexes2(idx);
192 
193  t_1 = param.scatter.(['t_1__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
194  t_2 = t_2__hoppings.(['t_2__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
195  t_3 = t_3__hoppings.(['t_3__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
196  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) - 2*1i*t_1*sin(kvector'*delta1) + ...
197  t_2*( exp(-1i*kvector'*delta2) - exp(-1i*kvector'*delta3) ) +...
198  t_3*( -exp(1i*kvector'*delta2) + exp(1i*kvector'*delta3) );
199 
200  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + 2*1i*t_1*sin(kvector'*delta1) + ...
201  t_2*( exp(1i*kvector'*delta2) - exp(1i*kvector'*delta3) ) +...
202  t_3*( -exp(-1i*kvector'*delta2) + exp(-1i*kvector'*delta3) );
203 
204  end
205 
206 
207  % ******* EQ (7) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
208  % obtaining derived hopping parameters t_4__i_j
209  t_4__hoppings = param.scatter.Calc_t_4__i_j();
210 
211 
212  % M_2 symmetry (+)
213  orbital_indexes1 = [3, 5, 4, 10, 9, 11, 10];
214  orbital_indexes2 = [1, 1, 2, 6, 7, 7, 8];
215  for idx = 1:length( orbital_indexes1 )
216  orbital_index1 = orbital_indexes1(idx);
217  orbital_index2 = orbital_indexes2(idx);
218 
219  t_4 = t_4__hoppings.(['t_4__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
220  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) + t_4*( exp(1i*kvector'*delta4) - exp(1i*kvector'*delta6) );
221  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + t_4*( exp(-1i*kvector'*delta4) - exp(-1i*kvector'*delta6) );
222 
223  end
224 
225 
226  % ******* EQ (8) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
227 
228  % M_2 symmetry (-)
229  orbital_indexes1 = [4, 3, 5, 9, 11, 10, 9, 11];
230  orbital_indexes2 = [1, 2, 2, 6, 6, 7, 8, 8];
231  for idx = 1:length( orbital_indexes1 )
232  orbital_index1 = orbital_indexes1(idx);
233  orbital_index2 = orbital_indexes2(idx);
234 
235  t_4 = t_4__hoppings.(['t_4__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
236  t_5 = param.scatter.(['t_5__', num2str(orbital_index1), '_', num2str(orbital_index2)]);
237  ret(orbital_index1, orbital_index2) = ret(orbital_index1, orbital_index2) + t_4*( exp(1i*kvector'*delta4) + exp(1i*kvector'*delta6) ) + ...
238  t_5*exp(1i*kvector'*delta5);
239  ret(orbital_index2, orbital_index1) = ret(orbital_index2, orbital_index1) + t_4*( exp(-1i*kvector'*delta4) + exp(-1i*kvector'*delta6) ) + ...
240  t_5*exp(-1i*kvector'*delta5);
241 
242  end
243 
244  % ******* EQ (10) in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a> *********
245  ret(9,6) = ret(9,6) + param.scatter.('t_6__9_6')*(exp(1i*kvector'*delta7) + exp(1i*kvector'*delta8) + exp(1i*kvector'*delta9));
246  ret(6,9) = ret(6,9) + param.scatter.('t_6__9_6')*(exp(-1i*kvector'*delta7) + exp(-1i*kvector'*delta8) + exp(-1i*kvector'*delta9));
247 
248  ret(11,6) = ret(11,6) + param.scatter.('t_6__11_6')*(exp(1i*kvector'*delta7) - 1/2*exp(1i*kvector'*delta8) - 1/2*exp(1i*kvector'*delta9));
249  ret(6,11) = ret(6,11) + param.scatter.('t_6__11_6')*(exp(-1i*kvector'*delta7) - 1/2*exp(-1i*kvector'*delta8) - 1/2*exp(-1i*kvector'*delta9));
250 
251  ret(10,6) = ret(10,6) + param.scatter.('t_6__11_6')*sqrt(3)/2*(-exp(1i*kvector'*delta8) + exp(1i*kvector'*delta9));
252  ret(6,10) = ret(6,10) + param.scatter.('t_6__11_6')*sqrt(3)/2*(-exp(-1i*kvector'*delta8) + exp(-1i*kvector'*delta9));
253 
254  ret(9,8) = ret(9,8) + param.scatter.('t_6__9_8')*(exp(1i*kvector'*delta7) - 1/2*exp(1i*kvector'*delta8) - 1/2*exp(1i*kvector'*delta9));
255  ret(8,9) = ret(8,9) + param.scatter.('t_6__9_8')*(exp(-1i*kvector'*delta7) - 1/2*exp(-1i*kvector'*delta8) - 1/2*exp(-1i*kvector'*delta9));
256 
257  ret(9,7) = ret(9,7) + param.scatter.('t_6__9_8')*sqrt(3)/2*(-exp(1i*kvector'*delta8) + exp(1i*kvector'*delta9));
258  ret(7,9) = ret(7,9) + param.scatter.('t_6__9_8')*sqrt(3)/2*(-exp(-1i*kvector'*delta8) + exp(-1i*kvector'*delta9));
259 
260  ret(10,7) = ret(10,7) + param.scatter.('t_6__11_8')*3/4*(exp(1i*kvector'*delta8) + exp(1i*kvector'*delta9));
261  ret(7,10) = ret(7,10) + param.scatter.('t_6__11_8')*3/4*(exp(-1i*kvector'*delta8) + exp(-1i*kvector'*delta9));
262 
263  ret(11,7) = ret(11,7) + param.scatter.('t_6__11_8')*sqrt(3)/4*(exp(1i*kvector'*delta8) - exp(1i*kvector'*delta9));
264  ret(7,11) = ret(7,11) + param.scatter.('t_6__11_8')*sqrt(3)/4*(exp(-1i*kvector'*delta8) - exp(-1i*kvector'*delta9));
265 
266  ret(10,8) = ret(10,8) + param.scatter.('t_6__11_8')*sqrt(3)/4*(exp(1i*kvector'*delta8) - exp(1i*kvector'*delta9));
267  ret(8,10) = ret(8,10) + param.scatter.('t_6__11_8')*sqrt(3)/4*(exp(-1i*kvector'*delta8) - exp(-1i*kvector'*delta9));
268 
269  ret(11,8) = ret(11,8) + param.scatter.('t_6__11_8')*(exp(1i*kvector'*delta7) + 1/4*exp(1i*kvector'*delta8) + 1/4*exp(1i*kvector'*delta9));
270  ret(8,11) = ret(8,11) + param.scatter.('t_6__11_8')*(exp(-1i*kvector'*delta7) + 1/4*exp(-1i*kvector'*delta8) + 1/4*exp(-1i*kvector'*delta9));
271 
272  end
273 
274 
275 %% SpectrumCalc
276 %> @brief Calculates the spectrum on a triangle lattice from Fourier-transformed Hamiltonian
277 %> @return [1] The calculated nearest neighbor spectrum.
278 %> @return [2] The calculated second nearest neighbor spectrum.
279  function [SpectralData1, SpectralData2] = SpectrumCalc()
280 
281  % preallocating data arrays
282  SpectralData1 = zeros( 11, size(k_section,2));
283  SpectralData2 = zeros( 11, size(k_section,2));
284 
285  for idx = 1:size(k_section,2)
286 
287  % calculate the spectrum by the nearest neighbor model of EQuUs
288  Hamiltonian = full(HLead.MomentumDependentHamiltonian( k_section(:,idx)'*a1, k_section(:,idx)'*a2));
289  Eigenvalues = sort(real(eig(Hamiltonian)));
290  SpectralData1(:, idx) = Eigenvalues;
291 
292  % calculate the spectrum by the second nearest neighbor model in <a href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.92.205108">PRB 92 205108</a>
293  Hamiltonian = CalcHamiltonian_k( k_section(:,idx) );
294  Eigenvalues = sort(real(eig(Hamiltonian)));
295  SpectralData2(:, idx) = Eigenvalues;
296  end
297 
298 
299 
300  end
301 
302 %% setOutputDir
303 %> @brief sets the output directory
305  resultsdir = 'results';
306  mkdir(resultsdir );
307  outputdir = resultsdir;
308  end
309 
310 
311  %% PlotFunction
312 %> @brief Creates the plot
314 
315  % creating figure in units of pixels
316  figure1 = figure( 'Units', 'Pixels');
317 
318  % font size on the figure will be 16 points
319  fontsize = 16;
320 
321 
322 
323  axes_spectra = axes('Parent',figure1, ...
324  'Visible', 'on',...
325  'FontSize', fontsize,...
326  'Box', 'on',...
327  'XTick', [], ...
328  'Units', 'Pixels', ...
329  'FontName','Times New Roman');
330  hold on;
331 
332  % plot the data (nearest neighbor model)
333  for idx = 1:size(SpectralData1,1)
334  EQuUs_plot = plot(k_length, SpectralData1(idx,:), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_spectra);
335  end
336 
337  % plot the data (second nearest neighbor model)
338  for idx = 1:size(SpectralData2,1)
339  PRB_plot = plot(k_length, SpectralData2(idx,:), 'Linewidth', 1, 'color', [1 0 0], 'Parent', axes_spectra);
340  end
341 
342 
343  % labeling special points in the BZ
344  y_lim = get(axes_spectra, 'YLim');
345  plot( k_length(k_points_num)*ones(1,2), y_lim, 'Linewidth', 1, 'color', [0 0 0], 'Parent', axes_spectra )
346  plot( k_length(2*k_points_num-1)*ones(1,2), y_lim, 'Linewidth', 1, 'color', [0 0 0], 'Parent', axes_spectra )
347 
348  % latex interpreter is used only if display is detected
349  if usejava('jvm') && feature('ShowFigureWindows')
350  text(0, -7, '$$\Gamma$$', 'FontSize', fontsize, 'FontName','Times New Roman', 'Parent', axes_spectra, 'Interpreter', 'latex');
351  text(k_length(k_points_num), -7, '$$M$$', 'FontSize', fontsize, 'FontName','Times New Roman', 'Parent', axes_spectra, 'Interpreter', 'latex');
352  text(k_length(2*k_points_num-1), -7, '$$K$$', 'FontSize', fontsize, 'FontName','Times New Roman', 'Parent', axes_spectra, 'Interpreter', 'latex');
353  text(k_length(3*k_points_num-10), -7, '$$\Gamma$$', 'FontSize', fontsize, 'FontName','Times New Roman', 'Parent', axes_spectra, 'Interpreter', 'latex');
354  end
355 
356 
357 
358  % Create xlabel
359  xlabel('k','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_spectra);
360 
361  % Create ylabel
362  ylabel('Energy [eV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_spectra);
363 
364  % set the legends
365  fig_legend = legend( [EQuUs_plot, PRB_plot], {'EQuUs (nearest neighbor model)', 'PRB 92 205108 (second nearest neighbor model)'});%, 'FontSize', fontsize, 'FontName','Times New Roman')
366  set(fig_legend, 'FontSize', fontsize*0.8, 'FontName','Times New Roman', 'Box', 'off', 'Location', 'NorthEast')
367 
368 
369  % set the paper position in releases greater than 2016
370  ver = version('-release');
371  if str2num(ver(1:4)) >= 2016
372  % setting the position and margins of the plot, removing white spaces
373  figure1.PaperPositionMode = 'auto';
374  fig_pos = figure1.PaperPosition;
375  figure1.PaperSize = [fig_pos(3) fig_pos(4)];
376  end
377 
378  set(axes_spectra, 'Position', get(axes_spectra, 'OuterPosition') - get(axes_spectra, 'TightInset') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1]);
379  Position_figure = get(axes_spectra, 'OuterPosition');
380  set(figure1, 'Position', Position_figure);
381 
382 
383  % export the figures
384  print('-depsc2', fullfile(outputdir,[outfilename, '.eps']))
385  print('-dpdf', fullfile(outputdir,[outfilename, '.pdf']))
386  close(figure1)
387 
388 
389  end
390 
391 end
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
function setOutputDir()
sets the output directory
Class to create and store Hamiltonian of the translational invariant leads.
function CalcHamiltonian_k(kvector)
Calculates the spectrum on a triangle lattice from Fourier-transformed Hamiltonian.
function Hamiltonians(varargin)
Function to create the custom Hamiltonians for the 1D chain.
function()
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...
function SpectrumCalc()
Calculates the spectrum on a triangle lattice from Fourier-transformed Hamiltonian.
function PlotFunction()
Creates the plot.
function parseInput(filename)
This function parses the input file containing the input parameters.
function TMDC_Monolayer_Spectrum(filenum)
Example to calculate the spectra of spinless monolayer TMDC with nearest neighbor (EQuUs) and second...
function structures(name)
A class to create and store Hamiltonian of the scattering region.