projects
/
physik
/
posic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a12c7b8
)
added Posselt formation energy calc
author
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Fri, 6 Feb 2009 08:17:58 +0000
(09:17 +0100)
committer
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Fri, 6 Feb 2009 08:17:58 +0000
(09:17 +0100)
calc_delta_e
patch
|
blob
|
history
diff --git
a/calc_delta_e
b/calc_delta_e
index
e0ee86f
..
6a97cc5
100755
(executable)
--- a/
calc_delta_e
+++ b/
calc_delta_e
@@
-1,31
+1,24
@@
#!/bin/bash
#!/bin/bash
-# bulk chemical potentials
-musi=-4.63
-muc=-7.374
-music=-12.68
+musi=-4.628414
+muc=-7.373091
+music=-12.679618
-# formation enthalpy
-dhf=0.68
-#dhf=-9.64
-
-# first method to calculate formation energy
file=`ls $1/atomic_conf_* | tail -1`
atom_cnt=`grep '# \[P\]' $file | awk '{ print $3 }'`
file=`ls $1/atomic_conf_* | tail -1`
atom_cnt=`grep '# \[P\]' $file | awk '{ print $3 }'`
-e0=`awk 'NR==2' $1/energy | awk '{ print $4 }'`
-e1=`tail -n 1 $1/energy | awk '{ print $4 }'`
-
-echo "$e0 $e1 $atom_cnt" | \
- awk '{ print " "($2-$1)*$3" eV (simple)" }'
-
-# second method to calculate formation energy
+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`
si_cnt=`grep ^Si $file | wc -l`
c_cnt=`grep ^C $file | wc -l`
-ed=`tail -n 1 $1/energy | awk '{ print $3 }'`
-echo "$si_cnt $c_cnt $musi $muc $ed $music $dhf" | \
- awk '{ print " "$5*($1+$2)-0.5*($1+$2)*$6-0.5*($1-$2)*($3-$4)-0.5*($1-$2)*$7 " eV (Albe, #Si=" $1 " #C=" $2 ") " }'
-echo "$si_cnt $c_cnt $ed $e0" | \
- awk '{ print " " $3*($1+$2)-($1+$2)*$4 " eV (Gao, #Si=" $1 " #C=" $2 ")" }'
+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) }'