1 %% Differential conductance and
IV curve
2 % Copyright (C) 2015 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 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).
23 %> Eur. Phys. J. B 53, 537-549 (2006).
25 %> EQuUs v4.8 or later
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).
36 if ~exist(
'filenum',
'var')
40 filename = mfilename('fullpath');
41 [directory, fncname] = fileparts( filename );
43 % filename containing the input XML
44 inputXML = 'Basic_Input.xml';
45 % Parsing the input file and creating data
structures 48 % filename containing the output XML
49 outfilename = [fncname, '_',num2str( filenum )];
52 % length of the junction
54 %
width of the junction
61 % The differential conductance as a function of the magnetiv field
62 diff_conductance = [];
63 % bias voltage at zero temperature
65 % The current at zero temperature
67 % bias voltage at non-zero temperature
69 % The current at non-zero temperature
72 % creating output directories
75 % Calculated the conductance
81 % export the calculeted data
82 save( [outputdir, filesep, outfilename,'.mat']);
85 %> @brief Calculates the conductance
86 function CalculateTransport()
88 % number of energy points
94 island.center.x = width;
95 island.center.y = height/2;
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']) );
101 % Setting the function
handle for the circkle-shaped hard wall potential
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');
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');
120 %> @brief Sets output directory.
121 function setOutputDir()
122 resultsdir = 'results';
124 outputdir = fullfile( directory, resultsdir );
131 %> @brief Creates the plot
132 function PlotFunction( )
135 % creating figure in units of pixels
136 figure1 = figure( 'Units', 'Pixels');
138 % font size on the figure will be 16 points
142 %************** conductance **********************
143 % setting the limits of the axis
147 % creating axes of the plot
148 axes_cond = axes('Parent',figure1, ...
150 'FontSize', fontsize,...
154 'Units', 'Pixels', ...
155 'FontName','Times New Roman');
159 plot(bias_T0*1000, real(diff_conductance), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_cond);
164 xlabel('E [meV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
167 ylabel('G [2e^2/h]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
170 %**************
IV curve **********************
172 % creating axes of the plot
173 axes_current = axes('Parent',figure1, ...
175 'FontSize', fontsize,...
178 'Units', 'Pixels', ...
179 'FontName','Times New Roman');
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);
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')
193 xlabel(
'U [meV]',
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Parent', axes_current);
196 ylabel(
'I [2U_{0}e^2/h]',
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Parent', axes_current);
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)];
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 );
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);
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);
224 print('-depsc2', fullfile(outputdir,[outfilename, '.eps']))
225 print('-dpdf', fullfile(outputdir,[outfilename, '.pdf']))
Structure hole contains the data about the antidot used in class antidot.
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.
function PlotFunction()
Creates the plot.
A class for calculations on a ribbon of finite width for equilibrium calculations mostly in the zero ...
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...
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 ...
function structures(name)