Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
Graphene_Conductivity.m
Go to the documentation of this file.
1 % Energy dependent conductivity through a wide (4 micron) graphene ribbon calculated by the adatpiveQ interface
2 % Copyright (C) 2016 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 Graphene_Conductivity.m
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).
22 %> @Available
23 %> EQuUs v4.8 or later
24 %> @expectedresult
25 %> @image html Graphene_Conductivity.jpg
26 %> @image latex Graphene_Conductivity.jpg
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$.
28 %> @}
29 %
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).
32 function Graphene_Conductivity( filenum )
33 
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 input XML
43  inputXML = 'Basic_Input_zigzag_leads.xml';
44  % Parsing the input file and creating data structures
45  [Opt, param] = parseInput( fullfile( directory, inputXML ) );
46 
47 
48  % filename containing the output data
49  outfilename = [fncname,'_',num2str( filenum )];
50  % the output folder
51  outputdir = [];
52 
53  % length of the junction
54  height = 2400;
55  % width of the junction
56  total_width = 19200;
57  % width of the unit cell
58  width_uc = 2;
59  % The aspect ratio of the junction
60  aspect_ratio = (total_width*3/2)/((height)*sqrt(3));
61 
62  % The Fermi energy in the calculations
63  EF = 0; %In EV
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
67  DeltaEF_index = 5;
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
71  Energy = 0;
72 
73  % Conductivity calculated by the fast way
74  Conductivity = zeros(size(EF_vec));
75 
76  % conductivity calculated from the full Hamiltonian
77  Conductivity_fromH = zeros(size(EF_vec_fromH));
78 
79 
80 
81 
82  % creating output directories
83  setOutputDir();
84 
85  % filename containing the output XML
86  outputXML = [outputdir, filesep, outfilename, '.xml'];
87 
88  % Calculating the conductivity
89  disp(['Performing calculation for junction with aspect ratio W/L = ', num2str(aspect_ratio, '%10.2f')]);
90  calcConductivity();
91 
92  % export the calculetd data
93  save( [outputdir,'/',outfilename,'.mat']);
94 
95  % nested functions
96 
97  %% calcConductivity
98  %> @brief Calculate the conductivity for the selected energy points
99  function calcConductivity
100 
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
105 
106 
107  for idx = 1:length(EF_vec)
108 
109  disp(' ')
110  disp(' ')
111  disp(' ----------------------------------')
112  disp('Calculating Conductivity for the given Fermi energy')
113 
114  EF = EF_vec(idx);
115 
116  % function handle for the transport calculation using the fast method
117  TransportFast = @(qvec)(CalculateTransporSpecq( qvec, width_uc, height, Energy, EF, Opt, param, outputXML, false ) );
118 
119  % creating an instance of class adaptiveQ for transverse momentum iterations
120  adaptive_moments = adaptiveQ( Opt, interpq );
121 
122  % running the transverse momentum iterations with the function handle for the transport calculations
123  adaptive_moments.runAdaptiveIterations( TransportFast );
124 
125  % collecting the calculated data
126  sumCq = sum(adaptive_moments.Read('interpy'))/aspect_ratio;
127  Conductivity(idx) = sumCq;
128 
129  if mod(idx-1,DeltaEF_index) == 0
130  disp(' ')
131  disp(' ')
132  disp(' ----------------------------------')
133  disp('Calculating Conductivity for the given Fermi energy from the full Hamiltonian')
134 
135  % function handle for the transport calculation from the full Hamiltonian
136  TransportSlow = @(qvec)(CalculateTransporSpecq( qvec, width_uc, height, Energy, EF, Opt, param, outputXML, true) );
137 
138  % creating an instance of class adaptiveQ for transverse momentum iterations
139  adaptive_moments = adaptiveQ( Opt, interpq );
140 
141  % running the transverse momentum iterations with the function handle for the transport calculations
142  adaptive_moments.runAdaptiveIterations( TransportSlow );
143 
144  % collecting the calculated data
145  sumCq = sum(adaptive_moments.Read('interpy'))/aspect_ratio;
146  Conductivity_fromH( floor(idx/DeltaEF_index)+1 ) = sumCq;
147  end
148 
149  disp(' ----------------------------------')
150  disp('Plotting conductivity:')
151  PlotFunction();
152 
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');
155  end
156 
157 
158 
159 
160  end
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 %% setOutputDir
173 %> @brief Sets the output directory
175  resultsdir = fullfile(pwd, 'results');
176  mkdir(resultsdir );
177  outputdir = resultsdir;
178  end
179 
180 %% PlotFunction
181 %> @brief Plots the calculated data
183 
184 
185  % creating figure in units of pixels
186  figure1 = figure('Units', 'Pixels', 'Visible', 'off');
187 
188  % font size on the figure will be 16 points
189  fontsize = 16;
190 
191  %Theoretical minimal conductivity
192  theoretical_limit = 2/pi;
193 
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];
198 
199  if norm(x_lim) == 0
200  x_lim = [0 1];
201  end
202 
203  % creating axes of the plot
204  axes_cond = axes('Parent',figure1,... 'Position', Position,...
205  'Visible', 'on',...
206  'FontSize', fontsize,...
207  'xlim', x_lim,...
208  'Box', 'on',...
209  'Units', 'Pixels', ...
210  'FontName','Times New Roman');
211  hold on;
212 
213  legend_labels = [];
214 
215  % plot the data
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)';
219  end
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';
223  end
224 
225  plot( [0 max(EF_vec(indexek))*1000], ones(1,2)*theoretical_limit, 'r', 'Parent', axes_cond);
226 
227 
228  % Create xlabel
229  xlabel('E_F [meV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
230 
231  % Create ylabel
232  ylabel('\sigma/\sigma_0','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
233 
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')
237  end
238 
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
243  fig = gcf;
244  fig.PaperPositionMode = 'auto';
245  fig_pos = fig.PaperPosition;
246  fig.PaperSize = [fig_pos(3) fig_pos(4)];
247 
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);
251  end
252 
253  % export the figures
254  print('-depsc2', fullfile(outputdir, [fncname, '_', num2str(filenum),'.eps']))
255  print('-dpdf', fullfile(outputdir, [fncname, '_', num2str(filenum),'.pdf']))
256  close(figure1)
257 
258  end
259 
260 
261  % end nested functions
262 
263 end
264 
265 
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.
Definition: structures.m:60
A class providing adaptive distribution of the transverse momentum points.
Definition: adaptiveQ.m:27
function()
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
function PlotFunction()
Creates the plot.
function parseInput(filename)
This function parses the input file containing the input parameters.
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.