#!/bin/csh
#$ -S /bin/csh
#$ -cwd
#$ -o /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadt/Filt-Enamine-300-400-xaadt-xbi/CovFilt-Enamine-300-400-xaadt-xbi-pattern.out
#$ -e /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadt/Filt-Enamine-300-400-xaadt-xbi/CovFilt-Enamine-300-400-xaadt-xbi-pattern.err 
#$ -t 1-1
hostname
date
#cd /scratch
#mkdir -p stefan/CovFilt-Enamine-300-400-xaadt-xbi-pattern
#cd stefan/CovFilt-Enamine-300-400-xaadt-xbi-pattern
#cp /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadt/Filt-Enamine-300-400-xaadt-xbi/Filt-Enamine-300-400-xaadt-xbi.smi .
set name=Filt-Enamine-300-400-xaadt-xbi
set num1=`cat Filt-Enamine-300-400-xaadt-xbi.smi | wc -l`
cp /mnt/nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/carboxylates.txt . 
source /nfs/soft/www/apps/zinc15/envs/production/env.csh
setenv molgrep /nfs/soft/tools/apps/molgrep/molgrep.py
$molgrep smarts -f carboxylates.txt Filt-Enamine-300-400-xaadt-xbi.smi filter-Filt-Enamine-300-400-xaadt-xbi.smi
rm carboxylates.txt
set num2=`cat filter-Filt-Enamine-300-400-xaadt-xbi.smi | wc -l`
echo "${name}	$num1	$num2 in 50000"
date
#cp -r filter-Filt-Enamine-300-400-xaadt-xbi.smi /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadt/Filt-Enamine-300-400-xaadt-xbi/.
#cd ../
#rm -rf CovFilt-Enamine-300-400-xaadt-xbi-pattern
