forgot the lattice constant
[physik/posic.git] / calc_delta_e
1 #!/bin/bash
2
3 musi=-4.628414
4 muc=-7.373091
5 music=-12.679618
6
7 file=`ls $1/atomic_conf_* | tail -1`
8 atom_cnt=`grep '# \[P\]' $file | awk '{ print $3 }'`
9 e0=`awk 'NR==2' $1/energy | awk '{ print $3 }'`
10 e1=`tail -n 1 $1/energy | awk '{ print $3 }'`
11 ed0=`awk 'NR==2' $1/energy | awk '{ print $6 }'`
12 ed1=`tail -n 1 $1/energy | awk '{ print $6 }'`
13 si_cnt=`grep ^Si $file | wc -l`
14 c_cnt=`grep ^C $file | wc -l`
15
16 echo "-------------------------------------------------------------------------"
17 echo "  Formation energy [eV]: #Si=$si_cnt, #C=$c_cnt, #tot=$atom_cnt"
18 echo "-------------------------------------------------------------------------"
19
20 echo "$si_cnt $c_cnt $e1 $e0" | \
21         awk '{ print "   Gao: "($3-$4)*($1+$2) }'
22 echo "$si_cnt $c_cnt $musi $muc $e1 $music" | \
23         awk '{ print "   Posselt: "$5*($1+$2)-0.5*($1+$2)*$6-0.5*($1-$2)*($3-$4) }'
24