make stdvis more comfortable to use (at least for me)
[physik/posic.git] / vasp_tools / stdvis
1 #!/bin/bash
2
3 if [ -z "$1" ]; then
4         echo "specify a directory ..."
5         exit
6 fi
7
8 if [ -z "$2" ]; then
9         type="default"
10 else
11         type=$2
12 fi
13
14 for i in $1/video*; do
15
16
17 # first unit cell in each direction without rotation
18 if [ "$type" = "default" -o "$type" = "1" ]; then
19 echo "type: 1 no rotation"
20 ./visualize -w 640 -h 480 -d $i \
21         -nll -0.20 -0.20 -0.20 -fur 1.20 1.20 1.20 \
22         -b 0.0 0.0 0.0 1.0 1.0 1.0 \
23         -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \
24         -r 0.6
25 fi
26
27 # three unit cells in each direction without rotation
28 if [ "$type" = "3" ]; then
29 echo "type: 3 no rotation"
30 ./visualize -w 640 -h 480 -d $i \
31         -nll -0.20 -0.20 -0.20 -fur 3.20 3.20 3.20 \
32         -b 0.0 0.0 0.0 3.0 3.0 3.0 \
33         -c 2.3 -3.7 2.4 -L 1.5 -1.0 1.5 \
34         -r 0.6
35 fi
36
37 # first unit cell rotated by 45 degrees about z-axis
38 if [ "$type" = "1r" ]; then
39 echo "type: 1 rotated"
40 ./visualize -w 640 -h 480 -d $i \
41         -nll -0.20 -0.70 -0.20 -fur 2.00 0.70 1.20 \
42         -c -0.5 -1.5 0.9 -L 1.0 0.0 0.5 \
43         -r 0.6
44         #-b 0.0 0.0 0.0 0.0 0.0 1.0 \
45 fi
46
47 # 100 db in type 1 sc (insdide sc)
48 #for i in $1/video/atomic_conf_*.xyz; do
49 #       displace=`echo $i | awk -F_ '{ print $5 }' | sed 's/\.xyz//'`
50 #echo "$i $displace ..."
51 #./visualize -w 640 -h 480 -d $i \
52 #       -nll 1.44 -0.56 0.84 -fur 2.56 0.56 2.06 \
53 #       -b 1.5 -0.5 1.0 2.5 0.5 2.0 \
54 #       -c 2.1 -2.0 1.6 -L 2.0 0 1.5 \
55 #       -r 0.6 -B 0.1 -D $displace
56 #done
57
58 ./ppm2avi $i
59
60 done
61
62 #mplayer $1/video/md.avi
63