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