Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
test_graphene_siesta_SZ.m
Go to the documentation of this file.
1 %% Eotvos Quantum Transport Utilities
2 % Copyright (C) 2018 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 %> @addtogroup unit_tests Unit Tests
18 %> @{
19 %> @file test_Graphene_kpoint_siesta.m
20 %> @brief Testfile to check SIESTA (dft) interface on a graphene strip.
21 %> @Available
22 %> EQuUs v4.9.... or later
23 %> @}
24 %> @brief Testfile to check functionalities of the SIESTA interface.
25 function test_graphene_siesta_SZ( filenum )
26 
27  filename = mfilename('fullpath');
28  [directory, fncname] = fileparts( filename );
29 
30  disp( '***** test of SIESTA interface, Transport of grpahene strip with Hamiltonian from Siesta *****' );
31 
32  Label = 'Graphene_siesta_SZ'
33  % create input structures
34  filenameIn = ['Input_',Label,'.xml'];
35  filenameOut = ['output-',Label,'.xml'];
36  [Opt, param] = parseInput( filenameIn );
37 
38  Evec = [-3.2454];
39  check_conductivity = [2.999999844477542];
40 
41  format long;
42 
43  disp( '***** test of SIESTA interface, Transport of Simplegraphene system with 1 transversal K-point *****' );
44 
45  format long;
46 
47  disp( '***** test of SIESTA interface, Transport of Simplegraphene system with 1 transversal K-point *****' );
48 
49  num = length(Evec);
50  Conductivity = NaN(num,1);
51  Open_channels1 = NaN(num,1);
52  Open_channels2 = NaN(num,1);
53  format long;
54 
55  %% test of method of removing indices from the Hamiltonian
56  disp( '***** test of SIESTA interface, Transport of Carbon chain with Hamiltonian from Siesta *****' );
57 
59 
60  function CalculateTransport()
61 
62  for idx = 1:length(Evec)
63  cTwoTerminal = NTerminal('filenameIn', fullfile( pwd, filenameIn), 'filenameOut', fullfile( filenameOut), 'Silent',1);
64  DeltaC_tmp = 0;
65  [Conductivity_tmp, ny_tmp, DeltaC_tmp] = cTwoTerminal.Transport( Evec(idx), 'constant_channels', false, 'SelfEnergy', 1);
66 
67  Conductivity(idx) = -Conductivity_tmp(1,1);
68  Open_channels1(idx) = ny_tmp(1);
69  Open_channels2(idx) = ny_tmp(2);
70  end
71  end
72 
73  % checking conductances
74  checkpoint = max(Conductivity' - check_conductivity);
75  if checkpoint > 1e-7
76  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
77  Conductivity
78  end
79 
80 end
81 
82 
A class describing an N-terminal geometry for equilibrium calculations mostly in the zero temperature...
Definition: NTerminal.m:38
function test(arg1, arg2)
Brief description of the function.
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
function test_graphene_siesta_SZ(filenum)
Testfile to check functionalities of the SIESTA interface.
function Transport(Energy, B)
Calculates the conductance at a given energy value.
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
function parseInput(filename)
This function parses the input file containing the input parameters.
function CalculateTransport()
function structures(name)