Fcc Si: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 26: Line 26:


*And a simple bash-script to loop over several lattice constants: loop.sh
*And a simple bash-script to loop over several lattice constants: loop.sh
#! /bin/bash
<pre>
BIN=/path/to/your/vasp/executable
#! /bin/bash
rm WAVECAR SUMMARY.fcc
BIN=/path/to/your/vasp/executable
for i in  3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.2 4.3 ; do
rm WAVECAR SUMMARY.fcc
cat >POSCAR <<!
for i in  3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.2 4.3 ; do
fcc:
cat >POSCAR <<!
    $i
fcc:
  0.5 0.5 0.0
  $i
  0.0 0.5 0.5
0.5 0.5 0.0
  0.5 0.0 0.5
0.0 0.5 0.5
    1
0.5 0.0 0.5
cartesian
  1
0 0 0
cartesian
!
0 0 0
echo "a= $i" ; mpirun -np 2 $BIN
!
E=`awk '/F=/ {print $0}' OSZICAR` ; echo $i $E  >>SUMMARY.fcc
echo "a= $i" ; mpirun -np 2 $BIN
done
E=`awk '/F=/ {print $0}' OSZICAR` ; echo $i $E  >>SUMMARY.fcc
cat SUMMARY.fcc
done
cat SUMMARY.fcc
</pre>


'''Mind''': You will have to set the correct path to your VASP executable (i.e., <tt>BIN</tt>), and invoke VASP with the correct command (e.g., in the above: <tt>mpirun -np 2</tt>).
'''Mind''': You will have to set the correct path to your VASP executable (i.e., <tt>BIN</tt>), and invoke VASP with the correct command (e.g., in the above: <tt>mpirun -np 2</tt>).

Revision as of 16:38, 4 June 2012

Description: the bash-script loop.sh runs fcc Si at several different lattice constants (3.5-4.3 Å) and collects free energy versus lattice constant into the file SUMMARY.fcc


  • INCAR
System = fcc Si
ISTART = 0 ; ICHARG=2
ENCUT  =    240
ISMEAR = 0; SIGMA = 0.1
  • KPOINTS
k-points
 0
Monkhorst Pack
 11 11 11
 0  0  0
  • POSCAR
fcc Si:
 3.9
 0.5 0.5 0.0
 0.0 0.5 0.5
 0.5 0.0 0.5
   1
cartesian
0 0 0
  • And a simple bash-script to loop over several lattice constants: loop.sh
#! /bin/bash
BIN=/path/to/your/vasp/executable
rm WAVECAR SUMMARY.fcc
for i in  3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.2 4.3 ; do
cat >POSCAR <<!
fcc:
   $i
 0.5 0.5 0.0
 0.0 0.5 0.5
 0.5 0.0 0.5
   1
cartesian
0 0 0
!
echo "a= $i" ; mpirun -np 2 $BIN
E=`awk '/F=/ {print $0}' OSZICAR` ; echo $i $E  >>SUMMARY.fcc
done
cat SUMMARY.fcc

Mind: You will have to set the correct path to your VASP executable (i.e., BIN), and invoke VASP with the correct command (e.g., in the above: mpirun -np 2).

  • To make a quick plot of SUMMARY.fcc try:
gnuplot
gnuplot> plot "SUMMARY.fcc" using ($1):($4) w lp

Download

name.tgz


To the list of examples or to the main page