1 % Spectral density
function in superconductor-graphene-superconductor junctions.
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 Examples
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).
23 %> EQuUs v5.0 or later
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:
31 %> @
param filenum The identification number of the filenema for the exported data (default is 1).
35 if ~exist('filenum', 'var')
39 filename = mfilename('fullpath');
40 [directory, fncname] = fileparts( filename );
42 % filename containing the output XML
43 outfilename = [fncname, '_',num2str( filenum )];
47 % setting the output directory
50 % Parsing the input file and creating data
structures 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;
62 % nearest neighbour hopping vectors according to Table III in PRB 92 205108
67 delta4 = -(2*a1+a2)/3;
71 delta7 = -2*(a1+2*a2)/3;
72 delta8 = 2*(2*a1+a2)/3;
75 % reciprocal lattice vectors
76 b1 = 2*pi/cCoordinates.LatticeConstant * [1; 1/sqrt(3)];
77 b2 = 2*pi/cCoordinates.LatticeConstant * [0; 2/sqrt(3)];
79 % special points in the BZ
81 Kpoint_p = (2*b1-b2)/3;
82 Kpoint_m = -(2*b1-b2)/3;
86 % creating vectors alon the Brillouine zone
88 k_section = zeros(2, 3*k_points_num);
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);
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);
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);
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);
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) = [];
116 % calculate the spectra of monolayer TMDC (nearest and second neasrest neighbor models)
119 % plot the calculated data
122 % exporting the calculated data
123 save( fullfile(outputdir,[outfilename, '.mat']) );
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.
133 ret = zeros( orbitals_num );
135 % obtaining derived hopping parameters t_2__i_i
136 t_2__hoppings =
param.scatter.Calc_t_2__i_i();
138 % ******* EQ (4) in <a href="https:
139 for idx = 1:orbitals_num
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));
150 % ******* EQ (5) in <a href="https:
151 % obtaining derived hopping parameters t_2__i_j
152 t_2__hoppings =
param.scatter.Calc_t_2__i_j();
154 % obtaining derived hopping parameters t_3__i_j
155 t_3__hoppings =
param.scatter.Calc_t_3__i_j();
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);
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) );
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) );
179 % ******* EQ (6) in <a href="https:
180 % obtaining derived hopping parameters t_2__i_j
181 t_2__hoppings =
param.scatter.Calc_t_2__i_j();
183 % obtaining derived hopping parameters t_3__i_j
184 t_3__hoppings =
param.scatter.Calc_t_3__i_j();
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);
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) );
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) );
207 % ******* EQ (7) in <a href="https:
208 % obtaining derived hopping parameters t_4__i_j
209 t_4__hoppings =
param.scatter.Calc_t_4__i_j();
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);
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) );
226 % ******* EQ (8) in <a href="https:
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);
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);
244 % ******* EQ (10) in <a href="https:
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));
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));
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));
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));
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));
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));
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));
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));
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));
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.
281 % preallocating data arrays
282 SpectralData1 = zeros( 11, size(k_section,2));
283 SpectralData2 = zeros( 11, size(k_section,2));
285 for idx = 1:size(k_section,2)
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;
292 % calculate the spectrum by the second nearest neighbor model in <a href="https:
294 Eigenvalues = sort(real(eig(Hamiltonian)));
295 SpectralData2(:, idx) = Eigenvalues;
303 %> @brief sets the output directory
305 resultsdir = 'results';
307 outputdir = resultsdir;
312 %> @brief Creates the plot
315 % creating figure in units of pixels
316 figure1 = figure( 'Units', 'Pixels');
318 % font size on the figure will be 16 points
323 axes_spectra = axes('Parent',figure1, ...
325 'FontSize', fontsize,...
328 'Units', 'Pixels', ...
329 'FontName','Times New Roman');
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);
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);
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 )
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');
359 xlabel('k','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_spectra);
362 ylabel('Energy [eV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_spectra);
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')
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)];
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);
384 print('-depsc2', fullfile(outputdir,[outfilename, '.eps']))
385 print('-dpdf', fullfile(outputdir,[outfilename, '.pdf']))
Structure Opt contains the basic computational parameters used in EQuUs.
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.
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...
function SpectrumCalc()
Calculates the spectrum on a triangle lattice from Fourier-transformed Hamiltonian.
function PlotFunction()
Creates the plot.
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.