Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
parseInput.m
Go to the documentation of this file.
1 %% Eotvos Quantum Transport Utilities - parseInput
2 % Copyright (C) 2009-2015 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 %> @file parseInput.m
18 %> @brief This function parses the input file containing the input parameters.
19 %
20 %> @brief This function parses the input file containing the input parameters.
21 %> @param filename A string containing the absolute path to the file containing the input data.
22 %> @return [1] An instance of structure #Opt.
23 %> @return [2] An instance of structure #param.
24 %%
25 function [ Opt, param ] = parseInput( filename )
26 
27 if isempty( filename )
28  error( 'EQuUs:parseInput', 'Input filename is empty.')
29 end
30 
31 if isempty( which(filename) )
32  error( 'EQuUs:parseInput', ['Input file "', filename,'" not found.'])
33 end
34 
35 % determine the filter type
36 [directory, name, ext] = fileparts(which(filename));
37 
38  if strcmpi( ext, '.xml' )
39  [Opt, param] = XMLinput( filename );
40  else
41  error('EQuUs:parseInput', ['Unrecognized file type: ', ext]);
42  end
43 
44 end
45 
46 
47 
48 
49 
Structure Opt contains the basic computational parameters used in EQuUs.
Definition: structures.m:60
function XMLinput(filename)
This function is an input filter that parses XML file and fills up the parameter structures necessary...
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.