Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
test_graphene_siesta_DZ.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_DZ( 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_DZ'
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  num = length(Evec);
46  Conductivity = NaN(num,1);
47  Open_channels1 = NaN(num,1);
48  Open_channels2 = NaN(num,1);
49  format long;
50 
51  %% test of method of removing indices from the Hamiltonian
52  disp( '***** test of SIESTA interface, Transport of Carbon chain with Hamiltonian from Siesta *****' );
53 
55 
56  function CalculateTransport()
57 
58  for idx = 1:length(Evec)
59  cTwoTerminal = NTerminal('filenameIn', fullfile( pwd, filenameIn), 'filenameOut', fullfile( filenameOut), 'Silent',1);
60  DeltaC_tmp = 0;
61  [Conductivity_tmp, ny_tmp, DeltaC_tmp] = cTwoTerminal.Transport( Evec(idx), 'constant_channels', false, 'SelfEnergy', 1);
62 
63  Conductivity(idx) = -Conductivity_tmp(1,1);
64  Open_channels1(idx) = ny_tmp(1);
65  Open_channels2(idx) = ny_tmp(2);
66  end
67  end
68 
69  % checking conductances
70  checkpoint = max(Conductivity' - check_conductivity);
71  if checkpoint > 1e-7
72  warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
73  Conductivity
74  end
75 
76 
77 end
78 
79 
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_DZ(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 structures(name)
function CalculateTransport()