3 methods of calculating interstitial formation energies
[physik/posic.git] / calc_delta_e
1 #!/bin/bash
2
3 # change these settings:
4 atom_cnt=1000
5 inj_time=10.00
6
7 e0=`grep ^0 $1/energy | awk '{ print $4 }'`
8 e1=`grep ^${inj_time} $1/energy | awk '{ print $4 }'`
9 e2=`tail -n 1 $1/energy | awk '{ print $4 }'`
10
11 echo "$e0 $e1 $e2 $atom_cnt" | \
12         #awk '{ print ($3*($4+1))-($4*$1)" eV" }'
13         awk '{ print ($3*($4+1))-(($4+1)*$1)" eV" }'
14         #awk '{ print ($3-$1)*$4" eV" }'