Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
SSH_transport.m
Go to the documentation of this file.
1 % Transport through an SSH chain including a topological band inversion - Based on EQuUs v4.7
2 % Copyright (C) 2016 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 %%
18 function SSH_transport( filenum )
19 
20 if ~exist('filenum', 'var')
21  filenum = 1;
22 end
23 
24 filename = mfilename('fullpath');
25 [~, fncname] = fileparts( filename );
26 
27 outfilename = [fncname,'_',num2str( filenum )];
28 outputdir = [];
30 
31 
32 EF = 0;
33 width = 1;
34 height = 30;
35 silent = 0;
36 
37 
38 
39 Emin = 1e-3;
40 Emax = 0.15;
41 Edb = 100;
42 Evec = Emin:(Emax-Emin)/(Edb-1):Emax;
43 Conductance = [];
44 DeltaC = [];
45 nyitott_csatornak = [];
46 
47 inputXML1 = 'Basic_Input_SSH_1.xml';
48 inputXML2 = 'Basic_Input_SSH_2.xml';
49 
50 
51 Ribbons = cell(2,1);
52 combineribbons = [];
53 
54 
55 Transport();
56 Egeszabra();
57 
58 
59 
62 
63 
64  Conductance = NaN(size(Evec));
65  DeltaC = NaN(size(Evec));
66  nyitott_csatornak = NaN(size(Evec));
67 
68 
69  createRibbons();
70  combineribbons = CombineRibbons('Ribbons', Ribbons);
71 
72 
73 
74 
75  for idx = 1:length(Evec)
76  [Conductance_tmp, ny_tmp, DeltaC_tmp] = combineribbons.Transport( Evec(idx) );
77  Conductance(idx) = Conductance_tmp;
78  DeltaC(idx) = DeltaC_tmp;
79  nyitott_csatornak(idx) = ny_tmp(1);
80  Egeszabra()
81 
82 
83  save( [outputdir,'/',outfilename], 'EF', 'width', 'nyitott_csatornak', 'DeltaC', 'height', 'Evec', 'Conductance' );
84  disp([ num2str(idx/length(Evec)*100),' % calculated of the conductance.'])
85  disp( ' ' )
86 
87  end
88 
89 end
90 
91 %% sets the output directory
93  resultsdir = 'results';
94  mkdir(resultsdir );
95  outputdir = resultsdir;
96  end
97 
98 
100 % Fills ribbon list
102  Ribbons{1} = Ribbon('E', Evec(1), 'EF', EF, 'width', width, 'height', height, 'silent', silent, 'filenameIn', inputXML1, 'filenameOut', fullfile( outputdir, [outfilename,'_1.xml']) );
103  Ribbons{2} = Ribbon('E', Evec(1), 'EF', EF, 'width', width, 'height', height, 'silent', silent, 'filenameIn', inputXML2, 'filenameOut', fullfile( outputdir, [outfilename,'_2.xml']) );
104 end
105 
106 
107 
108 
109 
110 %% Egeszabra
111  function Egeszabra()
112 
113  figure1 = figure();
114  fontsize = 9;
115 
116  %% Conductivity
117 
118  %x_lim = [min(coordinates.x(:,1)) max(coordinates.x(:,1)) ];
119  %x_lim = [0 rightside];
120 
121 
122  %y_lim = [0 2];
123 
124  indexek = logical( (abs(DeltaC) <= 0.5) & ~isnan(DeltaC) );
125  x_lim = [0 max(Evec)];
126 
127  if norm(x_lim) == 0
128  x_lim = [0 1];
129  end
130 
131  Position = [0.08 0.58 0.53 0.3];
132  axes_cond = axes('Parent',figure1, 'Position', Position,...
133  'Visible', 'on',...
134  'FontSize', fontsize,...
135  'xlim', x_lim,... 'ylim', y_lim,... 'XTick', XTick,... 'YTick', YTick,...
136  'Box', 'on',...
137  'FontName','Times New Roman');
138  hold on;
139 
140 
141  numerics = plot(Evec(indexek), Conductance(indexek), 'Linewidth', 2, 'color', [0 0 0], 'Parent', axes_cond);
142  %plot(Widthvec(indexek), nyitott_csatornak(indexek), 'Linewidth', 1, 'color', [1 0 0], 'Parent', axes_cond);
143  try
144  plot(Evec(indexek), DeltaC(indexek), 'Linewidth', 1, 'color', [0 1 0], 'Parent', axes_cond);
145  catch
146  disp('No DeltaC data present')
147  end
148 
149 
150 
151 
152  % Create xlabel
153  xlabel('E [eV]','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
154 
155  % Create ylabel
156  ylabel('\sigma/\sigma_0','FontSize', fontsize,'FontName','Times New Roman', 'Parent', axes_cond);
157 
158 
159 
160  fig_legend = legend(axes_cond, {'conductance', 'unitarity error'});%, 'FontSize', fontsize, 'FontName','Times New Roman')
161  set(fig_legend, 'FontSize', fontsize, 'FontName','Times New Roman', 'Box', 'off', 'Location', 'NorthEast')
162 
163 
164  print('-depsc2', [outputdir,'/',outfilename,'.eps'])
165  close(figure1)
166 
167 
168  end
169 
170 
171 
172 
173 end
A class for calculations on a ribbon of finite width for equilibrium calculations mostly in the zero ...
Definition: Ribbon.m:34
function CalculateTransport()
Calculates the conductance.
function Egeszabra()
function()
function createRibbons()
function SSH_transport(filenum)
function setOutputDir()
function Transport()
An object for combining multiple ribbon parts of equal width and from the same material in a two term...