Merge branch 'prerelease-3.2.1' into czarek
[unres.git] / examples / CLUSTER / CSA / cluster-unres.csh
diff --git a/examples/CLUSTER/CSA/cluster-unres.csh b/examples/CLUSTER/CSA/cluster-unres.csh
new file mode 100755 (executable)
index 0000000..89401ba
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/csh -f
+# Script to run the program unres (serial version).
+#
+if ($#argv<2) then
+  echo "USAGE: unres_clust.csh INPUT INTIN [OUTPUT]"
+  exit (1)
+endif
+
+set BIN = /users/bartek/UNRESPACK/unres/bin/cluster
+setenv INPUT $1
+setenv INTIN $2
+if ($#argv<3) then
+  setenv OUTPUT $2
+else
+  setenv OUTPUT $3
+endif
+
+# Check for the existence of the input file
+
+if (!(-e $1.inp)) then
+  echo "Error: The input file $1.inp does not exist."
+  exit(1)
+endif
+
+if (!(-e $2.int)) then
+  echo "Error: The input internal coordinate file $2.int does not exist."
+  exit(1)
+endif
+
+time ${BIN}/unres_clustMD
+
+# Clear empty files
+foreach zbior (`/bin/ls ${INTIN}.* ${OUTPUT}.* `)
+  ls -l $zbior
+  if (-z $zbior) /bin/rm $zbior
+end