1 % Energy dependent conductivity through a wide (4 micron) graphene ribbon calculated by the adatpiveQ interface
2 % Copyright (C) 2016 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 conductivity through a wide (4 micron) graphene junction.
21 %> @
param filenum The identification number of the filenema
for the exported data (
default is 1).
23 %> EQuUs v4.8 or later
27 %> The red line represents the theoretical \f$ 2/\pi\;\sigma_0 \f$ limit of the minimal conductivity with \f$ \sigma_0 = e^2/\hbar \f$.
30 %> @brief Example to calculate the conductivity through a wide (4 micron) graphene junction
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 input XML
43 inputXML = 'Basic_Input_zigzag_leads.xml';
44 % Parsing the input file and creating data
structures 48 % filename containing the output data
49 outfilename = [fncname,'_',num2str( filenum )];
53 % length of the junction
55 % width of the junction
57 % width of the unit cell
59 % The aspect ratio of the junction
60 aspect_ratio = (total_width*3/2)/((height)*sqrt(3));
62 % The Fermi energy in the calculations
64 % 1D energy array contaning energy values in the transport calculations
65 EF_vec = [1e-5:1e-3:0.04];
66 % Energy ... used in transport calculations with full Hamiltonian
68 % 1D energy array contaning energy values in the transport calculations with full Hamiltonian
69 EF_vec_fromH = EF_vec(1:DeltaEF_index:end);
70 % Energy in the transport calculations relative to the Fermi energy
73 % Conductivity calculated by the fast way
74 Conductivity = zeros(size(EF_vec));
76 % conductivity calculated from the full Hamiltonian
77 Conductivity_fromH = zeros(size(EF_vec_fromH));
82 % creating output directories
85 % filename containing the output XML
86 outputXML = [outputdir, filesep, outfilename, '.xml'];
88 % Calculating the conductivity
89 disp(['Performing calculation for junction with aspect ratio W/L = ', num2str(aspect_ratio, '%10.2f')]);
92 % export the calculetd data
93 save( [outputdir,'/',outfilename,'.mat']);
98 %> @brief Calculate the conductivity for the selected energy points
101 % for graphene infinite mass boundary condition is the zigzag orientated ibbon, q in units of 1/(3r_{cc})
102 W = (total_width/2*2 + (total_width/2-1) ); %in units of r_CC
103 m = 0:1:total_width/width_uc;
104 interpq = transpose( (m+0.5)*pi/(W/3) ); %
for graphene infinite mass boundary
107 for idx = 1:length(EF_vec)
111 disp(' ----------------------------------')
112 disp('Calculating Conductivity for the given Fermi energy')
116 %
function handle for the transport calculation using the fast method
119 % creating an instance of class
adaptiveQ for transverse momentum iterations
122 % running the transverse momentum iterations with the
function handle for the transport calculations
123 adaptive_moments.runAdaptiveIterations( TransportFast );
125 % collecting the calculated data
126 sumCq = sum(adaptive_moments.Read('interpy'))/aspect_ratio;
127 Conductivity(idx) = sumCq;
129 if mod(idx-1,DeltaEF_index) == 0
132 disp(' ----------------------------------')
133 disp('Calculating Conductivity for the given Fermi energy from the full Hamiltonian')
135 %
function handle for the transport calculation from the full Hamiltonian
138 % creating an instance of class
adaptiveQ for transverse momentum iterations
141 % running the transverse momentum iterations with the
function handle for the transport calculations
142 adaptive_moments.runAdaptiveIterations( TransportSlow );
144 % collecting the calculated data
145 sumCq = sum(adaptive_moments.Read('interpy'))/aspect_ratio;
146 Conductivity_fromH( floor(idx/DeltaEF_index)+1 ) = sumCq;
149 disp(' ----------------------------------')
150 disp('Plotting conductivity:')
153 disp([ num2str(idx/length(EF_vec)*100),' % calculated of the conductance.'])
154 save( fullfile(outputdir, [outfilename, '.mat']), 'Conductivity', 'Conductivity_fromH', 'Energy', 'EF_vec', 'height', 'total_width');
173 %> @brief Sets the output directory
175 resultsdir = fullfile(pwd, 'results');
177 outputdir = resultsdir;
181 %> @brief Plots the calculated data
185 % creating figure in units of pixels
186 figure1 = figure('Units', 'Pixels', 'Visible', 'off');
188 % font size on the figure will be 16 points
191 %Theoretical minimal conductivity
192 theoretical_limit = 2/pi;
194 % determine points to be plotted
195 indexek = logical(Conductivity);
196 indexek_fromH = logical(Conductivity_fromH);
197 x_lim = [0 max(EF_vec(indexek))*1000];
203 % creating axes of the plot
204 axes_cond = axes('Parent',figure1,... 'Position', Position,...
206 'FontSize', fontsize,...
209 'Units', 'Pixels', ...
210 'FontName','Times New Roman');
216 if ~isempty(Conductivity(indexek))
217 numerics = plot(EF_vec(indexek)*1000, Conductivity(indexek), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_cond);
218 legend_labels{end+1} =
'PRB 90, 125428 (2014)';
220 if ~isempty(Conductivity_fromH(indexek_fromH))
221 numerics2 = plot(EF_vec_fromH(indexek_fromH)*1000, Conductivity_fromH(indexek_fromH),
'LineStyle',
'none',
'Marker',
'v',
'MarkerSize',6,
'color', [0 0 1],
'Parent', axes_cond);
222 legend_labels{end+1} =
'EQuUs MKL';
225 plot( [0 max(EF_vec(indexek))*1000], ones(1,2)*theoretical_limit,
'r',
'Parent', axes_cond);
229 xlabel(
'E_F [meV]',
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Parent', axes_cond);
232 ylabel(
'\sigma/\sigma_0',
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Parent', axes_cond);
234 if length( legend_labels) == 2
235 fig_legend = legend([numerics, numerics2], legend_labels);
236 set(fig_legend,
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Box',
'off',
'Location',
'NorthEast')
239 % setting the position and margins of the plot, removing white
240 % spaces for release dates greater than 2015
241 ver = version('-release');
242 if str2num(ver(1:4)) >= 2016
244 fig.PaperPositionMode = 'auto';
245 fig_pos = fig.PaperPosition;
246 fig.PaperSize = [fig_pos(3) fig_pos(4)];
248 set(gca, 'Position', get(gca, 'OuterPosition') - get(gca, 'TightInset') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1]);
249 Position_figure = get(axes_cond, 'OuterPosition');
250 set(figure1, 'Position', Position_figure);
254 print('-depsc2', fullfile(outputdir, [fncname, '_', num2str(filenum),'.eps']))
255 print('-dpdf', fullfile(outputdir, [fncname, '_', num2str(filenum),'.pdf']))
261 % end nested functions
function CalculateTransporSpecq(qvec, width_uc, height, Energy, EF, Opt, param, outputXML, FiniteGreensFunctionFromHamiltonian)
Function to calculate the DC transverse momentum resolved conductivity in the zero temperature limit.
Structure Opt contains the basic computational parameters used in EQuUs.
A class providing adaptive distribution of the transverse momentum points.
Structure param contains data structures describing the physical parameters of the scattering center ...
function PlotFunction()
Creates the plot.
function setOutputDir()
Sets the output directory.
function structures(name)
function Graphene_Conductivity(filenum)
Example to calculate the conductivity through a wide (4 micron) graphene junction.