Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
MinimalConductivity.m
Go to the documentation of this file.
1 %% Minimal conductivity of graphene
2 % Copyright (C) 2015 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 MinimalConductivity.m
20 %> @brief Calculates the minimal conductivity of the graphene sheet as a function of the aspect ratio.
21 %> @param filenum The identification number of the filenema for the exported data (default is 1).
22 %> @Available
23 %> EQuUs v4.4 or later
24 %> @expectedresult
25 %> @image html MinimalConductivity.jpg
26 %> @image latex MinimalConductivity.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 Calculates the minimal conductivity of the graphene sheet as a function of the aspect ratio.
31 %> @param filenum The identification number of the filenema for the exported data (default is 1).
32 function MinimalConductivity( filenum )
33 
34 if ~exist('filenum', 'var')
35  filenum = 1;
36 end
37 
38 filename = mfilename('fullpath');
39 [directory, fncname] = fileparts( filename );
40 
41  % filename containing the input XML
42  inputXML = 'Basic_Input_zigzag_leads.xml';
43  % Parsing the input file and creating data structures
44  [Opt, param] = parseInput( fullfile( directory, inputXML ) );
45 
46  % filename containing the output XML
47  outfilename = [fncname, '_',num2str( filenum )];
48  % the output folder
49  outputdir = [];
50 
51  % length of the junction (number of unit cells)
52  height = 170;
53  % The Fermi energy
54  EF = 0.001; %In EV
55 
56  % class representing the two terminal ribbon structure
57  cRibbon = [];
58 
59 
60  % creating 1D energy array
61  % The minimal value of the widths
62  Widthmin = 10;
63  % spacing of the width values
64  Widthdelta = 20;
65  % number of width values
66  Widthnum = 30;%100;%200;
67  % The 1D energy array
68  Widthvec = Widthmin:Widthdelta:Widthmin+Widthnum*Widthdelta;
69 
70  % preallocating the array for the calculated conductance values
71  Conductivity = NaN(Widthnum+1,1);
72  % preallocating the array for the unitarity errors
73  DeltaC = NaN(Widthnum+1,1);
74  % preallocating the array for the spect ratio (Width/lenth)
75  aspectRatio = NaN(Widthnum+1,1);
76 
77  % creating output directories
78  setOutputDir();
79 
80  % Calculate the transport through the magnetic barrier
82 
83  % plot the calculated results
84  PlotFunction();
85 
86 
87 
88 
90 %> @brief Calculates the conductance values
92 
93 
94 
95  for idx = 1:length(Widthvec)
96 
97  % the current width parameter of the junction
98  width = Widthvec(idx);
99 
100  % creating the Ribbon class representing the twoterminal setup
101  cRibbon = Ribbon('width', width, 'height', height, 'Opt', Opt, 'param', param, 'EF', EF );
102 
103  disp(' ----------------------------------')
104  disp('Plotting conductivity:')
105  PlotFunction();
106 
107 
108  disp(' ')
109  disp(' ')
110  disp(' ----------------------------------')
111  disp('Calculating Conductance for the given aspect ratio')
112 
113 
114  % Calculating the conductivity
115  tic
116  [Conductivity_tmp,aspectRatio_tmp,~,~,DeltaC_tmp] = cRibbon.Transport( 0, 'constant_channels', true );
117  toc
118 
119  % storing the calculated data
120  Conductivity(idx) = Conductivity_tmp;
121  DeltaC(idx) = DeltaC_tmp;
122  aspectRatio(idx) = aspectRatio_tmp;
123 
124 
125 
126  % exporting the calculated data
127  save( fullfile(outputdir,[outfilename, '.mat']) );
128  disp([ num2str(idx/length(Widthvec)*100),' % calculated of the conductance.'])
129  disp( ' ' )
130 
131 
132 
133  end
134 
135  end
136 
137 
138 
139 %% setOutputDir
140 %> @brief Sets output directory.
142  resultsdir = [pwd, filesep, 'results'];
143  mkdir(resultsdir );
144  outputdir = resultsdir;
145  end
146 
147 
148 
149  %% PlotFunction
150 %> @brief Creates the plot
152 
153  % creating figure in units of pixels
154  figure1 = figure( 'Units', 'Pixels', 'Visible', 'off');
155 
156  % font size on the figure will be 16 points
157  fontsize = 16;
158 
159 
160  %Theoretical minimal conductivity
161  theoretical_limit = 2/pi;
162 
163  % determine points to be plotted
164  indexek = logical( (abs(DeltaC) <= 0.5) & (aspectRatio~=0) & ~isnan(DeltaC) );
165  x_lim = [0 max(aspectRatio(indexek))];
166 
167  if norm(x_lim) == 0
168  x_lim = [0 1];
169  end
170 
171  axes_cond = axes('Parent',figure1, ...
172  'Visible', 'on',...
173  'FontSize', fontsize,...
174  'xlim', x_lim,...
175  'Box', 'on',...
176  'Units', 'Pixels', ...
177  'FontName','Times New Roman');
178  hold on;
179 
180  % plot the data
181  numerics = plot(aspectRatio(indexek), Conductivity(indexek), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_cond);
182  try
183  plot(aspectRatio(indexek), DeltaC(indexek), 'Linewidth', 1, 'color', [0 1 0], 'Parent', axes_cond);
184  catch
185  disp('No DeltaC data present')
186  end
187  plot( [0 max(aspectRatio(indexek))], ones(1,2)*theoretical_limit, 'r', 'Parent', axes_cond);
188 
189 
190 
191 
192  % Create xlabel
193  xlabel('W/L','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
194 
195  % Create ylabel
196  ylabel('\sigma/\sigma_0','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
197 
198 
199  % set the legends
200  fig_legend = legend(axes_cond, {'conductivity', 'unitarity error'});%, 'FontSize', fontsize, 'FontName','Times New Roman')
201  set(fig_legend, 'FontSize', fontsize, 'FontName','Times New Roman', 'Box', 'off', 'Location', 'NorthEast')
202 
203  % setting the position and margins of the plot, removing white
204  % spaces for release dates greater than 2015
205  ver = version('-release');
206  if str2num(ver(1:4)) >= 2016
207  figure1.PaperPositionMode = 'auto';
208  fig_pos = figure1.PaperPosition;
209  figure1.PaperSize = [fig_pos(3) fig_pos(4)];
210 
211  set(axes_cond, 'Position', get(axes_cond, 'OuterPosition') - get(axes_cond, 'TightInset') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1]);
212  Position_figure = get(axes_cond, 'OuterPosition');
213  set(figure1, 'Position', Position_figure);
214  end
215 
216 
217  % export the figures
218  print('-depsc2', fullfile(outputdir,[outfilename, '.eps']))
219  print('-dpdf', fullfile(outputdir,[outfilename, '.pdf']))
220  close(figure1)
221 
222 
223  end
224 
225 
226 
227 
228 end
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
A class for calculations on a ribbon of finite width for equilibrium calculations mostly in the zero ...
Definition: Ribbon.m:34
function CalculateTransport()
Calculates the conductance values.
function Transport(Energy, B)
Calculates the conductance at a given energy value.
function PlotFunction()
Creates the plot.
function()
function setOutputDir()
Sets output directory.
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
function parseInput(filename)
This function parses the input file containing the input parameters.
function MinimalConductivity(filenum)
Calculates the minimal conductivity of the graphene sheet as a function of the aspect ratio.
function structures(name)