Skip to content

Commit

Permalink
debug @exception due to Matching sequence
Browse files Browse the repository at this point in the history
debug @exception due to Matching sequence
  • Loading branch information
dadaoqiuzhi committed Feb 5, 2024
1 parent bd7b7b1 commit fc85809
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion species/MWevolution_new.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
if exist('outputdata','var') && strcmpi(rerunans,'y')
tic
disp('MWevolution_new is running, please wait...')
datadelimiter={'C','H','O','N','He','Li','Be','B','F','Ne','Na','Mg','Al','Si','P','S','Cl','Ar','K','Ca','Sc','Ti','V','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As','Se','Br','Kr','Pd','Ag','Cd','In','Sn','Sb','I','Xe','Cs','Ba','Pt','Au','Hg','Pb'};
%long characters in datadelimiter should be list first to avoid find such case: (1) target Cl but find/match C, (2) target Na but find/match N
datadelimiter={'Li','Be','He','Ne','Na','Mg','Cl','Ar','Ca','Sc','Ti','Al','Si','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As','Se','Br','Kr','Pd','Ag','Cd','In','Sn','Sb','Xe','Cs','Ba','Pt','Au','Hg','Pb','M','C','H','O','N','B','F','P','S','K','V','I'};
matchdataMD=[];[row,col]=size(outputdata);
for i=4:col
[C,matches]=strsplit(outputdata{1,i},datadelimiter,'CollapseDelimiters',false);
Expand Down
3 changes: 2 additions & 1 deletion species/species_classfy.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
tarclass=lower(tarclass);
sumans=input('Sum the data? y/n:\n','s');
sumans=lower(sumans);
datadelimiter={'C','H','O','N','+','-','M','ele','eleonly','He','Li','Be','B','F','Ne','Na','Mg','Al','Si','P','S','Cl','Ar','K','Ca','Sc','Ti','V','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As','Se','Br','Kr','Pd','Ag','Cd','In','Sn','Sb','I','Xe','Cs','Ba','Pt','Au','Hg','Pb'};
%long characters in datadelimiter should be list first to avoid find such case: (1) target Cl but find/match C, (2) target Na but find/match N
datadelimiter={'eleonly','ele','Li','Be','He','Ne','Na','Mg','Cl','Ar','Ca','Sc','Ti','Al','Si','Cr','Mn','Fe','Co','Ni','Cu','Zn','Ga','Ge','As','Se','Br','Kr','Pd','Ag','Cd','In','Sn','Sb','Xe','Cs','Ba','Pt','Au','Hg','Pb','M','C','H','O','N','+','-','B','F','P','S','K','V','I'};
outputdatast=outputdata(1,:);
fprintf('\nif the exported data only have three column, not hit the interested species, please delet the irrelevant data in the work space\n')
if tarclass=='a'||tarclass=='b'
Expand Down

0 comments on commit fc85809

Please sign in to comment.