forked from Angel-Jia/VASP-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nebinfo
81 lines (71 loc) · 1.8 KB
/
nebinfo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#! /bin/sh
echo ""
echo ""
echo "############ All CONTACRs and POSCARs in packege will be converted to cartesian file ############"
echo ""
echo ""
read -p "The number of images:" n
echo ""
echo "############################# Processing #############################"
echo ""
mkdir vaspfile gvfile movie
for i in `seq -f '%02g' 0 $(($n+1))`
do
if [ -e ./$i/CONTCAR ]
then
cat ./$i/CONTCAR >./vaspfile/CONTCAR-$i
cat ./$i/CONTCAR >./gvfile/CONTCAR-$i
cat ./$i/CONTCAR >./movie/CONTCAR-$i
fi
if [ -e ./$i/POSCAR ]
then
cat ./$i/POSCAR >./vaspfile/POSCAR-$i
cat ./$i/POSCAR >./gvfile/POSCAR-$i
cat ./$i/POSCAR >./movie/POSCAR-$i
fi
done
cd vaspfile/
echo " vaspfile/ processing"
dir2car.py * > /dev/null
tar -cf ./POSITION.tar ./*.vasp
rm *.vasp POSCAR* CONTCAR* 2> /dev/null
tar -xf ./POSITION.tar
rm POSITION.tar
cd ..
cd gvfile/
echo " gvfile/ processing"
vas2gjf.py * > /dev/null
tar -cf ./GVFILE.tar ./*.gjf
rm *.gjf POSCAR* CONTCAR* 2> /dev/null
tar -xf ./GVFILE.tar
rm GVFILE.tar
cd ..
cd movie
echo " movie/ processing"
cp POSCAR-00 CONTCAR-00
nn=`seq -f '%02g' 1 $(($n+1)) |tail -1`
cp POSCAR-$nn CONTCAR-$nn
for i in `seq -f '%02g' 0 $(($n+1))`
do
if [ -e POSCAR-$i ]
then
vas2xyz.py POSCAR-$i >/dev/null
cat POSCAR-$i.xyz >>POSmovie.xyz
fi
if [ -e CONTCAR-$i ]
then
vas2xyz.py CONTCAR-$i >/dev/null
cat CONTCAR-$i.xyz >>CONmovie.xyz
fi
done
sed -i '/^$/d' *.xyz
tar -cf ./MOVIE.tar ./POSmovie.xyz ./CONmovie.xyz
rm POSCAR* CONTCAR*
tar -xf MOVIE.tar
rm MOVIE.tar
cd ..
tar -zcf ./NEBINFO.tar.gz vaspfile/ gvfile/ movie/
rm -rf movie/ vaspfile/ gvfile/
echo ""
echo " --------------- Done ---------------"
echo ""