Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
Differential_conductance.m
Go to the documentation of this file.
1 %% Differential conductance and IV curve
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 Differential_conductance.m
20 %> @brief Example to calculate the differential conductance and the IV curve through a junction made of a square lattice. Example taken from Eur. Phys. J. B 53, 537-549 (2006).
21 %> @param filenum The identification number of the filenema for the exported data (default is 1).
22 %> @reference
23 %> Eur. Phys. J. B 53, 537-549 (2006).
24 %> @Available
25 %> EQuUs v4.8 or later
26 %> @expectedresult
27 %> @image html Differential_conductance.jpg
28 %> @image latex Differential_conductance.jpg
29 %> @}
30 %
31 %> @brief Example to calculate the differential conductance and the IV curve through a junction made of a square lattice. Example taken from Eur. Phys. J. B 53, 537-549 (2006).
32 %> @param filenum The identification number of the filenema for the exported data (default is 1).
33 function Differential_conductance( filenum )
34 
35 
36 if ~exist('filenum', 'var')
37  filenum = 1;
38 end
39 
40 filename = mfilename('fullpath');
41 [directory, fncname] = fileparts( filename );
42 
43  % filename containing the input XML
44  inputXML = 'Basic_Input.xml';
45  % Parsing the input file and creating data structures
46  [Opt, param] = parseInput( fullfile( directory, inputXML ) );
47 
48  % filename containing the output XML
49  outfilename = [fncname, '_',num2str( filenum )];
50  % the output folder
51  outputdir = [];
52  % length of the junction
53  height = 130;
54  % width of the junction
55  width = 121;
56 
57  % Temperature in K
58  T = 10;
59 
60 
61  % The differential conductance as a function of the magnetiv field
62  diff_conductance = [];
63  % bias voltage at zero temperature
64  bias_T0 = [];
65  % The current at zero temperature
66  current_T0 = [];
67  % bias voltage at non-zero temperature
68  bias = [];
69  % The current at non-zero temperature
70  current = [];
71 
72  % creating output directories
73  setOutputDir();
74 
75  % Calculated the conductance
77 
78  % Creating the plots
79  PlotFunction();
80 
81  % export the calculeted data
82  save( [outputdir, filesep, outfilename,'.mat']);
83 
85 %> @brief Calculates the conductance
87 
88  % number of energy points
89  Edb = 300;
90  % maximal bias
91  bias_max = 0.025;
92 
93  island = structures('hole');
94  island.center.x = width;
95  island.center.y = height/2;
96  island.radius = 30;
97 
98  % creating the Ribbon structure describing the junction
99  cRibbon = Ribbon('width', width, 'height', height, 'EF', 1e-6, 'Opt', Opt, 'param', param, 'filenameOut', fullfile( outputdir, [outfilename, '.xml']) );
100 
101  % Setting the function handle for the circkle-shaped hard wall potential
102  hScatterPotential = @(coordinates)(ScatterPotential(coordinates, island));
103 
104  % calculating the IV curve for zero temperature
105  display('Calculating the IV curve for zero temperature.')
106  cIV = IV( Opt, 'bias_max', bias_max, 'T', 0, 'junction', cRibbon, 'scatterPotential', hScatterPotential, 'gfininvfromHamiltonian', true, 'Edb', Edb);
107  [current_T0, bias_T0, diff_conductance] = cIV.IVcalc('tuned_contact', 'right');
108 
109  % calculating the IV curve for nonzero temperature
110  display('Calculating the IV curve for non-zero temperature.')
111  cIV = IV( Opt, 'bias_max', bias_max, 'T', T, 'junction', cRibbon, 'scatterPotential', hScatterPotential, 'gfininvfromHamiltonian', true, 'Edb', Edb);
112  [current, bias] = cIV.IVcalc('tuned_contact', 'right');
113 
114  end
115 
116 
117 
118 
119 %% setOutputDir
120 %> @brief Sets output directory.
122  resultsdir = 'results';
123  mkdir(resultsdir );
124  outputdir = fullfile( directory, resultsdir );
125  end
126 
127 
128 
129 
130 %% PlotFunction
131 %> @brief Creates the plot
133 
134 
135  % creating figure in units of pixels
136  figure1 = figure( 'Units', 'Pixels', 'Visible', 'off');
137 
138  % font size on the figure will be 16 points
139  fontsize = 12;
140 
141 
142  %************** conductance **********************
143  % setting the limits of the axis
144  x_lim = [0 25];
145  y_lim = [0 16];
146 
147  % creating axes of the plot
148  axes_cond = axes('Parent',figure1, ...
149  'Visible', 'on',...
150  'FontSize', fontsize,...
151  'xlim', x_lim,...
152  'ylim', y_lim,...
153  'Box', 'on',...
154  'Units', 'Pixels', ...
155  'FontName','Times New Roman');
156  hold on;
157 
158  % plot the data
159  plot(bias_T0*1000, real(diff_conductance), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_cond);
160 
161 
162 
163  % Create xlabel
164  xlabel('E [meV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
165 
166  % Create ylabel
167  ylabel('G [2e^2/h]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
168 
169 
170  %************** IV curve **********************
171 
172  % creating axes of the plot
173  axes_current = axes('Parent',figure1, ...
174  'Visible', 'on',...
175  'FontSize', fontsize,...
176  'xlim', x_lim,...
177  'Box', 'on',...
178  'Units', 'Pixels', ...
179  'FontName','Times New Roman');
180  hold on;
181 
182  % plot the data
183  plot(bias_T0*1000, real(current_T0)/max(bias_T0), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_current);
184  plot(bias*1000, real(current)/max(bias), 'Linewidth', 2, 'color', [1 0 0], 'Parent', axes_current);
185 
186  % set the legends
187  legend_labels = {'T=0 K', ['T= ', num2str(T), ' K'] };
188  fig_legend = legend(axes_current, legend_labels);
189  set(fig_legend, 'FontSize', fontsize*0.7, 'FontName','Times New Roman', 'Box', 'off', 'Location', 'NorthWest')
190 
191 
192  % Create xlabel
193  xlabel('U [meV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_current);
194 
195  % Create ylabel
196  ylabel('I [2U_{0}e^2/h]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_current);
197 
198 
199 
200  % setting the position and margins of the plot, removing white
201  % spaces for release dates greater than 2015
202  ver = version('-release');
203  if str2num(ver(1:4)) >= 2016
204  % setting the position and margins of the plot, removing white spaces
205  figure1.PaperPositionMode = 'auto';
206  fig_pos = figure1.PaperPosition;
207  figure1.PaperSize = [fig_pos(3) fig_pos(4)];
208  end
209 
210  % set the figure position
211  figure_pos = get( figure1, 'Position' );
212  figure_pos(4) = figure_pos(4)/2;
213  set( figure1, 'Position', figure_pos );
214 
215  % set the position of the conductance axis
216  Position_cond = [0, 0, figure_pos(3)/2, figure_pos(4)];
217  set(axes_cond, 'OuterPosition', Position_cond);
218 
219  %set the position of the IV axis
220  Position_current = [figure_pos(3)/2, 0, figure_pos(3)/2, figure_pos(4)];
221  set(axes_current, 'OuterPosition', Position_current);
222 
223  % export the figures
224  print('-depsc2', fullfile(outputdir,[outfilename, '.eps']))
225  print('-dpdf', fullfile(outputdir,[outfilename, '.pdf']))
226  close(figure1)
227 
228 
229  end
230 
231 
232 
233 end
Structure hole contains the data about the antidot used in class antidot.
Definition: structures.m:23
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
function PlotFunction()
Creates the plot.
A class for calculations on a ribbon of finite width for equilibrium calculations mostly in the zero ...
Definition: Ribbon.m:34
A class to calculate the I-V curve for a two terminal setup, based on the non-equilibrium Greens func...
Definition: IV.m:26
function setOutputDir()
Sets output directory.
function CalculateTransport()
Calculates the conductance.
function ScatterPotential(coordinates, island)
Function for island shaped hard-wall potential profile.
function()
function Differential_conductance(filenum)
Example to calculate the differential conductance and the IV curve through a junction made of a squar...
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 structures(name)