Merge branch 'prerelease-3.2.1'
[unres.git] / ctest / cluster_check.sh
diff --git a/ctest/cluster_check.sh b/ctest/cluster_check.sh
new file mode 100755 (executable)
index 0000000..11d2792
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if [ "$1" == "1l2y_clust_int" ]; then
+ file=1l2y_csa_GB000_clust.int
+else
+ exit 1
+fi
+
+# Check if file exist
+if [ ! -f $file ]; then
+    echo "CRITICAL: out $file does not exist"
+    exit 2
+fi
+
+fam=`grep THERE 1l2y_csa_GB000_clust.out|head -1|awk '{print $3}'`
+grep THERE 1l2y_csa_GB000_clust.out
+grep REMARK 1l2y_csa*[0-9][0-9][1-9].pdb
+
+ if [ "$fam" != "6" ]; then
+  echo 'ERROR: number of families not equal 6'
+  exit 1
+ fi
+