4 # calculate diffusion coefficient within a certain time period
5 # frank.zirkelbach@physik.uni-augsburg.de
9 echo "$3 `./diffusion_calc $1 | grep coefficients | \
10 awk '{ print $3 " " $4 " " $5 }'`" >> $2
14 rm -f $1/diff_coeff.txt
15 echo "processing $1 ..."
16 for file in $1/*.save; do
17 time="`basename $file | awk -F- '{ print $2 }' | \
19 if [ ! -z "$3" ]; then
20 [ "$time" -gt "$4" -o "$time" -lt "$3" ] && continue
22 do_it $file $1/diff_coeff.txt $time
25 echo "not a valid directory -> $1"
32 dfile=$ddir/diff_coeff.scr
40 set title 'Diffusion coefficients'
42 set ylabel 'D [cm cm / s]'
43 set terminal postscript eps enhanced color solid lw 1 'Helvetica' 14
44 set output '$ddir/diff_coeff.eps'
47 echo -en "plot " >> $dfile
51 if [ ! -z `echo $2 | grep a` ]; then
53 echo -en ", " >> $dfile
54 echo -en "\"$1/diff_coeff.txt\" u 1:2 w l t \"a\"" >> $dfile
58 if [ ! -z `echo $2 | grep b` ]; then
60 echo -en ", " >> $dfile
61 echo -en "\"$1/diff_coeff.txt\" u 1:3 w l t \"b\"" >> $dfile
65 if [ ! -z `echo $2 | grep t` ]; then
67 echo -en ", " >> $dfile
68 echo -en "\"$1/diff_coeff.txt\" u 1:4 w l t \"t\"" >> $dfile
71 echo -en "\n" >> $dfile