-
Notifications
You must be signed in to change notification settings - Fork 0
/
runall_ptg.sh
executable file
·62 lines (52 loc) · 1.52 KB
/
runall_ptg.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
#
# runall_ptg.sh - run ptgraph2.py on all locally downloaded PDB files
#
# Usage: runall_ptg.sh [ ptgraph2 options... ]
#
# $Id: runall_ptg.sh 4162 2010-09-12 04:18:38Z alexs $
#
# Now that there is ptgrunall_divpdb.sh for 'production' run over entire
# local 'divided' PDB structure, this script is used for quick testing
# by using the small (about 100) set of PDB files under
# /local/charikar/astivala/pdb
# Running on this subset takes about 1/4 hour, as opposed to a couple of
# weeks for the whole PDB.
#
myname=`basename $0`
mydir=$PWD
# location of PDB files (input)
##PDBDIR=/local/charikar/astivala/pdb
PDBDIR=/home/astivala/pdb
# output directory (.svg, .ps. output files created here)
# WARNING: contents overwritten if they exist
OUTDIR=output
# ptgraph executable
PTGRAPH=$mydir/ptgraph2.py
#default ptgraph2 options
DEFAULT_PTGOPTS="-r35 -c -t stride -k purple -uw -l crossing:black,red,green,navy,blue -b sequential -j -e auto -f auto -o gradient -q"
if [ $# -ge 1 ]; then
ptopts=$*
else
ptopts=${DEFAULT_PTGOPTS}
fi
if [ ! -d ${OUTDIR} ]; then
mkdir ${OUTDIR}
fi
version=`${PTGRAPH} -z`
echo "${myname}: ptgraph2 is ${version}"
echo "${myname}: ptgraph2 options are: ${ptopts}"
echo "${myname}: reading PDB files from ${PDBDIR}"
echo "${myname}: writing output files to ${OUTDIR}"
echo
cd ${OUTDIR}
for pdbfile in ${PDBDIR}/*.pdb
do
echo "${myname}: processing `basename ${pdbfile}`"
if [ ! -z "${ptopts}" ]; then
${PTGRAPH} ${ptopts} ${pdbfile}
else
${PTGRAPH} ${pdbfile}
fi
echo
done