Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: rewrite funcions #473

Merged
merged 3 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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