#!/bin/csh
#$ -S /bin/csh
#$ -cwd
#$ -o /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadc/Filt-Enamine-300-400-xaadc-xea/CovFilt-Enamine-300-400-xaadc-xea-pattern.out
#$ -e /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadc/Filt-Enamine-300-400-xaadc-xea/CovFilt-Enamine-300-400-xaadc-xea-pattern.err 
#$ -t 1-1
hostname
date
#cd /scratch
#mkdir -p stefan/CovFilt-Enamine-300-400-xaadc-xea-pattern
#cd stefan/CovFilt-Enamine-300-400-xaadc-xea-pattern
#cp /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadc/Filt-Enamine-300-400-xaadc-xea/Filt-Enamine-300-400-xaadc-xea.smi .
set name=Filt-Enamine-300-400-xaadc-xea
set num1=`cat Filt-Enamine-300-400-xaadc-xea.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-xaadc-xea.smi filter-Filt-Enamine-300-400-xaadc-xea.smi
rm carboxylates.txt
set num2=`cat filter-Filt-Enamine-300-400-xaadc-xea.smi | wc -l`
echo "${name}	$num1	$num2 in 50000"
date
#cp -r filter-Filt-Enamine-300-400-xaadc-xea.smi /nfs/exa/work/stefan/Anions/MWT-300-400/carboxylates/Filt-Enamine-300-400-xaadc/Filt-Enamine-300-400-xaadc-xea/.
#cd ../
#rm -rf CovFilt-Enamine-300-400-xaadc-xea-pattern
