mirror feature + new std vis
[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 # three unit cells in each direction without rotation
30 if [ "$type" = "3" ]; then
31 echo "type: 3 no rotation"
32 ./visualize -w 640 -h 480 -d $i \
33         -nll -0.20 -0.20 -0.20 -fur 3.20 3.20 3.20 \
34         -b 0.0 0.0 0.0 3.0 3.0 3.0 \
35         -c 2.3 -3.7 2.4 -L 1.5 -1.0 1.5 \
36         -r 0.6
37 fi
38
39 # unti cell 3,0,2
40 if [ "$type" = "3x2z" ]; then
41 echo "type: 3x2z no rotation"
42 ./visualize -w 640 -h 480 -d $i \
43         -nll 1.8 -0.2 0.8 -fur 3.20 1.20 2.20 \
44         -b 2.0 0.0 1.0 3.0 1.0 2.0 \
45         -c 2.3 -3.7 2.4 -L 1.5 -1.0 1.5 \
46         -r 0.6
47 fi
48
49 # first unit cell rotated by 45 degrees about z-axis
50 if [ "$type" = "1r" ]; then
51 echo "type: 1 rotated"
52 ./visualize -w 640 -h 480 -d $i \
53         -nll -0.20 -0.70 -0.20 -fur 2.00 0.70 1.20 \
54         -c -0.5 -1.5 0.9 -L 1.0 0.0 0.5 \
55         -r 0.6
56         #-b 0.0 0.0 0.0 0.0 0.0 1.0 \
57 fi
58
59 # first unit cell displaying mirrored atoms
60 if [ "$type" = "1m" ]; then
61 echo "type: 1 no rotation, mirrored"
62 ./visualize -w 640 -h 480 -d $i \
63         -nll -0.20 -0.20 -0.50 -fur 1.20 1.20 1.20 \
64         -b 0.0 0.0 0.0 1.0 1.0 1.0 \
65         -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \
66         -r 0.6 -m 2.0 -2.0 0.0 2.0 2.0 0.0 0.0 0.0 3.0
67 fi
68
69 # three unit cells in each direction displaying mirrored atoms
70 if [ "$type" = "3m" ]; then
71 echo "type: 3 no rotation, mirrored"
72 ./visualize -w 640 -h 480 -d $i \
73         -nll -0.20 -0.20 -0.20 -fur 3.20 3.20 3.20 \
74         -b 0.0 0.0 0.0 3.0 3.0 3.0 \
75         -c 1.3 -3.7 2.4 -L 1.5 -1.0 1.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 fi
78
79 ./ppm2avi $i
80
81 done
82
83 else
84
85 # 100 db in type 1 sc (insdide sc)
86 for i in $1/video/atomic_conf_*.xyz; do
87         displace=`echo $i | awk -F_ '{ print $7 }' | sed 's/\.xyz//'`
88         echo "$i $displace ..."
89 ./visualize -w 640 -h 480 -d $i \
90         -nll -0.20 -0.20 -0.50 -fur 1.20 1.20 1.20 \
91         -b 0.0 0.0 0.0 1.0 1.0 1.0 \
92         -c 0.8 -1.7 0.9 -L 0.5 -1.0 0.5 \
93         -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
94 done
95
96 fi
97
98 #mplayer $1/video/md.avi
99