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
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
151 % creating axes of the plot
152 axes_cond = axes('Parent',figure1, ...
154 'FontSize', fontsize,...
158 'Units', 'Pixels', ...
159 'FontName','Times New Roman');
163 plot(bias_T0*1000, real(diff_conductance), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_cond);
168 xlabel('E [meV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
171 ylabel('G [2e^2/h]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
174 %**************
IV curve **********************
176 % creating axes of the plot
177 axes_current = axes('Parent',figure1, ...
179 'FontSize', fontsize,...
182 'Units', 'Pixels', ...
183 'FontName','Times New Roman');
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);
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')
197 xlabel(
'U [meV]',
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Parent', axes_current);
200 ylabel(
'I [2U_{0}e^2/h]',
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Parent', axes_current);
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);
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);
216 print(
'-depsc2', fullfile(outputdir,[outfilename,
'.eps']))
217 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)