-
Notifications
You must be signed in to change notification settings - Fork 5
/
HGSprintInfo.m
60 lines (53 loc) · 1.83 KB
/
HGSprintInfo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
function HGSprintInfo(species)
%**************************************************************************
%
% HGSprintInfo(species)
%
%**************************************************************************
%
% HGSprintInfo prints in the command window the info for a species
%
%**************************************************************************
% Inputs:
%--------------------------------------------------------------------------
% species --> A single species
%
% Outputs:
%--------------------------------------------------------------------------
% Command Window Print
%
%**************************************************************************
% *HGS 2.1
% *By Caleb Fuster, Manel Soria and Arnau Miró
% *ESEIAAT UPC
global HGSdata; HGSload();
id=HGSid(species);
if numel(id) ~= 1
error('Please call HGSprintInfo with just a component');
end
ns = length(HGSdata.Mm);
if ns >= id
fprintf('Species = %s, state = %s, <code = %d>\n',HGSdata.name{id},HGSdata.state{id},id);
ena=HGSdata.ena{id}; % element names
nat=HGSdata.nat{id};
ne=numel(ena); % number of elements
fprintf(' Composition: ');
for jj=1:ne
fprintf('%s-%d ',ena{jj},nat(jj));
end
fprintf('\n');
fprintf(' Mm = %.4f ',HGSdata.Mm(id));
fprintf('\n -----------------\n');
else
id2 = id-ns;
fprintf('Combination = <%s> <code = %d>\n',HGSdata.comb{id2},id);
cen=HGSdata.cspec{id2}; % combination element names
cna=HGSdata.cper{id2}; % combination element atoms
ne=numel(cna); % number of elements
fprintf(' Composition-- ');
for jj=1:ne
fprintf('%s: %.2f%%. ',cen{jj},cna(jj));
end
fprintf('\n -----------------\n');
end
end