Skip to content

Commit

Permalink
Merge pull request #473 from AlbertoCuadra/develop
Browse files Browse the repository at this point in the history
Update: rewrite funcions
  • Loading branch information
AlbertoCuadra committed Apr 15, 2022
2 parents 5d61e67 + 97a82bb commit f89c105
Show file tree
Hide file tree
Showing 3 changed files with 15,646 additions and 15 deletions.
7 changes: 2 additions & 5 deletions Databases/Functions/FullName2name.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
if isempty(name)
return
end
if name(end)=='+'
name=[name(1:end-1) 'plus'];
elseif name(end)=='-'
name=[name(1:end-1) 'minus'];
end
name = replace(name, '+', 'plus');
name = replace(name, '-', 'minus');
ind=regexp(name,'[()]');
name(ind)='b';
ind=regexp(name,'[.,+-]');
Expand Down
16 changes: 6 additions & 10 deletions Databases/Functions/get_speciesProperties.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Change lowercase 'l' to uppercase 'L'
species(strfind(species,'Al')+1)='L';
species(strfind(species,'Cl')+1)='L';
species(strfind(species,'Tl')+1)='L';
species(strfind(species,'Fl')+1)='L';
species = replace(species, 'Al', 'AL');
species = replace(species, 'Cl', 'CL');
species = replace(species, 'Tl', 'TL');
species = replace(species, 'Fl', 'FL');

% Store species name with parenthesis (i.e., the name appearing in NASA's
% document tables)
Expand All @@ -60,19 +60,15 @@
% by 'b' in order to format the species name as in the thermo.inp
% electronic database
name = species;
if name(end)=='+'
name=[name(1:end-1) 'plus'];
elseif name(end)=='-'
name=[name(1:end-1) 'minus'];
end
name = replace(name, '+', 'plus');
name = replace(name, '-', 'minus');
ind=regexp(name,'[()]');
name(ind)='b';
ind=regexp(name,'\W');
name(ind)='_';
if regexp(name(1),'[0-9]')
name=['num_' name];
end

species = name;

% If the given species does not exist in strDB, abort the program
Expand Down
Loading

0 comments on commit f89c105

Please sign in to comment.