stdvis adapted to new visualize script
[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 if [ "$type" != "disp" ]; then
15
16 for i in $1/video*; do
17
18
19 # first unit cell in each direction without rotation
20 if [ "$type" = "default" -o "$type" = "1" ]; then
21 echo "type: 1 no rotation"
22 ./visualize -w 640 -h 480 -d $i \
23         -nll -0.20 -0.20 -0.50 -fur 1.20 1.20 1.20 \
24         -b 0.0 0.0 0.0 1.0 1.0 1.0 \
25         -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \
26         -r 0.6
27 fi
28
29 # first unit cell in each direction without rotation displaying mirrored atoms
30 if [ "$type" = "1m" ]; then
31 echo "type: 1 no rotation, mirrored"
32 ./visualize -w 640 -h 480 -d $i \
33         -nll -0.20 -0.20 -0.50 -fur 1.20 1.20 1.20 \
34         -b 0.0 0.0 0.0 1.0 1.0 1.0 \
35         -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \
36         -r 0.6 -m 3.0 0.0 0.0 0.0 3.0 0.0 0.0 0.0 3.0
37 fi
38
39 # three unit cells in each direction without rotation
40 if [ "$type" = "3" ]; then
41 echo "type: 3 no rotation"
42 ./visualize -w 640 -h 480 -d $i \
43         -nll -0.20 -0.20 -0.20 -fur 3.20 3.20 3.20 \
44         -b 0.0 0.0 0.0 3.0 3.0 3.0 \
45         -c 2.3 -3.7 2.4 -L 1.5 -1.0 1.5 \
46         -r 0.6
47 fi
48
49 # unti cell 3,0,2
50 if [ "$type" = "3x2z" ]; then
51 echo "type: 3x2z no rotation"
52 ./visualize -w 640 -h 480 -d $i \
53         -nll 1.8 -0.2 0.8 -fur 3.20 1.20 2.20 \
54         -b 2.0 0.0 1.0 3.0 1.0 2.0 \
55         -c 2.3 -3.7 2.4 -L 1.5 -1.0 1.5 \
56         -r 0.6
57 fi
58
59 # first unit cell rotated by 45 degrees about z-axis
60 if [ "$type" = "1r" ]; then
61 echo "type: 1 rotated"
62 ./visualize -w 640 -h 480 -d $i \
63         -nll -0.20 -0.70 -0.20 -fur 2.00 0.70 1.20 \
64         -c -0.5 -1.5 0.9 -L 1.0 0.0 0.5 \
65         -r 0.6
66         #-b 0.0 0.0 0.0 0.0 0.0 1.0 \
67 fi
68
69 # first unit cell rotated by 45 degrees displaying mirrored atoms
70 if [ "$type" = "1rm" ]; then
71 echo "type: 1 rotated, mirrored"
72 ./visualize -w 640 -h 480 -d $i \
73         -nll -0.20 -0.20 -0.20 -fur 1.20 1.20 1.20 \
74         -b 0.0 0.0 0.0 1.0 1.0 1.0 \
75         -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \
76         -r 0.6 -m 2.0 -2.0 0.0 2.0 2.0 0.0 0.0 0.0 3.0 \
77         -A 193 1.9
78 fi
79
80 # three unit cells (rotated) in each direction displaying mirrored atoms
81 if [ "$type" = "3rm" ]; then
82 echo "type: 3 roted, mirrored"
83 ./visualize -w 640 -h 480 -d $i \
84         -nll -0.20 -0.20 -0.20 -fur 3.20 3.20 3.20 \
85         -b 0.0 0.0 0.0 3.0 3.0 3.0 \
86         -c 1.3 -3.7 2.4 -L 1.5 -1.0 1.5 \
87         -r 0.6 -m 2.0 -2.0 0.0 2.0 2.0 0.0 0.0 0.0 3.0
88 fi
89
90 ./ppm2avi $i
91
92 done
93
94 else
95
96 # 100 db in type 1 sc (insdide sc)
97 for i in $1/video/atomic_conf_*.xyz; do
98         displace=`echo $i | awk -F_ '{ print $7 }' | sed 's/\.xyz//'`
99         echo "$i $displace ..."
100 ./visualize -w 640 -h 480 -d $i \
101         -nll -0.20 -0.20 -0.50 -fur 1.20 1.20 1.20 \
102         -b 0.0 0.0 0.0 1.0 1.0 1.0 \
103         -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \
104         -r 0.6 -B 0.1 -D $displace -m 2.0 -2.0 0.0 2.0 2.0 0.0 0.0 0.0 3.0
105 done
106
107 fi
108
109 #mplayer $1/video/md.avi
110