User Tools

Site Tools


bulk_optimization

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
bulk_optimization [2009/11/24 22:19]
jelen created
bulk_optimization [2010/05/05 17:36]
jelen
Line 1: Line 1:
  ===== Lattice parameter =====  ===== Lattice parameter =====
  
-In this section, we explain how to optimize the lattice parameter of Si bulk diamond structure. The diamond structure is characterized by two distinct atom per unit cell with relative coordinates ''​(0 ,0 ,​0)''​ and ''​(1/​4,​ 1/4, 1/​4)''​ +In this section, we explain how to optimize the lattice parameter of Si bulk diamond structure. The diamond structure is characterized by two distinct atom per unit cell with relative coordinates ''​(0 ,0 ,​0)''​ and ''​(1/​4,​ 1/4, 1/​4)''​. The lattice vector ​is defined in the relative coordinates ​''​alat*(1/​4,​ 1/4, 1/4)''​.  
-lattice vector ''​alat*(1/​4,​ 1/4, 1/4)   ​ +Detail description of the diamond structure can be found [[http://​cst-www.nrl.navy.mil/​lattice/​struk/​a4.html|elsewhere]].  ​ 
-There is an elegant way to rescale atomic coordinates,​ lattice vector and k-points by only one parameter **''​rescal''​** defined in  +There is an elegant way to rescale atomic coordinates,​ lattice vector and k-points by only one parameter **''​rescal''​** defined in the section **''&​OPTIONS''​**. 
-Our input atomic coordinates written in **''​fireball.in''​** look like:+Our input atomic coordinates written in **''​Si.bas''​** look like:
  
    2    2
Line 10: Line 10:
   14   ​0.25000 ​  ​0.25000 ​  ​0.25000   14   ​0.25000 ​  ​0.25000 ​  ​0.25000
  
-the lattice vector is defined in **''​Si.lvs''​**+the lattice vector is defined in **''​Si.lvs''​** ​file:
  
    ​0.50000 ​  ​0.00000 ​  ​0.50000    ​0.50000 ​  ​0.00000 ​  ​0.50000
Line 16: Line 16:
    ​0.50000 ​  ​0.50000 ​  ​0.00000    ​0.50000 ​  ​0.50000 ​  ​0.00000
  
-and we use ''​Oh''​ symmetry group to generate a k-points set+and we use ''​Oh''​ symmetry group to generate a k-points set (file **''​Si.kpts''​**)
  
           60           60
Line 81: Line 81:
  
  
 +to make the total energy calculation of several lattice parameters automatic, we use a script:
 +
 +
 +  alat=" 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0"
 +  for i in $alat;
 +  do
 +   echo $i
 +   mkdir $i
 +   ​lattice="​`echo $i`";
 +   sed "​s/​AAA/​$lattice/​g" ​ fireball.sample > fireball.in;​
 +   ​./​runTG.com > a-$i.out
 +   grep "​etot/​atom"​ a-$i.out | cut -b50-65
 +   mv CHARGES $i/
 +   mv a-$i.out $i/
 +  done
 +
 +the script runs several tasks for defined lattice vectors, it creates a directory for each lattice parameter and it saves there **''​CHARGES''​** and an output file. It also dumps the energy per atom for a given lattice parameter. ​   ​
 +A file **''​fireball.sample''​** has following syntax:
 +
 +  &OPTION
 +  basisfile = Si.bas
 +  lvsfile = Si.lvs
 +  kptpreference = Si.kpts
 +  nstepf = 1
 +  rescal = AAA
 +  &END
 +
 +Afterwards, we simply dump the total energy vs. lattice parameter into a file: 
 +
 +   grep ETOT */*.out | cut -b1-3,34- > etot.dat
 +
 +and we plot using gnuplot
 +
 +   ​gnuplot
 +   ​gnuplot>​ set title "Etot vs. alat"
 +   ​gnuplot>​ set xlabel "alat [Ang]"
 +   ​gnuplot>​ set ylabel "Etot [eV]"
 +   ​gnuplot>​ set format y "​%8.2f"​
 +   ​gnuplot>​ plot '​etot.dat'​ with linespoints
 +
 +{{:​si-bulk:​etot-alat.png|}}
  
bulk_optimization.txt · Last modified: 2014/02/09 11:23 (external edit)