0001
0002
0003
0004
0005
0006
0007 function [s,snolist] = mGetPDBFilenames(void)
0008
0009 a = dir(['PDBFiles' filesep '*.pdb']);
0010 a = [a; dir(['PDBFiles' filesep '*.PDB'])];
0011 a = [a; dir(['PrecomputedData' filesep '*.mat'])];
0012 a = [a; dir(['PrecomputedData' filesep '*.MAT'])];
0013
0014 p = path;
0015 c = [0 strfind(p,pathsep) length(p)+1];
0016 for i=1:length(c)-1,
0017 a = [a; dir([p(c(i)+1:c(i+1)-1) filesep '*.pdb'])];
0018 end
0019
0020 if ~isempty(a)
0021 for i=1:length(a)
0022 temp{i} = regexprep(a(i).name,'.mat|.MAT|.PDB1|.pdb1|.PDB2|.pdb2|.PDB3|.pdb3|.PDB4|.pdb4|.PDB5|.pdb5|.PDB6|.pdb6|.PDB7|.pdb7|.PDB8|.pdb8','');
0023 temp{i} = regexprep(temp{i},'.pdb|.PDB ','');
0024 temp{i} = regexprep(temp{i},'_small','');
0025 if ~isempty(strfind(temp{i},'_list')),
0026 temp{i} = [' ' temp{i}];
0027 end
0028 end
0029
0030 temp = [' AllFiles_list' temp];
0031
0032 [t,i] = sort(upper(temp));
0033 temp = temp(i);
0034
0035 for i=1:length(temp),
0036 temp{i} =regexprep(temp{i},' ','');
0037 end
0038
0039 s{1,1}=temp{1};
0040 count=2;
0041 for i=2:length(temp)
0042 if ~strcmpi(temp{i},s{count-1,1})
0043 s{count,1}=temp{i};
0044 count=count+1;
0045 end
0046 end
0047
0048 count = 1;
0049
0050 for i = 1:length(s(:,1)),
0051 if isempty(strfind(s{i,1},'_list')),
0052 snolist{count,1} = s{i,1};
0053 count = count + 1;
0054 end
0055 end
0056
0057 else
0058 s = [];
0059 snolist = [];
0060 end
0061