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 unit_tests Unit Tests
19 %> @file test_Graphene_kpoint_siesta.m
20 %> @brief Testfile to check SIESTA (dft)
interface on a graphene strip.
22 %> EQuUs v4.9.... or later
24 %> @brief Testfile to check functionalities of the SIESTA interface.
27 filename = mfilename(
'fullpath');
28 [directory, fncname] = fileparts( filename );
30 disp(
'***** test of SIESTA interface, Transport of grpahene strip with Hamiltonian from Siesta *****' );
32 Label =
'Graphene_siesta_DZ' 34 filenameIn = [
'Input_',Label,
'.xml'];
35 filenameOut = [
'output-',Label,
'.xml'];
39 check_conductivity = [2.999999844477542];
43 disp(
'***** test of SIESTA interface, Transport of Simplegraphene system with 1 transversal K-point *****' );
46 Conductivity = NaN(num,1);
47 Open_channels1 = NaN(num,1);
48 Open_channels2 = NaN(num,1);
51 %%
test of method of removing indices from the Hamiltonian
52 disp(
'***** test of SIESTA interface, Transport of Carbon chain with Hamiltonian from Siesta *****' );
58 for idx = 1:length(Evec)
59 cTwoTerminal =
NTerminal('filenameIn', fullfile( pwd, filenameIn), 'filenameOut', fullfile( filenameOut), 'Silent',1);
61 [Conductivity_tmp, ny_tmp, DeltaC_tmp] = cTwoTerminal.
Transport( Evec(idx), 'constant_channels', false, 'SelfEnergy', 1);
63 Conductivity(idx) = -Conductivity_tmp(1,1);
64 Open_channels1(idx) = ny_tmp(1);
65 Open_channels2(idx) = ny_tmp(2);
69 % checking conductances
70 checkpoint = max(Conductivity' - check_conductivity);
72 warning(['EQuUs:Tests:', fncname, ':checkpoint failed with error ', num2str( checkpoint)]);
A class describing an N-terminal geometry for equilibrium calculations mostly in the zero temperature...
function test(arg1, arg2)
Brief description of the function.
Structure Opt contains the basic computational parameters used in EQuUs.
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 ...
function structures(name)
function CalculateTransport()