1 % Magnetic transport through a quantum
antidot 2 % Copyright (C) 2015 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 Calculates the conductance through a graphene
antidot in a homogeneous magnetic field.
21 %> @
param filenum The identification number of the filenema
for the exported data (
default is 1).
23 %> EQuUs v4.7 or later
29 %> @brief Calculates the conductance through a graphene
antidot in a homogeneous magnetic field.
30 %> @
param filenum The identification number of the filenema
for the exported data (
default is 1).
33 if ~exist(
'filenum',
'var')
37 filename = mfilename('fullpath');
38 [directory, fncname] = fileparts( filename );
40 % The width of the graphene strip
42 % The length of the graphene strip
44 % The center and radius of the
antidot 45 hole = struct( 'center', [width/2 height/2], 'radius', 90);
46 % Magnetic field in Tesla
48 % outfilename of the calculated data
49 outfilename = [fncname, '_',num2str( filenum )];
50 % the output directory
55 % setting the output directory
59 transport_calculations_finished = false;
62 % creating the scattering disorders in the lattice
63 points = round([27 195 27 195]);
64 scatterers.zpoints = round(points + rand(size(points))*5);
65 scatterers.z = round( ones(size(points))*height + [-30 -30 30 30] + rand(size(points))*5);
70 % the calculated spectrum of the lead
71 spectrum = []; % calculated spectrum of the
74 % The wave function of a localized
antidot state
76 % An instance of structure coordinates storing the coordinates of the
antidot 78 % edge siteindexes of the
antidot 79 antidot_edge_points = [];
81 antidot_eigenenergies = [];
83 % creating an array of energies (in eV) to be used in the transport calculations
87 Evec = Emin:(Emax-Emin)/Enum:Emax;
88 Enum = length(Evec)-1;
90 % An array storing the calculated conductances calculated conductance
91 Conductance = zeros(Enum+1,1);
92 % An array storing the error of the unitarity
93 DeltaC = zeros(Enum+1,1);
96 % setting the output directory
98 % calculate the conductances
101 % plot the calculated data
104 % exporting the calculated data
105 save( [outputdir, filesep, [outfilename, '.mat']] );
107 %% CalculateTransport
108 %> @brief Calculates the conductance
109 function CalculateTransport()
111 % creating an instance of
antidot class
112 cAntidot =
antidot('width', width, 'height', height, 'B', B, '
hole', hole, '
scatterers', scatterers );
113 % creates vector potential handles predefinied in class
antidot (This method is obsolete, functions describing the vector potential should be placed inside the present file)
119 disp(' ----------------------------------')
120 disp('Plotting geometry and spectrum of leads:')
121 coordinates = cAntidot.coordinates;
123 % calculate spectrum of the lead
124 cAntidot.setEnergy( Evec(1) )
125 cAntidot.CreateRibbon( 'justHamiltonians', true );
127 cAntidot.getHolePoints();
128 antidot_edge_points = cAntidot.antidot_edge_points;
134 disp(' ----------------------------------')
135 disp('Calculating Conductance for the given magnetic field')
138 % calculating the conductances as a function of the energy
139 for idx = 1:length(Evec)
141 [C, ~,DeltaC_tmp] = cAntidot.
Transport( Evec(idx) );
144 Conductance(idx) = C;
145 DeltaC(idx) = DeltaC_tmp;
147 % exporting the calculated data
148 save( [outputdir, filesep, [outfilename, '.mat']] );
150 % displaying the status of the caclutaions
151 disp([ num2str(idx/length(Evec)*100),' % calculated of the conductance.'])
154 % plot the results at every energy point
160 transport_calculations_finished = true;
168 %> @brief calculates the spectrum of the leads
171 % Calculate the cyclotron frequency
172 rCC = cAntidot.rCC*1e-10; %Angstrom
173 phi0 = cAntidot.h/cAntidot.qe; % magnetic flux quantum
174 eta_B = 2*pi/phi0*(rCC)^2*cAntidot.B;
175 homega = 2.97*sqrt(9/2*eta_B);
177 %Minimal and maximal value of the selected k points
180 % number of 1D k points
182 spectrum = cAntidot.Scatter_UC.CalcSpektrum( 'toPlot', 0, 'ka_min', kmin, 'ka_max', kmax, 'ka_num', knum );
188 %> @brief Hamiltonian for the secular equation
191 H = H0 + H1*exp(1i*k) + H1'*exp(-1i*k);
197 %> @brief sets output directory
199 resultsdir = 'results';
201 outputdir = [ resultsdir ];
207 %> @brief Creates the plot
208 function PlotFunction( )
210 % creating figure in units of pixels
211 if ~transport_calculations_finished
212 figure1 = figure( 'Units', 'Pixels' );
214 figure1 = figure( 'Units', 'Pixels','Renderer','painters',...
215 'Colormap',[1 1 0.994791686534882;0.954365074634552 0.954365074634552 0.932043671607971;0.908730149269104 0.908730149269104 0.869295656681061;0.863095223903656 0.863095223903656 0.80654764175415;0.817460358142853 0.817460358142853 0.74379962682724;0.771825432777405 0.771825432777405 0.68105161190033;0.726190507411957 0.726190507411957 0.618303596973419;0.680555582046509 0.680555582046509 0.555555582046509;0.643518567085266 0.629629671573639 0.518518567085266;0.606481492519379 0.578703701496124 0.481481492519379;0.569444477558136 0.527777791023254 0.444444477558136;0.532407402992249 0.476851880550385 0.407407432794571;0.495370388031006 0.425925940275192 0.370370388031006;0.458333343267441 0.375 0.333333343267441;0.421296298503876 0.32407408952713 0.296296298503876;0.384259253740311 0.273148149251938 0.259259253740311;0.347222208976746 0.222222223877907 0.222222223877907;0.33983451128006 0.217494085431099 0.217494085431099;0.332446783781052 0.212765961885452 0.212765961885452;0.325059086084366 0.208037823438644 0.208037823438644;0.31767138838768 0.203309699892998 0.203309699892998;0.310283690690994 0.19858156144619 0.19858156144619;0.302895963191986 0.193853422999382 0.193853422999382;0.2955082654953 0.189125299453735 0.189125299453735;0.288120567798615 0.184397161006927 0.184397161006927;0.280732840299606 0.179669037461281 0.179669037461281;0.273345142602921 0.174940899014473 0.174940899014473;0.265957444906235 0.170212760567665 0.170212760567665;0.258569717407227 0.165484637022018 0.165484637022018;0.251182019710541 0.160756498575211 0.160756498575211;0.243794322013855 0.156028375029564 0.156028375029564;0.236406609416008 0.151300236582756 0.151300236582756;0.229018896818161 0.146572098135948 0.146572098135948;0.221631199121475 0.141843974590302 0.141843974590302;0.214243486523628 0.137115836143494 0.137115836143494;0.206855788826942 0.132387712597847 0.132387712597847;0.199468076229095 0.127659574151039 0.127659574151039;0.192080363631248 0.122931443154812 0.122931443154812;0.184692665934563 0.118203312158585 0.118203312158585;0.177304953336716 0.113475181162357 0.113475181162357;0.16991725564003 0.108747042715549 0.108747042715549;0.162529543042183 0.104018911719322 0.104018911719322;0.155141845345497 0.0992907807230949 0.0992907807230949;0.14775413274765 0.0945626497268677 0.0945626497268677;0.140366420149803 0.0898345187306404 0.0898345187306404;0.132978722453117 0.0851063802838326 0.0851063802838326;0.12559100985527 0.0803782492876053 0.0803782492876053;0.118203304708004 0.075650118291378 0.075650118291378;0.110815599560738 0.0709219872951508 0.0709219872951508;0.103427894413471 0.0661938562989235 0.0661938562989235;0.0960401818156242 0.0614657215774059 0.0614657215774059;0.0886524766683578 0.0567375905811787 0.0567375905811787;0.0812647715210915 0.0520094558596611 0.0520094558596611;0.0738770663738251 0.0472813248634338 0.0472813248634338;0.0664893612265587 0.0425531901419163 0.0425531901419163;0.059101652354002 0.037825059145689 0.037825059145689;0.0517139472067356 0.0330969281494617 0.0330969281494617;0.0443262383341789 0.0283687952905893 0.0283687952905893;0.0369385331869125 0.0236406624317169 0.0236406624317169;0.029550826177001 0.0189125295728445 0.0189125295728445;0.0221631191670895 0.0141843976452947 0.0141843976452947;0.0147754130885005 0.00945626478642225 0.00945626478642225;0.00738770654425025 0.00472813239321113 0.00472813239321113;0 0 0]);
218 % font size on the figure will be 16 points
222 %************** geometry **********************
224 % creating axes of the plot
225 deltax_ps = 2; % 2n-1 es 2n kozotti tavolsag rCC egysegekben
226 deltax_pt = 1; % 2n es 2n+1 kozotti tavolsag rCC egysegekben
227 deltax = 3; % 2n-1 es 2n+1 kozotti tavolsag rCC egysegekben
230 rightside = width/2*deltax*cAntidot.rCC;
231 top = height*deltay*cAntidot.rCC;
234 axes_geo = axes('Parent',figure1, ...
237 'FontSize', fontsize,...
240 'Units', 'Pixels', ...
241 'FontName','Times New Roman');
248 if ( ~transport_calculations_finished ) || (usejava('jvm') && ~feature('ShowFigureWindows'))
249 for idx = 1:size(antidot_edge_points,1)
250 ycoord = deltay*antidot_edge_points(idx,1)*ones(2,1)*cAntidot.rCC;
253 if mod(antidot_edge_points(idx,2),2) == 0
254 xcoord(1) = (antidot_edge_points(idx,2)-2)/2*deltax + deltax_ps;
256 xcoord(1) = (antidot_edge_points(idx,2)-1)/2*deltax;
259 if mod(antidot_edge_points(idx,2),3) == 0
260 xcoord(2) = (antidot_edge_points(idx,3)-2)/2*deltax + deltax_ps;
262 xcoord(2) = (antidot_edge_points(idx,3)-1)/2*deltax;
264 xcoord = xcoord*cAntidot.rCC;
265 plot(xcoord, ycoord,'+','MarkerSize', 4, 'Parent', axes_geo )
271 if isempty(hole_wavefnc)
273 hole_wavefnc = cAntidot.CalcWavefnc( Energy, 1, 'toPlot', 0, 'filterHole', 1, 'db', 1, 'infinitemass', 0, 'dotCalc', 0 );
277 Wavefnc = hole_wavefnc.Wavefnc{1};
278 contourf( hole_wavefnc.xcoords(1:delta:end,1:delta:end), hole_wavefnc.ycoords(1:delta:end,1:delta:end), abs(Wavefnc(1:delta:end,1:delta:end)), ...
279 levels,
'LineStyle',
'none',
'Parent', axes_geo );
280 text(30,80, [
'E = ', num2str(hole_wavefnc.eigenval*1000,3),
' meV'],
'color', [0,0,0],
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Parent', axes_geo);
283 % plot the position of the leads
284 plot([0,0], [0,top],
'LineWidth', 4,
'color', [0 0 0],
'Parent', axes_geo )
285 plot([rightside,rightside], [0,top],
'LineWidth', 4,
'color', [0 0 0],
'Parent', axes_geo )
287 % plot scattering centers
301 marker, 'MarkerSize', markersize, 'Parent', axes_geo )
306 ylabel('y [A]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_geo);
308 Lead1_pos = [ mean(coordinates.x(:,1)), min(coordinates.y(1,:))+20];
309 text(Lead1_pos(1), Lead1_pos(2), ['
Lead'], 'FontSize', fontsize, 'FontName','Times New Roman', 'Parent', axes_geo);
311 Lead2_pos = [ mean(coordinates.x(:,1)), max(coordinates.y(1,:))-20];
312 text(Lead2_pos(1), Lead2_pos(2), ['Lead'], 'FontSize', fontsize, 'FontName','Times New Roman', 'Parent', axes_geo);
315 %************** sepctrum in the lead **********************
316 x_lim = [min(spectrum(:,1)) max(spectrum(:,1))]/sqrt(3);
317 y_lim = [min(spectrum(:,2));max(spectrum(:,2))]*0.8;
321 % creating axes of the plot
322 axes_spectrum = axes('Parent',figure1, ...
324 'FontSize', fontsize,...
328 'Units', 'Pixels', ...
329 'FontName','Times New Roman');
332 Kpoint = 2*pi/3/sqrt(3);
333 Kpoint_pos = [Kpoint+0.005, 0.8*y_lim(2)];
334 plot(spectrum(:,1)/sqrt(3), spectrum(:,2),'.', 'MarkerSize', 4, 'Parent', axes_spectrum )
335 plot(Kpoint*ones(2,1), [min(spectrum(:,2));max(spectrum(:,2))], 'LineWidth', 1, 'Color', [0 0 0], 'Parent', axes_spectrum )
336 text(Kpoint_pos(1), Kpoint_pos(2), 'K', 'FontSize', fontsize, 'FontName','Times New Roman', 'Parent', axes_spectrum);
339 xlabel('k_yr_{CC}
','FontSize
', fontsize,'FontName
','Times New Roman
', 'Parent
', axes_spectrum); 342 ylabel('E [eV]
','FontSize
', fontsize,'FontName
','Times New Roman
', 'Parent
', axes_spectrum); 345 Position_Textbox = [0.47 0.51 0.244 0.1274]; 346 annotation(figure1,'textbox
',Position_Textbox,... 347 'String
',{['$$\hbar\omega =
',num2str(homega,'% 10.3f
' ),'$$eV
']},... 348 'FontSize
',fontsize,... 349 'FontName
','Times New Roman
',... 350 'interpreter
', 'latex
', ... 355 %************** Wavefunction in the lead ********************** 356 % wave functionis calculated at a specific k point 357 specific_k = 1.25*sqrt(3); 359 % create the effective Hamiltonian 360 cAntidot.setEnergy(0); 361 Surface_temp = cAntidot.Scatter_UC; 362 H0 = Surface_temp.Read( 'H0
' ); 363 H1 = Surface_temp.Read( 'H1
' ); 364 H0 = H0 - eye(size(H0))*mean(diag(H0)); 365 H = secular_H(H0,H1,specific_k); 366 [waveFnc,E] = eigs(H,10,0.001); 369 x_lim = get(axes_geo,'xlim
'); 372 axes_wavefnc = axes('Parent
',figure1,... 374 'FontSize
', fontsize,... 377 'Units
', 'Pixels
', ... 378 'FontName
','Times New Roman
'); 381 square_Wavefnc = abs(waveFnc(1:length(coordinates.x(:,1)),chosen_idx)).^2; 382 plot(coordinates.x(:,1), square_Wavefnc, 'MarkerSize
', 4, 'Parent
', axes_wavefnc) 385 cylabel = ylabel('|\Psi|^2
','FontSize
', fontsize,'FontName
','Times New Roman
', 'Parent
', axes_wavefnc); 388 xlabel('x [A]
','FontSize
', fontsize,'FontName
','Times New Roman
', 'Parent
', axes_wavefnc); 390 chosen_k_pos = [ max(coordinates.x(:,1))*0.05, max(square_Wavefnc)*0.95]; 391 text(chosen_k_pos(1), chosen_k_pos(2), ['k_yr_{CC} =
',num2str(specific_k/sqrt(3),'% 10.2f
')], 'FontSize
', fontsize, 'FontName
','Times New Roman
', 'Parent
', axes_wavefnc); 392 E_pos = [ max(coordinates.x(:,1))*0.05, max(square_Wavefnc)*0.8]; 393 text(E_pos(1), E_pos(2), ['E =
',num2str(E(chosen_idx),'% 10.2f
'),' eV
'], 'FontSize
', fontsize, 'FontName
','Times New Roman
', 'Parent
', axes_wavefnc); 394 B_pos = [ max(coordinates.x(:,1))*0.05, max(square_Wavefnc)*0.65]; 395 text(B_pos(1), B_pos(2), ['B =
',num2str(B,'% 10.2f
'),' T
'], 'FontSize
', fontsize, 'FontName
','Times New Roman
', 'Parent
', axes_wavefnc); 400 %************** Conductance ********************** 401 x_lim = [ min(Evec) max(Evec) ]; 402 axes_cond = axes('Parent
',figure1,... 404 'FontSize
', fontsize,... 407 'Units
', 'Pixels
', ... 408 'FontName
','Times New Roman
'); 412 indexek = logical( abs(DeltaC) <= 0.5 ); 414 numerics = plot(Evec(indexek), Conductance(indexek), 'Linewidth
', 2, 'color
', [0 0 0], 'Parent
', axes_cond); 416 plot(Evec(indexek), DeltaC(indexek), 'Linewidth
', 1, 'color
', [0 1 0], 'Parent
', axes_cond); 418 disp('No DeltaC data present
') 421 if ~isempty( antidot_eigenenergies ) 422 y_lim = [0 0.9];%[0 max(Conductance(indexek)) ]; 423 for idx = 1:length(antidot_eigenenergies) 424 plot( ones(1,2)*antidot_eigenenergies(idx), y_lim, 'Linewidth
', 1, 'color
', [1 0 0], 'Parent
', axes_cond); 431 xlabel('E [eV]
','FontSize
', fontsize,'FontName
','Times New Roman
', 'Parent
', axes_cond); 434 ylabel('\sigma/\sigma_0
','FontSize
', fontsize,'FontName
','Times New Roman
', 'Parent
', axes_cond); 436 E_pos = [ max(Evec)*0.5, max(Conductance(indexek))*0.35]; 437 text(E_pos(1), E_pos(2), ['B =
',num2str(B,'% 10.2f
'),' T
'], 'FontSize
', fontsize, 'FontName
','Times New Roman
', 'Parent
', axes_cond); 438 E_pos = [ max(Evec)*0.5, max(Conductance(indexek))*0.15]; 439 text(E_pos(1), E_pos(2), ['\phi/\phi_0 =
',num2str(cAntidot.flux_of_hole,3)], 'FontSize
', fontsize, 'FontName
','Times New Roman
', 'Parent
', axes_cond); 441 fig_legend = legend(axes_cond, {'conductance
', 'unitarity error
'});%, 'FontSize
', fontsize, 'FontName
','Times New Roman
') 442 set(fig_legend, 'FontSize
', fontsize, 'FontName
', 'Times New Roman
', 'Box
', 'off
', 'Location
', 'NorthEast
') 444 % setting the position and margins of the plot, removing white 445 figure_pos = get( figure1, 'Position
'); 447 %set the position of the geometry axis 448 OuterPosition_geo = get(axes_geo, 'OuterPosition
'); 449 OuterPosition_geo(1) = 0; 450 OuterPosition_geo(2) = figure_pos(4)/2; 451 OuterPosition_geo(3) = figure_pos(3)/2; 452 OuterPosition_geo(4) = figure_pos(4)/2; 453 set(axes_geo, 'OuterPosition
', OuterPosition_geo); 454 % Position_geo = get(axes_geo, 'OuterPosition
') - get(axes_geo, 'TightInset
') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1]; 455 % set(axes_geo, 'Position
', Position_geo); 457 %set the position of the spectrum axis 458 OuterPosition_spectrum = get(axes_spectrum, 'OuterPosition
'); 459 OuterPosition_spectrum(1) = figure_pos(3)/2; 460 OuterPosition_spectrum(2) = figure_pos(4)/2; 461 OuterPosition_spectrum(3) = figure_pos(3)/2; 462 OuterPosition_spectrum(4) = figure_pos(4)/2; 463 set(axes_spectrum, 'OuterPosition
', OuterPosition_spectrum); 464 % Position_spectrum = get(axes_spectrum, 'OuterPosition
') - get(axes_spectrum, 'TightInset
') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1]; 465 % set(axes_spectrum, 'Position
', Position_spectrum); 467 %set the position of the wavefnc axis 468 OuterPosition_wavefnc = get(axes_wavefnc, 'OuterPosition
'); 469 OuterPosition_wavefnc(1) = 0; 470 OuterPosition_wavefnc(2) = 0; 471 OuterPosition_wavefnc(3) = figure_pos(3)/2; 472 OuterPosition_wavefnc(4) = figure_pos(4)/2; 473 set(axes_wavefnc, 'OuterPosition
', OuterPosition_wavefnc); 474 % Position_wavefnc = get(axes_wavefnc, 'OuterPosition
') - get(axes_wavefnc, 'TightInset
') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1]; 475 % Position_wavefnc(1) = Position_geo(1); 476 % Position_wavefnc(3) = Position_geo(3); 477 % set(axes_wavefnc, 'Position
', Position_wavefnc); 479 %set the position of the conductance axis 480 OuterPosition_cond = get(axes_cond, 'OuterPosition
'); 481 OuterPosition_cond(1) = figure_pos(3)/2; 482 OuterPosition_cond(2) = 0; 483 OuterPosition_cond(3) = figure_pos(3)/2; 484 OuterPosition_cond(4) = figure_pos(4)/2; 485 set(axes_cond, 'OuterPosition
', OuterPosition_cond); 486 % Position_cond = get(axes_cond, 'OuterPosition
') - get(axes_cond, 'TightInset
') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1]; 487 % set(axes_cond, 'Position
', Position_cond); 490 % setting the position and margins of the plot, removing white spaces 491 ver = version('-release
'); 492 if str2num(ver(1:4)) >= 2016 493 figure1.PaperPositionMode = 'auto'; 494 set(figure1, 'PaperSize
', [figure_pos(3) figure_pos(4)]); 499 print('-depsc2
', fullfile(outputdir, [outfilename,'.eps
'])) 500 print('-dpdf
', fullfile(outputdir,[outfilename, '.pdf
'])) 502 disp('Failed to export figure
'); 503 disp( errCause.identifier ); 504 disp( errCause.stack(1) ); function CalcSpectrum()
calculates the spectrum of the leads
function Graphene_antidot_transport(filenum)
Calculates the conductance through a graphene antidot in a homogeneous magnetic field.
Structure hole contains the data about the antidot used in class antidot.
function setOutputDir()
sets output directory
function Transport(Energy, B)
creating the Ribbon class representing the twoterminal setup
A class to perform transport calculations on a graphene antidot (i.e., a hollow in a ribbon)...
function PlotFunction()
Creates the plot.
Structure scatterers contains data on the scattering impurities used in class antidot.
function secular_H(H0, H1, k)
Hamiltonian for the secular equation.
function CreateHandlesForMagneticField(B)
Creates and set function handles of the magnetic vector potentials in the Ribbon class.
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 ...
function CalculateTransport()
Calculates the conductance.