Last updated -- 27 March 2002
This page shows how to analyze the output of the eval_virial
program of the SCTB package to compute the surface energy
and stress of a Si 111 surface 1x1 unit cell. In addition,
a comparison of the timing information between the serial and
parallel runs is generated. For a description
files needed, see the first Setup page.
output.parallel.no_SC
and output.parallel.SC
.
#!/bin/csh -f echo "*******************" echo "* Raw results *" echo "*******************" echo "" echo "Raw no charge self-consistency results:" echo -n "energy of bulk " fgrep Energy output.parallel.no_SC | head -1 | awk '{print $3}' echo -n "energy with surface " fgrep Energy output.parallel.no_SC | tail -1 | awk '{print $3}' echo "bulk virial (xx xy xz yx yy yz zx zy zz)" fgrep Virial output.parallel.no_SC | head -1 | sed 's/Virial =[ ]*//' echo "surface virial (xx xy xz yx yy yz zx zy zz)" fgrep Virial output.parallel.no_SC | tail -1 | sed 's/Virial =[ ]*//' echo "" echo "Raw charge self-consistent results:" echo "self-consistency convergence process:" egrep ' 0:.*residual' output.parallel.SC echo -n "energy of bulk " fgrep Energy output.parallel.SC | head -1 | awk '{print $3}' echo -n "energy with surface " fgrep Energy output.parallel.SC | tail -1 | awk '{print $3}' echo "bulk virial (xx xy xz yx yy yz zx zy zz)" fgrep Virial output.parallel.SC | head -1 | sed 's/Virial =[ ]*//' echo "surface virial (xx xy xz yx yy yz zx zy zz)" fgrep Virial output.parallel.SC | tail -1 | sed 's/Virial =[ ]*//' echo "" echo "*************************" echo "* Processed results *" echo "*************************" echo "" echo -n "non charge self-consistent surface energy (eV/111 unit cell) " set eb = `fgrep Energy output.parallel.no_SC | head -1 | awk '{print $3}'` set es = `fgrep Energy output.parallel.no_SC | tail -1 | awk '{print $3}'` echo "scale=3; ($es-$eb)/2.0" | bc -l echo -n "charge self-consistent surface energy (eV/111 unit cell) " set eb = `fgrep Energy output.parallel.SC | head -1 | awk '{print $3}'` set es = `fgrep Energy output.parallel.SC | tail -1 | awk '{print $3}'` echo "scale=3; ($es-$eb)/2.0" | bc -l echo "" echo -n "non charge self-consistent surface stress (eV/111 unit cell) " set vxxb = `fgrep Virial output.parallel.no_SC | head -1 | awk '{print $3}'` set vxxs = `fgrep Virial output.parallel.no_SC | tail -1 | awk '{print $3}'` set vyyb = `fgrep Virial output.parallel.no_SC | head -1 | awk '{print $7}'` set vyys = `fgrep Virial output.parallel.no_SC | tail -1 | awk '{print $7}'` echo -n `echo "scale=3; ($vxxs - $vxxb)/2.0" | bc -l` " " echo `echo "scale=3; ($vyys - $vyyb)/2.0" | bc -l` echo -n "charge self-consistent surface stress (eV/111 unit cell) " set vxxb = `fgrep Virial output.parallel.SC | head -1 | awk '{print $3}'` set vxxs = `fgrep Virial output.parallel.SC | tail -1 | awk '{print $3}'` set vyyb = `fgrep Virial output.parallel.SC | head -1 | awk '{print $7}'` set vyys = `fgrep Virial output.parallel.SC | tail -1 | awk '{print $7}'` echo -n `echo "scale=3; ($vxxs - $vxxb)/2.0" | bc -l` " " echo `echo "scale=3; ($vyys - $vyyb)/2.0" | bc -l` echo "*************************" echo "* TIMING *" echo "*************************" set dt1 = `fgrep 'TOTAL TIME' output.parallel.SC | awk '{print $5}' | sort -k1nr | head -1` set dt2 = `fgrep 'TOTAL TIME' output.parallel.no_SC | awk '{print $5}' | sort -k1nr | head -1` set dt = `echo $dt1 + $dt2 | bc -l` echo "Running time $dt2 + $dt1 = $dt s"
fgrep
, head
,
tail
, sort
, bc
and
awk
to isolate the important
results from the output. These include the energy of the bulk sample,
which is set to the shell variable eb
, the
energy of the surface sample es
, and the in-plane
virials of the bulk vxxb
and vyyb
and the surface vxxs
and vyys
.
************************* * Processed results * ************************* non charge self-consistent surface energy (eV/111 unit cell) 1.295 charge self-consistent surface energy (eV/111 unit cell) 1.444 non charge self-consistent surface stress (eV/111 unit cell) -0.960 -0.960 charge self-consistent surface stress (eV/111 unit cell) -0.612 -0.612
Return to the first setup page
Look at other examples
Return to the sctb Reference Manual.