-
Notifications
You must be signed in to change notification settings - Fork 2
/
evsvol_fine.sh
executable file
·55 lines (43 loc) · 1.69 KB
/
evsvol_fine.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
#Copyright (C) 2020 Sufyan M. Shaikh
#!/bin/bash
#@ output = output.out
#@ error = error.err
#@ job_type = MPICH
#@ node = 1
#@ tasks_per_node = 24
#@ class = Medium128
#@ environment = COPY_ALL
#@ queue
#THIS SCRIPT SHOULD BE USED FOR FINAL LATTICE PARAMETER CALCULATION ONLY
#CHECK THE POSCAR FILE SECTION, VERIFY THAT THE EACH ELEMENT AND ITS RESPECTIVE
#ATOMS ARE CORRECTLY DEFINED.
rm summary2.csv summary_EvsV_fine.csv
#Define no. of cores
n_cores=8
#Name of the system
sys_name="V"
#Energy cut-off value (for structure relaxation take 1.3x the ENMAX of POTCAR)
e_cutoff=295
#Initial POSCAR, POTCAR and KPOINTS will be taken from the folder.
#Later only the POSCAR will be changed.
#Rest of the files will be used as it is.
#POSCAR will be changed for every new lattice parameter and the values will be used to calculated the energies.
#These energies will be saved in summary_EvsV_fine.csv file, which will be later used to plot E vs V graph...
#from which precise lattice parameter will be found out.
#Enter the probable range of lattice parameter. This is from the earlier VASP run.
#For better accuracy, keep the step size in for loop as 0.01
for i in $(seq 2 0.01 4)
do
sed -i "2s/.*/$i/" POSCAR
echo "a= $i"
mpirun -np $n_cores vasp > log
#This will write in to file summary2.csv file.
E=`awk '/F=/ {print $0}' OSZICAR` ; echo $i kp2 $E >> summary2.csv
done
#This will seperate the columns by commas and only the
#lattice parameter, Energies will be printed to summary_EvsV_fine.csv file.
awk '{print $1","$2","$5}' summary2.csv > summary_EvsV_fine.csv
#Plots the fine E vs. V using gnuplot
gnuplot plot_fine.plt
echo "$sys_name : E vs. V \"FINE\" CALCULATION FINISHED"
printf "\n"