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