You are on page 1of 11

University of Puerto Rico, PR-00931, USA.

Course by: Prof. Julian Velev

Rajasekarakumar Vadapoo
S.No: 401-03-9023
Electronic Structure Theory
HW:#1
Aim:
Run VASP (Vienna Ab-initio Simulation Package) in two different machines nanobio and
esspresso in serial and parallel environment and report the details along with the understanding of input
and output files of VASP during this run.

INPUT files:
We have the input files for diamond structure. We had 4 input files named as INCAR,
POSCAR, POTCAR, KPOINTS and the pbs file for the job.

INCAR:
The INCAR file is the central input file of VASP1. It contains lot of default settings which is not
explicitely written in the file.
Our INCAR file is as follows:
---------
System = diamond
ISMEAR = -5
~
-----------
1 st line => comment line
2nd line => ISMEAR determines how the partial occupancies are set for each wave functions. The
default value is 1. In our case ISMEAR= -5 means the partial occupancies use the tetrahedron method
with Blochi correction for the wave fns.

POSCAR:
The file which have the position of atoms and the atom type details. The unit cell of the
1 http://cms.mpi.univie.ac.at/vasp/vasp/vasp.html
diamond is as shown in the fig.1. We know that the diamond cubic structure is the fcc with two basis at
(0 0 0) and (0.25 0.25 0.25).

Fig. 1. Unit cell of the diamond (a diamond cubic crystal structure)

the POSCAR file we used for our calculations is as follows:


------------
cubic diamond
3.7
0.5 0.5 0.0
0.0 0.5 0.5
0.5 0.0 0.5
2
direct
0.0 0.0 0.0
0.25 0.25 0.25
~
---------
explanations:
first line is the comment line=> cubic diamond crystal structure
second line => lattice constant in A0 ( since cubic only one entry)
3rd-5th lines=> lattice vectors (a,b,c) for the diamond cubic structure which is fcc.
6th line=> no. of atoms per atomic species ( here carbon present in two basis)
7th line => type of co-ordinates to represent the atomic positions ( here its direct i.e fractional co-
ordintates)
8 th line => atomic position of the first type of atom ( the atom corresponds to the first basis- carbon)
9th line => atomic position of the second type of atom ( the atom corresponds to the second basis-
carbon)

KPOINTS:
The KPOINT file used in the calculations is as follows:
-----------
4x4x4
0
Monkhorst
444
000
~
-----------
1 st line => comment line
2 nd line=> no. of k points ( 0 means automatic generation of kpoints scheme)
3 rd line => type of the grid generation (Monkhorst type- fcc system often used this type)
4 th line => the no.of kpoint grids in the fist brillouin zone in Kx, Ky, kz .
5th line => shift of the k-mesh. ( here no shift in Kx, Ky, kz).

POTCAR:
The POTCAR file contains the pseudo potentials of the atomic species. In our case we have
only carbon in the case of diamond, so we have to use only one psueopotential file. In case of more
species we can just cat two files and have the corresponding pseudopotentials of the species as a single
POTCAR file.

In our case, the first line shows US C means Ultra soft pseudo potentials for the C atom. And
the 7th line shows that we used the GGA ( Generalized Gradian Approximation) in our calculation.

The PBS file:


The PBS file is the sheduler file which used to run our job in the different environments of the
systems. The file consists all details of the job and directions like the memory needed, where to run the
job, where to store the output files, how to place the file in the que of the system, etc.
Since, we ran our jobs in two different environments ( serial & parallel), we have two different
pbs files.

For serial we used the following pbs file:


#!/bin/bash
#
#$ -N test
#$ -cwd
#$ -j y
#$ -S /bin/bash
#

/home/jvelev/vasp/vasp.4.6.serial/vasp

some of the inferences :


from this pbs files are 3 rd line gives the name of the.pbs file ( test.pbs) , cwd=> change of
working directory, run the vasp executable file from the location /home/jvelev/vasp/vasp.4.6.serial/

For parallel we used the following pbs file:

#!/bin/bash
#
#$ -N test
#$ -pe mpich 4
#$ -cwd
#$ -j y
#$ -S /bin/bash
#

export PGI=/opt/pgi/
/opt/pgi/linux86-64/7.2/mpi/mpich/bin/mpirun -np $NSLOTS -machinefile /opt/pgi/linux86-
64/7.2/mpi/mpich/share/machines.LINUX /home/jvelev/vasp/vasp.4.6.mpi/vasp
some of the inferences:
-pe => use the parallel environment, mpich 4 => use the mpi ( message passing interface) 4=> the no.
of processor to be used in the calculation.
the last line shows that command for schedular where the excutables are and what to use.

OUTPUT files:
We have received series of OUTPUT files in the VASP run. They are as follows:

CHG:
This file contains the lattice vectors, atomic coordinates and the total charge density multiplied
by the volume on the fine FFT-grid . This file is used to visualize the charge density.

CONTCAR:
End of each ionic steps of the calculation this file has been written and it contains the valid
POSCAR after each ionic steps and importantly this file has been rewritten in the end of every
steps so we would find the POSCAR position of the final/converged ionic step.

EIGENVAL:
This file contains the kohn-Sham eigen values for all k-points, at the end of the calculation. This
file is used for the bandstructure calculations.

XDATCAR:
This file contains the ionic configuration details at each and every ionic steps.
In our case: we did the static calculation, so we would have the detail of the initial ionic step
only.

CHGCAR:
This file contains the lattice vectors, atomic coordinates and the total charge density multiplied
by the volume on the fine FFT-grid as similar to the CHG file. This file can be used to restart
the calculation from the existing charge density. But to visualize the charge density one has to
use the CHG file only.

DOSCAR:
This file contains the DOS ( Density of states) and integrated DOS in number of states/ unit
cell.
In our case: Diamond have the E-fermi @ 7.3520 eV and the calculated bandgap is 5.273 eV
which is close to the experimental optical bandgap 5.48 eV.2 The calculated DOS presented as
below.

20
DOS of Diamond
15 Eg= 5.273 eV
10

5
Energy (eV)

-5

-10

-15

-20

-25
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
DOS ( states/unitcell)

Fig.2. The calculated DOS of the Diamond using our above input files in nanobio serial
environment.

IBZKPT :
This file is combatible with the KPOINT file. It contains all the kpoints details explicitly.
In our case, the kpts are as follows:
-----------
Automatically generated mesh
10
Reciprocal lattice
0.12500000000000 0.12500000000000 0.12500000000000 96
0.37500000000000 0.12500000000000 0.12500000000000 288
-0.37500000000000 0.12500000000000 0.12500000000000 288

2 Physics of Semiconductor Devices, 2nd Edition, S. M. Sze, John Wiley & Sons, New York (1981)
-0.12500000000000 0.12500000000000 0.12500000000000 288
0.37500000000000 0.37500000000000 0.12500000000000 288
-0.37500000000000 0.37500000000000 0.12500000000000 576
-0.12500000000000 0.37500000000000 0.12500000000000 576
-0.37500000000000 -0.37500000000000 0.12500000000000 288
0.37500000000000 0.37500000000000 0.37500000000000 96
-0.37500000000000 0.37500000000000 0.37500000000000 288
--------
showed the kpts chosen in the irreducible Brillouin zone.

PCDAT:
This file contains the pair correlations function. For dynamic calculations this file contains the
averaged pair correlation function.

WAVECAR:
The WAVECAR file is a binary file containing the following datas:

NBAND number of bands


ENCUTI 'initial' cut-off energy
AX 'initial' basis vectors defining the supercell
CELEN ('initial') eigenvalues
FERWE ('initial') Fermi-weights
CPTWFP ('initial') wavefunctions

OSZICAR:
This file contains the convergence step details of the calculations. In this file
N -> the number of electronic steps
E -> the current free energy
dE -> the change in the free energy from the last to the current step
d eps -> the change in the bandstructure energy
ncg -> the number of evaluations of the Hamiltonian acting onto a wavefunction
rms -> the norm of the residuum R= H − S ¿ of the trial wavefunctions
rms(c) -> the difference between input and output charge density.
here are the details of OSZICAR running in serial and parallel mode in two different machine.
The files shows that when the difference between two successive dE becomes within the accuracy
/convergence limit the iteration stops.

1. OSZICAR of Test file : Nanobio- serial:

N E dE d eps ncg rms rms(c)


DAV: 1 -0.752548110408E+01 -0.75255E+01 -0.30614E+03 176 0.581E+02

DAV: 2 -0.205455916803E+02 -0.13020E+02 -0.12630E+02 208 0.107E+02

DAV: 3 -0.205740734233E+02 -0.28482E-01 -0.28482E-01 192 0.581E+00

DAV: 4 -0.205740867854E+02 -0.13362E-04 -0.13362E-04 200 0.964E-02

DAV: 5 -0.205740867887E+02 -0.33385E-08 -0.33385E-08 144 0.112E-03 0.417E+00


DAV: 6 -0.200301725445E+02 0.54391E+00 -0.11655E+00 168 0.873E+00 0.591E-01
DAV: 7 -0.200281604143E+02 0.20121E-02 -0.39028E-03 160 0.646E-01 0.967E-02
DAV: 8 -0.200281545313E+02 0.58830E-05 -0.46427E-05 200 0.837E-02

1 F= -.20028155E+02 E0= -.20028155E+02 d E =0.000000E+00

2. OSZICAR of Test file : Nanobio- parallel:

N E dE d eps ncg rms rms(c)


DAV: 1 0.931967823380E+01 0.93197E+01 -0.24695E+03 160 0.581E+02

DAV: 2 -0.198134951558E+02 -0.29133E+02 -0.27145E+02 192 0.184E+02

DAV: 3 -0.205728344850E+02 -0.75934E+00 -0.75449E+00 172 0.244E+01


DAV: 4 -0.205740846897E+02 -0.12502E-02 -0.12501E-02 176 0.114E+00

DAV: 5 -0.205740866861E+02 -0.19964E-05 -0.19964E-05 134 0.431E-02 0.417E+00


DAV: 6 -0.200293795160E+02 0.54471E+00 -0.92782E-01 174 0.873E+00 0.588E-01
DAV: 7 -0.200281403842E+02 0.12391E-02 -0.11722E-02 180 0.100E+00 0.102E-01
DAV: 8 -0.200281544935E+02 -0.14109E-04 -0.47676E-05 118 0.775E-02

1 F= -.20028154E+02 E0= -.20028154E+02 d E =0.000000E+00

3. OSZICAR of Test file : Espresso-serial

N E dE d eps ncg rms rms(c)


DAV: 1 -0.752548110408E+01 -0.75255E+01 -0.30614E+03 176 0.581E+02

DAV: 2 -0.205455916803E+02 -0.13020E+02 -0.12630E+02 208 0.107E+02

DAV: 3 -0.205740734233E+02 -0.28482E-01 -0.28482E-01 192 0.581E+00

DAV: 4 -0.205740867854E+02 -0.13362E-04 -0.13362E-04 200 0.964E-02

DAV: 5 -0.205740867887E+02 -0.33386E-08 -0.33386E-08 144 0.112E-03 0.417E+00


DAV: 6 -0.200301725445E+02 0.54391E+00 -0.11655E+00 168 0.873E+00 0.591E-01
DAV: 7 -0.200281604143E+02 0.20121E-02 -0.39028E-03 160 0.646E-01 0.967E-02
DAV: 8 -0.200281545313E+02 0.58830E-05 -0.46427E-05 200 0.837E-02

1 F= -.20028155E+02 E0= -.20028155E+02 d E =0.000000E+00

4. OSZICAR of Test file : Espresso-parallel

N E dE d eps ncg rms rms(c)


DAV: 1 0.344911536382E+01 0.34491E+01 -0.25472E+03 164 0.581E+02
DAV: 2 -0.202071398051E+02 -0.23656E+02 -0.21855E+02 224 0.164E+02

DAV: 3 -0.205737086487E+02 -0.36657E+00 -0.36497E+00 160 0.168E+01

DAV: 4 -0.205740862425E+02 -0.37759E-03 -0.37758E-03 192 0.691E-01

DAV: 5 -0.205740867604E+02 -0.51784E-06 -0.51785E-06 120 0.233E-02 0.417E+00


DAV: 6 -0.200296594003E+02 0.54443E+00 -0.93023E-01 184 0.873E+00 0.589E-01
DAV: 7 -0.200281473031E+02 0.15121E-02 -0.85288E-03 172 0.888E-01 0.100E-01
DAV: 8 -0.200281543952E+02 -0.70921E-05 -0.43476E-05 124 0.762E-02

1 F= -.20028154E+02 E0= -.20028154E+02 d E =0.000000E+00

OUTCAR:
This file contains all the details of the output including the energy of the system, stress in
the system, time taken for the calculations, memory used, etc.
In our calculations:
System used Free energy of External pressure CPU time
the system (eV) in the system (kB) (sec)
Nanobio-serial -20.028155 -545.79 2.086
Nanobio-Parallel (4 -20.028154 -545.59 3.262
processors)
Espresso- serial -20.028155 -545.79 2.248
Espresso-paralle (4- -20.028154 -545.70 1.393
processors)

From the above table we could see that the parallel environment is not efficient compare
to the serial for this very small job. Among all above four espresso parallel took less time for the
calculation eventho' its an expensive one for using 4 processors.

test.o# :
This file contains the details of all the actions taken by the programme.
vasprun.xml:
This file contain all the details of the calculation and the information of the system including chage
details in xml format. some of the viewing softwares like P4VASP to see the chargedensity.

test.po #:
This file we can see only in the parallel environment. which contain the detials of
processors , which are doing the calculations.
In our case, one of the parallel environment shows the following details:
--------------
-catch_rsh /opt/gridengine/default/spool/compute-0-3/active_jobs/15046.1/pe_hostfile
compute-0-3
compute-0-3
compute-0-3
compute-0-3
----------------

Conclusion:
We have successfully run the VASP for our input files for the diamond in different system
environments and learned the basic details of VASP input files as well as how to get the necessary basic
details from the VASP output files.