-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvasp_convergence_test_ENCUT
More file actions
executable file
·40 lines (26 loc) · 1.03 KB
/
vasp_convergence_test_ENCUT
File metadata and controls
executable file
·40 lines (26 loc) · 1.03 KB
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
#!/bin/bash
# run in directory containing input files for a VASP run
first_energy=$1
final_energy=$2
energy_step=$3
if [ ! -f energy_ENCUT.txt ]; then
echo "Cutoff Energy [eV]; Total calculated energy [eV]; Time [s]" > energy_ENCUT.txt
fi
for cutoff in `seq $first_energy $energy_step $final_energy`; do
mkdir ENCUT_${cutoff}
cp PO*CAR ENCUT_${cutoff}
cp KPOINTS ENCUT_${cutoff}
sed "s/XYZ/${cutoff}/g" INCAR > ENCUT_${cutoff}/INCAR
cd ENCUT_${cutoff}/
run_vasp_stable
# distinguish between Bloechl smearing (-5) and other methods
if [ `awk '{FS = "="} /ISMEAR/ {print $2}' INCAR` == "-5" ]; then
# Bloechl smearing - some extra lines are printed (Bloechl correction)
energy=`grep "energy" OUTCAR | tail -3 | head -1 | awk '{print $NF}'`
else
energy=`grep "energy" OUTCAR | tail -1 | awk '{print $NF}'`
fi
time=`grep "Elapsed time" OUTCAR | awk 'BEGIN {FS=":"}; {print $2}'`
cd ..
echo $cutoff $energy $time >> energy_ENCUT.txt
done