1 % DC Josephson current through an SSH chain including a topological band inversion - Based on EQuUs v4.7
2 % Copyright (C) 2016 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:
19 if ~exist(
'filenum',
'var')
26 filename = mfilename('fullpath');
27 [directory, fncname] = fileparts( filename );
29 outfilename = [fncname,'_',num2str( filenum )];
43 inputXML1 = fullfile( directory, 'Basic_Input_SSH_Josephson_1.xml');
44 inputXML2 = fullfile( directory, 'Basic_Input_SSH_Josephson_2.xml');
50 currentvec_continuum = [];
51 currentvec_continuum_scattering = [];
56 currentvec_1range = [];
69 deltaPhi = pi/(phi_db+1);
70 phi2vec = 0:deltaPhi:pi;
79 DeltaPhi_vec = phi2vec - phi1;
84 % continuum contribution
85 SNSJosephson_handles =
SNSJosephson('ribbon', combineribbons, 'gfininvfromHamiltonian', 1);
86 if isempty(currentvec_continuum_scattering)
87 % [currentvec_continuum_scattering, current_surf] = SNSJosephson_handles.CurrentCalc_continuum( DeltaPhi_vec, 'Edb', Edb );
88 % save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
91 if isempty(currentvec_continuum)
92 currentvec_continuum = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'CONT', 'Edb', Edb );
93 save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
97 % contribution from Andreev bound states
98 if isempty(currentvec_ABS)
99 currentvec_ABS = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'ABS', 'Edb', Edb );
100 save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
104 % contribution from normal bound states
105 if isempty(currentvec_NBS)
106 currentvec_NBS = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'NBS', 'Edb', Edb );
107 save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
111 if isempty(currentvec_1range)
112 currentvec_1range = SNSJosephson_handles.CurrentCalc_discrete( DeltaPhi_vec, 'range', 'ALL', 'Edb', Edb );
113 save( [outputdir,'/',outfilename,'.mat'], 'DeltaPhi_vec', 'currentvec_continuum', 'currentvec_continuum_scattering', 'current_surf', 'currentvec_ABS', 'currentvec_NBS', 'currentvec_1range', 'width', 'height', 'EF', 'Edb');
124 %% sets the output directory
126 resultsdir = 'results';
127 resultsdir = fullfile( directory, resultsdir );
129 outputdir = resultsdir;
136 Ribbons{1} =
Ribbon(
'E', 0,
'EF', EF,
'width', width,
'height', height,
'silent', silent,
'phi', [phi1, phi1+DeltaPhi_vec(1)],
'filenameIn', inputXML1,
'filenameOut', fullfile( outputdir, [outfilename,
'_1.xml']) );
137 Ribbons{2} =
Ribbon(
'E', 0,
'EF', EF,
'width', width,
'height', height,
'silent', silent,
'phi', [phi1, phi1+DeltaPhi_vec(1)],
'filenameIn', inputXML2,
'filenameOut', fullfile( outputdir, [outfilename,
'_2.xml']) );
154 Position = [0.18 0.18 0.53 0.53];
155 axes1 = axes('Parent',figure1, 'Position', Position,...
157 'FontSize', fontsize,... 'xlim', x_lim,... 'ylim', y_lim,... 'XTick', XTick,... 'YTick', YTick,...
159 'FontName','Times New Roman');
163 xlabel('\Delta\phi/\pi','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes1);
166 ylabel('I','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes1);
170 if ~isempty( currentvec_continuum )
171 indexes = logical( currentvec_continuum );
172 plot(DeltaPhi_vec(indexes)/pi, currentvec_continuum(indexes), 'b-', 'Parent', axes1)
173 legend_labels{end+1} =
'CONT';
176 if ~isempty( currentvec_continuum_scattering )
177 indexes = logical( currentvec_continuum_scattering );
178 plot(DeltaPhi_vec(indexes)/pi, currentvec_continuum_scattering(indexes),
'b--',
'Parent', axes1)
179 legend_labels{end+1} =
'CONT S-matrix';
182 if ~isempty( currentvec_ABS )
183 indexes = ~isnan( currentvec_ABS );
184 plot(DeltaPhi_vec(indexes)/pi, currentvec_ABS(indexes),
'Linestyle',
'-',
'Color', [0 0.83 0],
'Parent', axes1)
185 legend_labels{end+1} =
'Andreev bound states';
188 if ~isempty( currentvec_NBS )
189 indexes = ~isnan( currentvec_NBS );
190 plot(DeltaPhi_vec(indexes)/pi, currentvec_NBS(indexes),
'r-',
'Parent', axes1)
191 legend_labels{end+1} =
'Normal bound states';
194 if (~isempty( currentvec_NBS )) && (~isempty( currentvec_continuum )) && (~isempty( currentvec_NBS ))
195 total = currentvec_continuum+currentvec_ABS+currentvec_NBS;
196 indexes = ~isnan( total );
197 plot(DeltaPhi_vec(indexes)/pi, total,
'k-',
'Parent', axes1)
198 legend_labels{end+1} =
'Total current';
202 if ~isempty( currentvec_1range )
203 indexes = ~isnan( currentvec_1range );
204 plot(DeltaPhi_vec(indexes)/pi, currentvec_1range(indexes),
'c-',
'Parent', axes1)
205 legend_labels{end+1} =
'ALL';
210 fig_legend = legend(axes1, legend_labels);
211 set(fig_legend,
'FontSize', fontsize,
'FontName',
'Times New Roman',
'Box',
'off',
'Location',
'NorthEast')
214 xlabel('\Delta\phi/\pi')
218 print('-depsc2', fullfile(outputdir, [outfilename,'.eps']))
A class for calculations on a ribbon of finite width for equilibrium calculations mostly in the zero ...
A class to calculate the DC Josephson current.
function currentVSDeltaPhi()
function SSH_Josephson(filenum)
An object for combining multiple ribbon parts of equal width and from the same material in a two term...