X-Git-Url: https://www.hackdaworld.org/gitweb/?p=physik%2Fposic.git;a=blobdiff_plain;f=calc_delta_e;h=eff07c93e2eb870a97abe4ab838646ec0774049e;hp=bde20da40bdda2c4c9ea71947ece59c90d087561;hb=HEAD;hpb=e34be948a7efef2e183a68912046f529ff2e75cf diff --git a/calc_delta_e b/calc_delta_e index bde20da..eff07c9 100755 --- a/calc_delta_e +++ b/calc_delta_e @@ -1,14 +1,40 @@ #!/bin/bash -# change these settings: -atom_cnt=1000 -inj_time=10.00 - -e0=`grep ^0 $1/energy | awk '{ print $4 }'` -e1=`grep ^${inj_time} $1/energy | awk '{ print $4 }'` -e2=`tail -n 1 $1/energy | awk '{ print $4 }'` - -echo "$e0 $e1 $e2 $atom_cnt" | \ - #awk '{ print ($3*($4+1))-($4*$1)" eV" }' - awk '{ print ($3*($4+1))-(($4+1)*$1)" eV" }' - #awk '{ print ($3-$1)*$4" eV" }' +# guess potential +pot=`grep ^potential $1/config | awk '{ print $2 }'` + +echo +if [ "$pot" = "tersoff" ]; then +echo "potential: $pot" +musi=-4.629595 +muc=-7.421824 +music=-12.37363 +else +echo "potential: $pot" +musi=-4.628414 +muc=-7.373091 +music=-12.679618 +fi +echo + +file=`ls $1/atomic_conf_* | tail -1` +atom_cnt=`grep '# \[P\]' $file | awk '{ print $3 }'` +e0=`awk 'NR==2' $1/energy | awk '{ print $3 }'` +e1=`tail -n 1 $1/energy | awk '{ print $3 }'` +ed0=`awk 'NR==2' $1/energy | awk '{ print $6 }'` +ed1=`tail -n 1 $1/energy | awk '{ print $6 }'` +si_cnt=`grep ^Si $file | wc -l` +c_cnt=`grep ^C $file | wc -l` + +echo "-------------------------------------------------------------------------" +echo " Formation energy [eV]: #Si=$si_cnt, #C=$c_cnt, #tot=$atom_cnt" +echo "-------------------------------------------------------------------------" + +echo "$si_cnt $c_cnt $e1 $e0" | \ + awk '{ print " Gao: "($3-$4)*($1+$2) }' +echo "$si_cnt $c_cnt $musi $muc $e1 $music" | \ + #awk '{ print " Posselt: "$5*($1+$2)-0.5*($1+$2)*$6-0.5*($1-$2)*($3-$4) }' + awk '{ print " Posselt: "$5*($1+$2)-$1*$3-$2*$4 }' +echo "$si_cnt $c_cnt $musi $music $e1 $music" | \ + awk '{ print " Tersoff: "$5*($1+$2)-$1*$3-$2*($4-$3) }' +