]> hackdaworld.org Git - physik/posic.git/commitdiff
pc script
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Sun, 13 Sep 2009 11:43:44 +0000 (13:43 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Sun, 13 Sep 2009 11:43:44 +0000 (13:43 +0200)
vasp_tools/pc_script [new file with mode: 0755]

diff --git a/vasp_tools/pc_script b/vasp_tools/pc_script
new file mode 100755 (executable)
index 0000000..59bd85f
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+if [ ! -d $1 ]; then
+       echo "not a valid directory ..."
+       exit
+fi
+
+if [ ! -f $1/OUTCAR ]; then
+       echo "no vasp data found in $1 ..."
+       exit
+fi
+
+if [ ! -d $1/video ]; then
+       echo "no video directory found ..."
+       echo "forgot to run outcar2moldyn?"
+       exit
+fi
+
+echo
+echo "WARNING !!!!"
+echo "-> reading in sx sy and sz is not correct ..."
+echo "WARNING !!!!"
+echo
+
+line=`sed -n -e '/length of/,/FORCES/p' $1/OUTCAR | grep ^\ \ \  | tail -1`
+
+sx=`echo $line | awk '{ print $1 }'`
+sy=`echo $line | awk '{ print $2 }'`
+sz=`echo $line | awk '{ print $3 }'`
+
+file=`ls $1/video/atomic_conf*.xyz | tail -1`
+
+echo "running on $file using $sx $sy $sz ..."
+
+./pc_calc $file $sx $sy $sz | grep ^pc | \
+       awk '{ print $2 " " $3 " " $4 " "$5 }' > pc.txt
+
+echo "done"
+