VASP Computing Bulk Modulus of Si: Difference between revisions

From Micro and Nano Mechanics Group
Jump to navigation Jump to search
No edit summary
No edit summary
Line 54: Line 54:
</pre>
</pre>


To do this calculation, you also need to put the LDA pseudopotential file as <tt>POTCAR</tt> in this directory.
It also requires to put the ultrasoft-LDA pseudopotential file as <tt>POTCAR</tt> in this directory.


===Run VASP===
===Run VASP===

Revision as of 10:41, 1 September 2015

VASP: Computing Bulk Modulus of Si

Adriano Sanchez,Yanming Wang and Wei Cai


Input files

Here we give an example of how to use VASP to compute the equilibrium lattice constant, cohesive energy and bulk modulus of Si. We performed this calculation on MC2 in parallel mode in the ~/Codes/VASP/runs/Si/LDA/perfect.21x21x21 directory. This directory should contain the following files.

INCAR


PREC = High

ISTART = 0 
ICHARG = 2  
ISMEAR = 1
SIGMA = 0.1

EDIFF  = 1E-09  
NELM = 40      
ENMAX = 500     
ENCUT = 500    

ISIF = 2 
NSW = 100  
IBRION = 2  

KPOINTS

21x21x21
0        0 = automatic generation of k-points
Monkhorst
21 21 21
0 0 0

POSCAR example for Si

POSCAR for DC Si (created manually)
   ???   
   0    0.5  0.5
   0.5  0    0.5
   0.5  0.5  0
   1 
Cartesian  (real coordinates r)
   0    0    0

It also requires to put the ultrasoft-LDA pseudopotential file as POTCAR in this directory.

Run VASP

Now we are ready to run

vasp

To compute the equilibrium lattice constant, cohesive energy and bulk modulus, we use the following script auto.B.serial to run vasp repeated with different lattice constants.

#!/bin/bash
rm WAVECAR 
for a in 5.375 5.38 5.385 5.39 5.395 5.40 5.405 5.41 5.415 5.42 5.425 5.430 5.435
do
cat > POSCAR << FIN
POSCAR for FCC Si (created manually)
$a 
0.5  0.5  0.0
0.0  0.5  0.5
0.5  0.0  0.5
2 
cart
0.00 0.00 0.00
0.25 0.25 0.25
FIN


$MPIRUN -np $nprocs -hostfile $PBS_NODEFILE $VASP5

E=`tail -1 OSZICAR`
echo $a $E | sed -s 's/F=//; s/E0=//; s/d E =//;' >> Elatt.B.dat

p=`grep pressure OUTCAR | cut -b 25-34`
echo $a $p >> platt.B.dat
"sielastic.pbs" [dos] 49L, 814C                  echo "a=$a"
./vasp

E=`tail -1 OSZICAR`
echo $a $E | sed -s 's/F=//; s/E0=//; s/d E =//;' >> Elatt.B.dat

p=`grep pressure OUTCAR | cut -b 25-34`
echo $a $p >> platt.B.dat

done


Analyze data

After running it as ./auto.B.serial, it will create data files Elatt.B.dat and platt.B.dat.

Launch octave and run the following functions fit_a0EB.m and fit_a0B.m,

fit_a0EB('Elatt.B.dat');
fit_a0B ('platt.B.dat');

The first line fits the energy data to a quadratic curve and computes the equilibrium lattice constant, cohesive energy and bulk modulus. The second line fits the pressure data to a linear curve and computes the equilibrium lattice constant and bulk modulus. In this example, the result is a0 = 5.389 angstrom, Ecoh = -5.977 eV, B = 95 GPa.

Parallel computation

To run vasp in parallel, you need to submit vasp.pbs as

qsub vasp.pbs


You will need the following two files to do this calculation in parallel on SU-AHPCRC: auto.B.par and B.pbs.