3 free_si_250=-0.70036911
4 free_si_650=-0.70021403
9 [ -d $1 ] && file=$1/OUTCAR
11 sicnt=`grep 'ions per' $file | awk '{ print $5 }'`
12 ccnt=`grep 'ions per' $file | awk '{ print $6 }'`
16 echo "parsing file $file ..."
17 echo " Si: $sicnt, C: $ccnt, total: $total"
22 energy=`grep energy\ without $file | tail -1 | awk '{ print $8 }'`
24 echo $energy $total | \
25 awk '{ print " total e: " $1 " eV, per atom: " $1/$2 " eV"}'
26 echo "$energy $total $free_si_250" | \
27 awk '{ print " cohesive energy (Si only 250): " ($1-$2*$3)/$2 " eV" }'
28 echo "$energy $sicnt $ccnt $free_si_650 $free_c_650" | \
29 awk '{ print " cohesive energy (Si and C 650): " ($1-$2*$4-$3*$5)/($2+$3) " eV" }'
30 #echo "$energy $total" | \
31 # awk '{ print " Si:C -> cohesive energy: "$1/$2 " eV" }'