-
Notifications
You must be signed in to change notification settings - Fork 0
/
FILTER.pl
41 lines (32 loc) · 1.17 KB
/
FILTER.pl
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
#!/usr/bin/perl
print"SUBROUTINE FILTER OK \n";
sub filter{
local($file)=@_;
#chop($cms1 = `$leaexe/NBSDF.pl $file` );
$cms1=&nbsdf($file);
# apply FILTER
if($param{FILTER}){
print "FILTER by DRUG $paramdrug \n";
chop($rep3 =`perl $leaexe/DRUG.pl $file $paramdrug 1`);
#print "$rep3\n" if($param{VERBOSITY} >= 1);
if(!-e "druglike.sdf"){
print "Warning in filtering: all molecules are discarded !\n\n";
unlink "notdruglike.sdf";
unlink $file;
$memo_remark[$memoi]=$memo_remark[$memoi]."filtering discards all molecules\n";
}
else{
print "Remove non druglike\n\n" if($param{VERBOSITY} >= 1);
rename ("druglike.sdf","$file");
unlink "notdruglike.sdf";
#chop($cms2 = `$leaexe/NBSDF.pl $file` );
$cms2=&nbsdf($file);
print "$file : $cms2 molecules after filtering\n" if($param{VERBOSITY} >= 1);
if($cms2 != $cms1){
print "$file : $cms1 molecules before filtering and $cms2 molecules after filtering\n";
$memo_remark[$memoi]=$memo_remark[$memoi]."$cms1 molecules before filtering and $cms2 molecules after filtering\n";
};
};
};
};
####################################################################################