added source code
[unres.git] / bin / cluster / cluster-unres.csh
1 #!/bin/csh -f
2 # Script to run the program unres (serial version).
3 #
4 if ($#argv<2) then
5   echo "USAGE: unres_clust.csh INPUT INTIN [OUTPUT]"
6   exit (1)
7 endif
8
9 set BIN = /users/kdm/adaml/UNRES/bin
10 setenv INPUT $1
11 setenv INTIN $2
12 if ($#argv<3) then
13   setenv OUTPUT $2
14 else
15   setenv OUTPUT $3
16 endif
17
18 # Check for the existence of the input file
19
20 if (!(-e $1.inp)) then
21   echo "Error: The input file $1.inp does not exist."
22   exit(1)
23 endif
24
25 if (!(-e $2.int)) then
26   echo "Error: The input internal coordinate file $2.int does not exist."
27   exit(1)
28 endif
29
30 time ${BIN}/unres_clustMD
31
32 # Clear empty files
33 foreach zbior (`/bin/ls ${INTIN}.* ${OUTPUT}.* `)
34   ls -l $zbior
35   if (-z $zbior) /bin/rm $zbior
36 end