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