6 sicnt=`grep 'ions per' OUTCAR | awk '{ print $5 }'`
7 ccnt=`grep 'ions per' OUTCAR | awk '{ print $6 }'`
11 echo "parsing OUTCAR file ..."
12 echo " Si: $sicnt, C: $ccnt, total: $total"
21 sed -n -e '/POSITION/,/total/p' OUTCAR | \
22 grep -v POS | grep -v total | grep -v -- ^\ - | \
23 while read x y z fx fy fz; do
25 time=`printf "%05d" $tcnt`
26 echo -en "$tcnt/$cnt "
28 echo "# P $total $time <$cx,$cy,$cz>" > \
29 video/atomic_conf_$time.xyz
33 force=`echo "sqrt($fx*$fx+$fy*$fy+$fz*$fz)" | bc`
34 if [ $cnt -ge $sicnt ]; then
38 echo "$type $x $y $z $color $force" >> \
39 video/atomic_conf_$time.xyz
42 if [ $cnt -eq $total ]; then