From a971048b5d4f6da8806256ae25800ac9d55c9724 Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 21 Sep 2009 19:30:45 +0200 Subject: [PATCH] make stdvis more comfortable to use (at least for me) --- vasp_tools/stdvis | 59 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/vasp_tools/stdvis b/vasp_tools/stdvis index 12c7cd6..ceb7e1a 100755 --- a/vasp_tools/stdvis +++ b/vasp_tools/stdvis @@ -1,14 +1,63 @@ +#!/bin/bash + if [ -z "$1" ]; then + echo "specify a directory ..." exit fi -./visualize -w 640 -h 480 -d $1/video \ - -nll -1.06 -1.06 -1.06 -fur 2.06 2.06 2.06 \ +if [ -z "$2" ]; then + type="default" +else + type=$2 +fi + +for i in $1/video*; do + + +# first unit cell in each direction without rotation +if [ "$type" = "default" -o "$type" = "1" ]; then +echo "type: 1 no rotation" +./visualize -w 640 -h 480 -d $i \ + -nll -0.20 -0.20 -0.20 -fur 1.20 1.20 1.20 \ -b 0.0 0.0 0.0 1.0 1.0 1.0 \ - -c 0.3 -2.5 1.1 -L 0.5 0.5 0.4 \ + -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \ + -r 0.6 +fi + +# three unit cells in each direction without rotation +if [ "$type" = "3" ]; then +echo "type: 3 no rotation" +./visualize -w 640 -h 480 -d $i \ + -nll -0.20 -0.20 -0.20 -fur 3.20 3.20 3.20 \ + -b 0.0 0.0 0.0 3.0 3.0 3.0 \ + -c 2.3 -3.7 2.4 -L 1.5 -1.0 1.5 \ + -r 0.6 +fi + +# first unit cell rotated by 45 degrees about z-axis +if [ "$type" = "1r" ]; then +echo "type: 1 rotated" +./visualize -w 640 -h 480 -d $i \ + -nll -0.20 -0.70 -0.20 -fur 2.00 0.70 1.20 \ + -c -0.5 -1.5 0.9 -L 1.0 0.0 0.5 \ -r 0.6 + #-b 0.0 0.0 0.0 0.0 0.0 1.0 \ +fi + +# 100 db in type 1 sc (insdide sc) +#for i in $1/video/atomic_conf_*.xyz; do +# displace=`echo $i | awk -F_ '{ print $5 }' | sed 's/\.xyz//'` +#echo "$i $displace ..." +#./visualize -w 640 -h 480 -d $i \ +# -nll 1.44 -0.56 0.84 -fur 2.56 0.56 2.06 \ +# -b 1.5 -0.5 1.0 2.5 0.5 2.0 \ +# -c 2.1 -2.0 1.6 -L 2.0 0 1.5 \ +# -r 0.6 -B 0.1 -D $displace +#done + +./ppm2avi $i -./ppm2avi $1/video +done -mplayer $1/video/md.avi +#mplayer $1/video/md.avi -- 2.20.1