added free energies of Si and C for 650 eV cut-off energy
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 16 Jul 2009 17:13:12 +0000 (19:13 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 16 Jul 2009 17:13:12 +0000 (19:13 +0200)
vasp_tools/e_coh
vasp_tools/e_form

index ddd866b..284e7c2 100755 (executable)
@@ -1,21 +1,34 @@
 #!/bin/bash
 
 #!/bin/bash
 
-sicnt=`grep 'ions per' $1/OUTCAR | awk '{ print $5 }'`
-ccnt=`grep 'ions per' $1/OUTCAR | awk '{ print $6 }'`
+free_si_250=-0.70036911
+free_si_650=-0.70021403
+free_c_650=-1.3535731
+
+file=$1
+
+[ -d $1 ] && file=$1/OUTCAR
+
+sicnt=`grep 'ions per' $file | awk '{ print $5 }'`
+ccnt=`grep 'ions per' $file | awk '{ print $6 }'`
 
 ((total=sicnt+ccnt))
 
 
 ((total=sicnt+ccnt))
 
-echo "parsing OUTCAR file ..."
+echo "parsing file $file ..."
 echo "  Si: $sicnt, C: $ccnt, total: $total"
 
 cnt=0
 tcnt=0
 
 echo "  Si: $sicnt, C: $ccnt, total: $total"
 
 cnt=0
 tcnt=0
 
-energy=`grep energy\ without $1/OUTCAR | tail -1 | awk '{ print $8 }'`
+energy=`grep energy\ without $file | tail -1 | awk '{ print $8 }'`
 
 
-echo "  total energy: $energy eV"
-echo "$energy $total" | \
-       awk '{ print "  cohesive energy: "$1/$2 " eV" }'
+echo $energy $total | \
+       awk '{ print "  total e: " $1 " eV, per atom: " $1/$2 " eV"}'
+echo "$energy $total $free_si_250" | \
+       awk '{ print "  cohesive energy (Si only 250): " ($1-$2*$3)/$2 " eV" }'
+echo "$energy $sicnt $ccnt $free_si_650 $free_c_650" | \
+       awk '{ print "  cohesive energy (Si and C 650): " ($1-$2*$4-$3*$5)/($2+$3) " eV" }'
+#echo "$energy $total" | \
+#      awk '{ print "  Si:C -> cohesive energy: "$1/$2 " eV" }'
 
 echo
 
 
 echo
 
index 5786621..dadc46c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
 #!/bin/bash
 
-echo "## `basename $2` - `basename $1` ##"
+echo "#### `basename $2` # `basename $1` ####"
 
 e1=`./e_coh $1 | grep cohesive | awk '{ print $5 }'`
 e2=`./e_coh $2 | grep cohesive | awk '{ print $5 }'`
 
 e1=`./e_coh $1 | grep cohesive | awk '{ print $5 }'`
 e2=`./e_coh $2 | grep cohesive | awk '{ print $5 }'`
@@ -9,5 +9,3 @@ count=`./e_coh $2 | grep total\: | awk '{ print $6 }'`
 echo "$e1 $e2 $count" | \
        awk '{ print "formation energy: "($2-$1)*$3 " eV" }'
 
 echo "$e1 $e2 $count" | \
        awk '{ print "formation energy: "($2-$1)*$3 " eV" }'
 
-echo
-