1 %% Energy resolved current density across a biased normal-superconductor
interface 2 % Copyright (C) 2018 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 energy resolved current density across a biased normal-superconductor interface
21 %> @
param filenum The identification number of the filenema
for the exported data (
default is 1).
23 %> EQuUs v4.9 or later
29 %> @brief Example to calculate the energy resolved current density across a biased normal-superconductor
interface 30 %> @
param filenum The identification number of the filenema
for the exported data (
default is 1).
33 if ~exist(
'filenum',
'var')
37 filename = mfilename('fullpath');
38 [directory, fncname] = fileparts( filename );
40 % filename containing the output XML
41 outfilename = [fncname, '_',num2str( filenum )];
45 % filename of the input parametersubuntu download usb installer
46 filenameIn = [fncname, '.xml'];
48 % The width of the junction
51 % The length of the junction
54 % number of energy points on the energy contour
56 % the superconducting pair potential
62 % set the width and length of the junction
65 % creating the output directory
70 % the calculated current through the contacts
73 % calculate the Josephson current
76 % Plot the calculated results
81 %> @brief setting the width and length of the junction
84 for idx = 1:length(
param.Leads )
85 param.Leads{idx}.M = width;
96 % turning on the BdG model
100 bias_leads = [0.00 0.15];
102 % chemical potential in the central device
105 % set
new temperature value
108 % setting the superconducting pair potentials in the leads
109 param.
Leads{1}.pair_potential = pair_potential;
115 cRibbon_K =
Ribbon_Keldysh(
'Opt',
Opt,
'param',
param,
'filenameOut', fullfile( outputdir, [outfilename,
'xml']), ...
116 'EF', EF,
'bias_leads', bias_leads,
'T', T);
118 % creating
class to calculate the Josephson effect
119 cCurrent_NEGF =
Current_NEGF(
Opt,
'junction', cRibbon_K,
'T', T,
'gfininvfromHamiltonian',
true );
121 % calculating the Josephson current
123 [currentvec, currentsurf, Evec] = cCurrent_NEGF.CurrentCalc_discrete( DeltaPhi_vec,
'Emin', EF-0.9*pair_potential,
'Emax', EF+1.45*pair_potential,
'Edb', Edb );
130 %> @brief Creates the plot
134 % creating figure in units of pixels
135 figure1 = figure(
'Units',
'Pixels',
'Visible',
'off');
137 % font size on the figure will be 16 points
140 %************** conductance **********************
142 % creating axes of the plot
143 axes_cond = axes(
'Parent',figure1, ...
145 'FontSize', fontsize,...
147 'Units',
'Pixels', ...
148 'FontName',
'Times New Roman');
152 plot(Evec*1000, real(currentsurf(:,2)),
'Linewidth', 2,
'color', [0 0 0],
'Parent', axes_cond);
157 xlabel(
'$$E\;[meV]$$',
'FontSize', fontsize,
'Interpreter',
'latex',
'FontName',
'Times New Roman',
'Parent', axes_cond);
160 ylabel(
'$$I\;[2e^2\Delta/\hbar]$$',
'FontSize', fontsize,
'Interpreter',
'latex',
'FontName',
'Times New Roman',
'Parent', axes_cond);
162 figure_pos = get( figure1,
'Position' );
164 %set the position of the axis
165 OuterPosition = get(axes_cond,
'OuterPosition');
166 OuterPosition(1) = 0;
167 OuterPosition(2) = 0;
168 OuterPosition(3) = figure_pos(3);
169 OuterPosition(4) = figure_pos(4);
170 set(axes_cond,
'OuterPosition', OuterPosition);
171 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];
172 set(axes_cond,
'Position', Position_cond);
174 % setting the position and margins of the plot, removing white
175 % spaces
for release dates greater than 2015
176 ver = version(
'-release');
177 if str2num(ver(1:4)) >= 2016
178 % setting the position and margins of the plot, removing white spaces
179 figure1.PaperPositionMode =
'auto';
180 fig_pos = figure1.PaperPosition;
181 figure1.PaperSize = [fig_pos(3) fig_pos(4)];
186 print('-depsc2', fullfile(outputdir,[outfilename, '.eps']))
187 print('-dpdf', fullfile(outputdir,[outfilename, '.pdf']))
199 %% sets the output directory
202 % determine the directory for the results
203 resultsdir = fullfile(pwd, 'results');
204 % determine the working directory
205 workingdir = fullfile(pwd);
207 % creating the working directory
209 % creating the results directory
211 outputdir = resultsdir;
A class representing a two-terminal structure defined on a preprogrammed lattices for steady state no...
A class describing an N-terminal geometry for equilibrium calculations mostly in the zero temperature...
lead_param Leads
A list of structures lead_param containing the physical parameters for the scattering region.
Structure Opt contains the basic computational parameters used in EQuUs.
function CalculateNSCurrent()
function PlotFunction()
Creates the plot.
BdG
Set 1 to use the Bogoliubov de Gennes model, 0 (default) for normal systems.
Structure param contains data structures describing the physical parameters of the scattering center ...
scatter_param scatter
An instance of the structure scatter_param containing the physical parameters for the scattering regi...
function setShape()
setting the width and length of the junction
An example to calculate the DC current at a non-equilibrium normal-superconductor interface.
function structures(name)
function NS_NEGF(filenum)
Example to calculate the energy resolved current density across a biased normal-superconductor interf...