4ff46fb9f9084ba2a2fabeb3c72d53fd2a030299
[physik/posic.git] / calc_delta_e
1 #!/bin/bash
2
3 file=`ls $1/atomic_conf_* | tail -1`
4 atom_cnt=`grep '# \[P\]' $file | awk '{ print $3 }'`
5 e0=`grep ^0 $1/energy | awk '{ print $4 }'`
6 e1=`tail -n 1 $1/energy | awk '{ print $4 }'`
7
8 echo "$e0 $e1 $atom_cnt" | \
9         awk '{ print ($2-$1)*$3" eV" }'