auto read atom count
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 4 Oct 2007 12:24:49 +0000 (14:24 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Thu, 4 Oct 2007 12:24:49 +0000 (14:24 +0200)
calc_delta_e

index bde20da..4ff46fb 100755 (executable)
@@ -1,14 +1,9 @@
 #!/bin/bash
 
-# change these settings:
-atom_cnt=1000
-inj_time=10.00
-
+file=`ls $1/atomic_conf_* | tail -1`
+atom_cnt=`grep '# \[P\]' $file | awk '{ print $3 }'`
 e0=`grep ^0 $1/energy | awk '{ print $4 }'`
-e1=`grep ^${inj_time} $1/energy | awk '{ print $4 }'`
-e2=`tail -n 1 $1/energy | awk '{ print $4 }'`
+e1=`tail -n 1 $1/energy | awk '{ print $4 }'`
 
-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" }'
+echo "$e0 $e1 $atom_cnt" | \
+       awk '{ print ($2-$1)*$3" eV" }'