check whether transformed selective dynamics are used and change offset
[physik/posic.git] / vasp_tools / visualize_contcar
index d272d18..f25d155 100755 (executable)
@@ -223,7 +223,14 @@ EOF
 
        # atoms
        ((count=1))
-       ((offset=8))
+       checktsd=`sed -n 7p $file | awk '{ print $1 }'`
+       if [ "$checktsd" = "Transformed" ]; then
+               ((offset=9))
+               echo "tsd: yes, offset = $offset"
+       else
+               ((offset=8))
+               echo "tsd: no, offset = $offset"
+       fi
        while [ "1" ]; do
 
        echo -en "$count "