X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fposic.git;a=blobdiff_plain;f=vasp_tools%2Fe_coh;h=284e7c2b9e146cc5ae67747ce72b0b2b2a16db73;hp=ddd866bb6f62bd6a404f4f098acf64672b7f542d;hb=d9b8426ac2fd86c6db3f6567c3a60c97dac54824;hpb=859d3efbd8c9bdc23b2034bc76f6437508b8254f diff --git a/vasp_tools/e_coh b/vasp_tools/e_coh index ddd866b..284e7c2 100755 --- a/vasp_tools/e_coh +++ b/vasp_tools/e_coh @@ -1,21 +1,34 @@ #!/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)) -echo "parsing OUTCAR file ..." +echo "parsing file $file ..." 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