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