-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrot29_1_sortconfs.m
executable file
·68 lines (52 loc) · 1.46 KB
/
rot29_1_sortconfs.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
60
61
62
63
64
65
66
67
68
%rot29: sort XyyyZ conformations by bbb values
%
% Version 1.0
% Last modified R O Zhurakivsky 2008-05-19
% Created R O Zhurakivsky 2006-?-?
tic
clear
format compact
global pind
atomsind
moltype=8
usedpackage='Gaussian'
theory='mp2V2'
onlyoriginal=1; % process db with only original conformations
workdbname=['r' int2str(moltype)]
if usedpackage=='Gaussian'
workdbname=[workdbname '_g'];
end
if ~strcmp(theory,'dft')
workdbname=[workdbname '_' theory];
end
if onlyoriginal
templ='_or';
workdbname = [workdbname templ];
end
workdbname=[CD.dbdir filesep workdbname '.mat']
load(workdbname,'workdb')
recnum=numel(workdb);
tailsconf=char(recnum,3);
sdesclen=numel(workdb(1).prop.sdesc);
sdesc={};
sdesc4sort=char(zeros(recnum,sdesclen));
for i=1:recnum
tailsconf(i,1:3) = workdb(i).prop.sdesc(2:4);
sdesc{i} = workdb(i).prop.sdesc;
if sdesclen==5
sdesc4sort(i,1:end) = [ workdb(i).prop.sdesc(5) workdb(i).prop.sdesc(1) workdb(i).prop.sdesc(2:4) ];
else
sdesc4sort(i,1:end) = workdb(i).prop.sdesc;
end
end
tailsconfu=unique(tailsconf,'rows');
uniqtailnum=size(tailsconfu,1);
for i=1:uniqtailnum
inds=find(sum(tailsconf==repmat(tailsconfu(i,:),recnum,1),2)==3);
[XXX,II]=sortrows(sdesc4sort(inds,:));
inds = inds(II);
disp(sdesc(inds))
end
disp(['Total conformations: ' int2str(recnum)])
disp(['Total unique yyy combinations: ' int2str(uniqtailnum)])
toc