-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrot13_4_rmconf.m
executable file
·59 lines (46 loc) · 1.26 KB
/
rot13_4_rmconf.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
%rot13_4: remove conformations from db from specified list
%
% Version 1.0
% Last modified R O Zhurakivsky 2008-05-19
% Created R O Zhurakivsky 2006-?-?
format compact
clear
atomsind
%----------------------------
moltype=240 %#ok
theory='dftV2' %#ok
onlyoriginal=0; % process db with only original conformations
if ~strcmp(theory,'dft')
theorystr = ['_' theory];
else
theorystr = '';
end
workdbname=[CD.dbdir filesep 'r' int2str(moltype) '_g' theorystr];
if onlyoriginal
templ='_or';
workdbname = [workdbname templ];
end
workdbname=[workdbname '.mat'] %#ok
workname='r24013' %#ok
fileslist.name=[CD.xyzdir filesep workname filesep 'fileslist'];
fileslist %#ok
tic
load(workdbname,'workdb')
recnum=numel(workdb);
sdesc={};
worktitle={};
filename={};
for i=1:recnum
sdesc(i) = {workdb(i).prop.sdesc};
worktitle(i) = {workdb(i).worktitle};
filename(i) = {workdb(i).filename};
end
rmfileset = textread(fileslist.name,'%s');
[rem,I]=setdiff(filename,rmfileset );
workdb_new=workdb(sort(I));
workdb = workdb_new;
dlm=strfind(workdbname,'.');
workdbnameold=[workdbname(1:dlm(end)-1) '~' workdbname(dlm(end):end)];
copyfile(workdbname,workdbnameold);
save(workdbname,'workdb')
toc