]> hackdaworld.org Git - physik/posic.git/commitdiff
modified bond analyze + added a script
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 21 Aug 2008 11:36:11 +0000 (13:36 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 21 Aug 2008 11:36:11 +0000 (13:36 +0200)
bond_analyze.c
bond_analyze_script [new file with mode: 0755]

index 6c46251f14dd4ecd2b18a1bbb94c76f1a9028757..f9337fd4231e084c789aacc023039005977eb302 100644 (file)
@@ -55,7 +55,8 @@ int main(int argc,char **argv) {
        /* analyzing ... */
        bond_analyze(&moldyn,quality);
 
-       printf("[bond analyze] quality = %f | %f\n",quality[0],quality[1]);
+       printf("[bond analyze] t: %f | quality = %f | %f\n",
+               moldyn.time,quality[0],quality[1]);
 
        moldyn_free_save_file(&moldyn);
 
diff --git a/bond_analyze_script b/bond_analyze_script
new file mode 100755 (executable)
index 0000000..6b5736f
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ ! -d $1 ]; then
+       echo "$1 is not a directory"
+       exit 1
+fi
+
+echo "processing $1 ..."
+
+rm -f $1/bond_analyze.txt
+
+for i in $1/*.save; do
+       bai="`./bond_analyze $i | grep '\[bond' | grep quality`"
+       time=`echo $bai | awk '{ print $4 }'`
+       quality=`echo $bai | awk '{ print $8 }'`
+       echo "$time $quality" >> $1/bond_analyze.txt
+done
+
+echo "done"