Eötvös Quantum Utilities  v4.8.128
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 
84 %% CalculateTransport
85 %> @brief Calculates the conductance
86  function CalculateTransport()
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.
121  function setOutputDir()
122  resultsdir = 'results';
123  mkdir(resultsdir );
124  outputdir = fullfile( directory, resultsdir );
125  end
126 
127 
128 
129 
130 %% PlotFunction
131 %> @brief Creates the plot
132  function PlotFunction( )
133 
134 
135  % creating figure in units of pixels
136  figure1 = figure( 'Units', 'Pixels');
137 
138  % font size on the figure will be 16 points
139  fontsize = 16;
140 
141  % setting the position and margins of the plot, removing white spaces
142  figure1.PaperPositionMode = 'auto';
143  fig_pos = figure1.PaperPosition;
144  figure1.PaperSize = [fig_pos(3) fig_pos(4)];
145  figure1.Position(4) = figure1.Position(4)/2;
146  %************** conductance **********************
147  % setting the limits of the axis
148  x_lim = [0 25];
149  y_lim = [0 16];
150 
151  % creating axes of the plot
152  axes_cond = axes('Parent',figure1, ...
153  'Visible', 'on',...
154  'FontSize', fontsize,...
155  'xlim', x_lim,...
156  'ylim', y_lim,...
157  'Box', 'on',...
158  'Units', 'Pixels', ...
159  'FontName','Times New Roman');
160  hold on;
161 
162  % plot the data
163  plot(bias_T0*1000, real(diff_conductance), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_cond);
164 
165 
166 
167  % Create xlabel
168  xlabel('E [meV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
169 
170  % Create ylabel
171  ylabel('G [2e^2/h]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
172 
173 
174  %************** IV curve **********************
175 
176  % creating axes of the plot
177  axes_current = axes('Parent',figure1, ...
178  'Visible', 'on',...
179  'FontSize', fontsize,...
180  'xlim', x_lim,...
181  'Box', 'on',...
182  'Units', 'Pixels', ...
183  'FontName','Times New Roman');
184  hold on;
185 
186  % plot the data
187  plot(bias_T0*1000, real(current_T0)/max(bias_T0), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_current);
188  plot(bias*1000, real(current)/max(bias), 'Linewidth', 2, 'color', [1 0 0], 'Parent', axes_current);
189 
190  % set the legends
191  legend_labels = {'T=0 K', ['T= ', num2str(T), ' K'] };
192  fig_legend = legend(axes_current, legend_labels);
193  set(fig_legend, 'FontSize', fontsize*0.7, 'FontName','Times New Roman', 'Box', 'off', 'Location', 'NorthWest')
194 
195 
196  % Create xlabel
197  xlabel('U [meV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_current);
198 
199  % Create ylabel
200  ylabel('I [2U_{0}e^2/h]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_current);
201 
202 
203 
204  %set the position of the conductance axis
205  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];
206  Position_cond = [Position_cond(1), Position_cond(2), figure1.Position(3)/2-85, Position_cond(4)];
207  set(axes_cond, 'Position', Position_cond);
208 
209  %set the position of the IV axis
210  Position_current = get(axes_current, 'OuterPosition') - get(axes_current, 'TightInset') * [-1 0 1 0; 0 -1 0 1; 0 0 1 0; 0 0 0 1];
211  Position_current(1) = figure1.Position(3) - Position_cond(3);
212  Position_current(3) = Position_cond(3);
213  set(axes_current, 'Position', Position_current);
214 
215  % export the figures
216  print('-depsc2', fullfile(outputdir,[outfilename, '.eps']))
217  print('-dpdf', fullfile(outputdir,[outfilename, '.pdf']))
218  close(figure1)
219 
220 
221  end
222 
223 
224 
225 end
Structure hole contains the data about the antidot used in class antidot.
Definition: structures.m:23
Property width
The number of sites in the cross section.
Property height
The length of the scattering region in units of the lattice contant.
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:120
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
function display(message, nosilent)
Displays output messages on the screen.
Property coordinates
An instance of the structure coordinates.
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 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)