4 app=`echo $i | awk -F. '{ print $2 }'`
5 [ ! -z $app ] && app=".$app"
7 if [ "$1" = "renew" ]; then
11 if [ -d video$app ]; then
12 echo "skipping $app ... (use $0 renew to force rebuild)"
18 sicnt=`grep 'ions per' $i | awk '{ print $5 }'`
19 ccnt=`grep 'ions per' $i | awk '{ print $6 }'`
23 echo "parsing file $PWD/$i ..."
24 echo " Si: $sicnt, C: $ccnt, total: $total"
33 sed -n -e '/POSITION/,/total/p' $i | \
34 grep -v POS | grep -v total | grep -v -- ^\ - | \
35 while read x y z fx fy fz; do
37 time=`printf "%05d" $tcnt`
38 #echo -en "$tcnt/$cnt "
40 echo "# P $total $time <$cx,$cy,$cz>" > \
41 video$app/atomic_conf_$time.xyz
45 force=`echo "sqrt($fx*$fx+$fy*$fy+$fz*$fz)" | bc`
46 if [ $cnt -ge $sicnt ]; then
50 echo "$type $x $y $z $color $force" >> \
51 video$app/atomic_conf_$time.xyz
54 if [ $cnt -eq $total ]; then