-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphonon_relaxation_4.0.sh
117 lines (104 loc) · 1.78 KB
/
phonon_relaxation_4.0.sh
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#! /bin/bash
## Used for phonon relaxation calculation.
## Written by Songwei Liu, in 2019-08-30.
fin=" writing wavefunctions" # symbol of finishing relaxation run
mkdir ~/relaxed_structure_3.0
for i in omega
do
mkdir ~/phonon/${i}/relaxed_structure
mkdir ~/relaxed_structure_3.0/${i}_relaxed_structure
for j in 280 300
do
mkdir ~/phonon/${i}/phonon_${j}
cd ~/phonon/${i}/phonon_${j}
if [ ${i} == "alpha" ]
then
cat > INCAR <<!
PREC = Accurate
ENCUT = 400
LREAL = .False
ISTART = 0
ISMEAR = 1
SIGMA = 0.05
EDIFF = 1E-8
EDIFFG = -1E-3
NSW = 100
ISIF = 3
IBRION = 1
PSTRESS = ${j}
!
cat > KPOINTS <<!
coord.13.02
0
Gamma point shift
12 12 12
0 0 0
!
elif [ ${i} == "beta" ]
then
cat > INCAR <<!
PREC = Accurate
ENCUT = 400
LREAL = .False
ISTART = 0
ISMEAR = 1
SIGMA = 0.05
EDIFF = 1E-8
EDIFFG = -1E-3
NSW = 100
ISIF = 3
ISYM = -1
IBRION = 2
PSTRESS = ${j}
!
cat > KPOINTS <<!
coord.13.02
0
Gamma point shift
12 12 12
0 0 0
!
elif [ ${i} == "omega" ]
then
cat > INCAR <<!
PREC = Accurate
ENCUT = 400
LREAL = .False
ISTART = 0
ISMEAR = 1
SIGMA = 0.08
EDIFF = 1E-8
EDIFFG = -1E-3
NSW = 100
ISIF = 3
IBRION = 1
PSTRESS = ${j}
!
cat > KPOINTS <<!
coord.13.02
0
Gamma point shift
12 12 12
0 0 0
!
fi
echo "${i}_${j}"
cp ~/phonon/potential/POTCAR_pv POTCAR
cp ~/phonon/potential/${i}_Ti.vasp POSCAR
time mpirun -n 4 /usr/local/bin/vasp5-intel-parallel > out
a=`tail -n 1 out`
if test "${a}" = "${fin}"
then
echo 'relaxation succeed'
cp CONTCAR ~/phonon/${i}/relaxed_structure/POSCAR_unitcell_${j}
cp CONTCAR ~/relaxed_structure_3.0/${i}_relaxed_structure/POSCAR_unitcell_${j}
else
echo 'relaxation failed'
echo "${a}"
fi
done
done
cd
tar -zcvf phonon.tar.gz phonon
cp ~/phonon.tar.gz ~/relaxed_structure_3.0/phonon.tar.gz
tar -zcvf relaxed_structure_3.0.tar.gz relaxed_structure_3.0