]> www.hackdaworld.org Git - physik/posic.git/blob - calc_delta_e
mus out of mu Si and mu SiC (Tersoff way)
[physik/posic.git] / calc_delta_e
1 #!/bin/bash
2
3 # guess potential
4 pot=`grep ^potential $1/config | awk '{ print $2 }'`
5
6 echo
7 if [ "$pot" = "tersoff" ]; then
8 echo "potential: $pot"
9 musi=-4.629595
10 muc=-7.421824
11 music=-12.37363
12 else
13 echo "potential: $pot"
14 musi=-4.628414
15 muc=-7.373091
16 music=-12.679618
17 fi
18 echo
19
20 file=`ls $1/atomic_conf_* | tail -1`
21 atom_cnt=`grep '# \[P\]' $file | awk '{ print $3 }'`
22 e0=`awk 'NR==2' $1/energy | awk '{ print $3 }'`
23 e1=`tail -n 1 $1/energy | awk '{ print $3 }'`
24 ed0=`awk 'NR==2' $1/energy | awk '{ print $6 }'`
25 ed1=`tail -n 1 $1/energy | awk '{ print $6 }'`
26 si_cnt=`grep ^Si $file | wc -l`
27 c_cnt=`grep ^C $file | wc -l`
28
29 echo "-------------------------------------------------------------------------"
30 echo "  Formation energy [eV]: #Si=$si_cnt, #C=$c_cnt, #tot=$atom_cnt"
31 echo "-------------------------------------------------------------------------"
32
33 echo "$si_cnt $c_cnt $e1 $e0" | \
34         awk '{ print "   Gao: "($3-$4)*($1+$2) }'
35 echo "$si_cnt $c_cnt $musi $muc $e1 $music" | \
36         #awk '{ print "   Posselt: "$5*($1+$2)-0.5*($1+$2)*$6-0.5*($1-$2)*($3-$4) }'
37         awk '{ print "   Posselt: "$5*($1+$2)-$1*$3-$2*$4 }'
38 echo "$si_cnt $c_cnt $musi $music $e1 $music" | \
39         awk '{ print "   Tersoff: "$5*($1+$2)-$1*$3-$2*($4-$3) }'
40