feature: displacement instead of time
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Fri, 7 Aug 2009 12:05:35 +0000 (14:05 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Fri, 7 Aug 2009 12:05:35 +0000 (14:05 +0200)
vasp_tools/visualize

index 7cc4496..74b352b 100755 (executable)
@@ -40,6 +40,7 @@ bx1=""; by1=""; bz1="";
 bcr="";
 clx="0"; cly="0"; clz="0";
 extra=0
+displace=""
 
 # parse argv
 
@@ -60,6 +61,7 @@ while [ "$1" ]; do
                -B)             bcr=$2;                 shift 2;;
                -C)             lc=$2;                  shift 2;;
                -e)             extra=1;                shift 1;;
+               -D)             displace=$2;            shift 2;;
                *)
                                echo "options:"
                                echo "########"
@@ -305,7 +307,11 @@ EOF
        # mv png
        $POVRAY temp.pov > /dev/null 2>&1
        time=`basename $file | awk -F. '{ print $1 }' | awk -F_ '{ print $3 }'`
+       if [ ! -z $displace ]; then
+       convert $COPTS -draw "text 5,20 'd = $displace %'" temp.png temp.png
+       else
        convert $COPTS -draw "text 5,20 't = $time fs'" temp.png temp.png
+       fi
        mv temp.png `echo $file | sed 's/\.xyz/\.png/'`
 
 done