From: hackbard Date: Tue, 2 Oct 2007 13:40:51 +0000 (+0200) Subject: 3 methods of calculating interstitial formation energies X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e34be948a7efef2e183a68912046f529ff2e75cf;p=physik%2Fposic.git 3 methods of calculating interstitial formation energies --- diff --git a/calc_delta_e b/calc_delta_e index 9c5ecda..bde20da 100755 --- a/calc_delta_e +++ b/calc_delta_e @@ -1,9 +1,14 @@ #!/bin/bash +# change these settings: +atom_cnt=1000 +inj_time=10.00 + e0=`grep ^0 $1/energy | awk '{ print $4 }'` -e1=`tail -n 1 $1/energy | awk '{ print $4 }'` -ev=`grep ^19.000 $1/energy | awk '{ print $4 }'` -en=`grep ^20.000 $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 $2 $ev $en" | \ - awk '{ print $5*($3+1)-$4*$3-($2*($3+1)-$1*$3) " eV" }' +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" }'