Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
ValidateStructures.m
Go to the documentation of this file.
1 %% Eotvos Quantum Transport Utilities - ValidateStructures
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 filters Filters
18 %> @{
19 %> @file ValidateStructures.m
20 %> @brief This function verify the input structures #Opt and #param and create system specific data structures.
21 %> @}
22 %> @brief This function verify the input structures #Opt and #param and create system specific data structures.
23 %> @param Opt An instance of structure #Opt
24 %> @param param An instance of structure #param
25 %> @return [1] An instance of structure #Opt
26 %> @return [2] An instance of structure #param
27 function [Opt, param] = ValidateStructures( Opt, param )
28 
29 filename = mfilename('fullpath');
30 [directory, fncname] = fileparts( filename );
31 
32 
33 % checking the number of leads
34 if isempty( Opt.NofLeads )
35  Opt.NofLeads = length( param.Leads );
36 elseif length( param.Leads ) > Opt.NofLeads
37  warning(['EQuUs:Filters:', fncname], 'Structure param contains more leads as structure Opt. Reducing number of leads');
38 elseif length( param.Leads ) < Opt.NofLeads
39  error(['EQuUs:Filters:', fncname], 'Structure param contains less leads as structure Opt.');
40 end
41 
42 
43 % checking the lattice type
44 if isempty( Opt.Lattice_Type )
45  if isempty( Opt.custom_Hamiltonians )
46 
47  end
48 end
49 
50 Lattice_Type = Opt.Lattice_Type;
51 custom_Hamiltonians = Opt.custom_Hamiltonians;
52 
53  param.scatter = ConvertParamScatter( param.scatter );
54  for idx = 1:length( param.Leads )
55 
56  % handling obsolete XML parameter 'orientation'
57  if isfield( param.Leads{idx}, 'orientation' )
58  param.Leads{idx}.Lead_Orientation = param.Leads{idx}.orientation;
59  end
60 
61  param.Leads{idx} = ConvertParamLead( param.Leads{idx} );
62 
63  end
64 
65 %TODO
66 % check data consistency like LeadNum, orientation VS Lead_orientation
67 % create lattice specific data structures
68 
69  %% ConvertParam
70  %> @brief Convert structure param relsted to the scattering region to system specific structure.
71  %> @param param_in In stance of structure #param_scatter.
72  %> @return Returns with the system specific strucutre #param_scatter
73  function param = ConvertParamScatter( param_in )
74 
75  if strcmpi(custom_Hamiltonians, 'Siesta')
77  elseif strcmpi(custom_Hamiltonians, 'yaehmop')
79  elseif strcmpi(Lattice_Type, 'Square')
81  elseif strcmpi(Lattice_Type, 'SSH')
83  elseif strcmp(Lattice_Type, 'Lieb')
85  elseif strcmp(Lattice_Type, 'BiTeI')
87  elseif strcmp(Lattice_Type, 'Graphene')
89  elseif strcmpi(Lattice_Type, 'Graphene_Bilayer')
91  elseif strcmpi(Lattice_Type, 'Graphene_Bilayer_2')
93  elseif strcmpi(Lattice_Type, 'Graphene_Bilayer_3')
95  elseif strcmpi(Lattice_Type, 'Silicene')
97  elseif strcmpi(Lattice_Type, 'Triangle')
99  elseif strcmpi(Lattice_Type, 'TMDC_Monolayer')
101  elseif strcmpi(Lattice_Type, 'TMDC_Monolayer_SOC')
103  elseif strcmpi(Lattice_Type, 'TMDC_Bilayer_SOC')
105  elseif isempty(Lattice_Type)
106  param = param_scatter();
107  end
108 
109  param_fieldnames = fieldnames( param );
110  for iidx = 1:length( param_fieldnames )
111  fieldname = param_fieldnames{iidx};
112 
113  if ~isfield( param_in, fieldname )
114  continue
115  end
116 
117  param.(fieldname) = param_in.(fieldname);
118  end
119 
120 
121  end
122 
123  %% ConvertParam
124  %> @brief Convert structure param relsted to the scattering region to system specific structure.
125  %> @param param_in In stance of structure #param_Lead.
126  %> @return Returns with the system specific strucutre #param_Lead
127  function param = ConvertParamLead( param_in )
128 
129  if strcmpi(custom_Hamiltonians, 'Siesta')
130  param = param_Lead_DFT();
131  elseif strcmpi(custom_Hamiltonians, 'yaehmop')
132  param = param_Lead_DFT();
133  elseif strcmpi(Lattice_Type, 'Square')
135  elseif strcmpi(Lattice_Type, 'SSH')
136  param = param_SSH_Lead();
137  elseif strcmp(Lattice_Type, 'Lieb')
139  elseif strcmp(Lattice_Type, 'BiTeI')
141  elseif strcmp(Lattice_Type, 'Graphene')
143  elseif strcmpi(Lattice_Type, 'Graphene_Bilayer')
145  elseif strcmpi(Lattice_Type, 'Graphene_Bilayer_2')
147  elseif strcmpi(Lattice_Type, 'Graphene_Bilayer_3')
149  elseif strcmpi(Lattice_Type, 'Silicene')
151  elseif strcmpi(Lattice_Type, 'Triangle')
153  elseif strcmpi(Lattice_Type, 'TMDC_Monolayer')
155  elseif strcmpi(Lattice_Type, 'TMDC_Monolayer_SOC')
157  elseif strcmpi(Lattice_Type, 'TMDC_Bilayer_SOC')
159  elseif isempty(Lattice_Type)
160  param = param_Lead();
161  end
162 
163  param_fieldnames = fieldnames( param );
164  for iidx = 1:length( param_fieldnames )
165  fieldname = param_fieldnames{iidx};
166 
167  if ~isfield( param_in, fieldname )
168  continue
169  end
170 
171  param.(fieldname) = param_in.(fieldname);
172  end
173 
174 
175  end
176 
177 end
Base class to construct a structure containing physical parameters of a specific lead for DFT calcula...
Class containing physical parameters of a particular lead defined on a Triangle lattice.
Class containing physical parameters of a particular lead defined on a bilayer graphene lattice.
lead_param Leads
A list of structures lead_param containing the physical parameters for the scattering region.
Definition: structures.m:49
Class containing physical parameters of a scattering center defined on a bilayer graphene (hexagonal)...
Base class to construct a structure containing physical parameters of a specific lead.
Definition: param_Lead.m:26
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
NofLeads
Number of leads attached to the scattering region.
Definition: structures.m:82
function Transport(Energy, B)
Calculates the conductance at a given energy value.
Class containing physical parameters of a scattering center defined on a TMDC_Monolayer lattice.
Class containing physical parameters of a scattering center defined on a Lieb lattice.
Class containing physical parameters of a particular lead defined on a BiTeI lattice.
Class containing physical parameters of a particular lead defined on a TMDC_Monolayer lattice.
Class containing physical parameters of a scattering center defined on a TMDC_Monolayer lattice inclu...
Class containing physical parameters of a scattering center defined on a graphene (hexagonal) lattice...
Class containing physical parameters of a particular lead defined on a Lieb lattice.
Class containing physical parameters of a particular lead defined on a TMDC_Monolayer lattice includi...
Base class to construct a structure containing physical parameters of the scattering region for DFT c...
function ConvertParamLead(param_in)
Convert structure param relsted to the scattering region to system specific structure.
Class containing physical parameters of a scattering center defined on a Silicene lattice.
Class containing physical parameters of a particular lead defined on a Silicene lattice.
Class containing physical parameters of a particular lead defined on a square lattice.
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
Base class to construct a structure containing physical parameters of the scattering region.
Definition: param_scatter.m:26
Class containing physical parameters of a particular lead defined on a TMDC Bilayer lattice including...
Class containing physical parameters of a scattering center defined on a TMDC bilayer lattice includi...
function ConvertParamScatter(param_in)
Convert structure param relsted to the scattering region to system specific structure.
Class containing physical parameters of a particular lead defined on a SSH lattice.
function ValidateStructures(Opt, param)
This function verify the input structures Opt and param and create system specific data structures.
Class containing physical parameters of a scattering center defined on a square lattice.
Class containing physical parameters of a scattering center defined on a BiTeI lattice.
function structures(name)
Class containing physical parameters of a particular lead defined on a graphene lattice.
Class containing physical parameters of a scattering center defined on a SSH lattice.