10 app=".`echo $file | awk -F. '{ print $2 }'`"
13 echo "parsing $file file ..."
15 sicnt=`sed -n 6p $file | awk '{ print $1 }'`
16 ccnt=`sed -n 6p $file | awk '{ print $2 }'`
18 lc=`sed -n 2p $file | awk '{ print $1 }'`
20 x1=`sed -n 3p $file | awk '{ print $1 }'`
21 x2=`sed -n 3p $file | awk '{ print $2 }'`
22 x3=`sed -n 3p $file | awk '{ print $3 }'`
24 y1=`sed -n 4p $file | awk '{ print $1 }'`
25 y2=`sed -n 4p $file | awk '{ print $2 }'`
26 y3=`sed -n 4p $file | awk '{ print $3 }'`
28 z1=`sed -n 5p $file | awk '{ print $1 }'`
29 z2=`sed -n 5p $file | awk '{ print $2 }'`
30 z3=`sed -n 5p $file | awk '{ print $3 }'`
35 echo " Si: $sicnt, C: $ccnt, total: $total"
36 echo " Lattice constant: $lc A"
39 echo " x = $x2 y = $y2 z = $z2"
49 echo "# P $total init <$cx,$cy,$cz>" > video/atomic_conf_init${app}.xyz
51 sed -n 9,${eoa}p $file | \
52 while read x y z fx fy fz; do
55 if [ $cnt -ge $sicnt ]; then
59 X=`echo $x $y $z $x1 $y1 $z1 | \
60 awk '{ print $1*$4+$2*$5+$3*$6 }'`
61 Y=`echo $x $y $z $x2 $y2 $z2 | \
62 awk '{ print $1*$4+$2*$5+$3*$6 }'`
63 Z=`echo $x $y $z $x3 $y3 $z3 | \
64 awk '{ print $1*$4+$2*$5+$3*$6 }'`
65 X=`echo $lc $X | awk '{ print $1*$2 }'`
66 Y=`echo $lc $Y | awk '{ print $1*$2 }'`
67 Z=`echo $lc $Z | awk '{ print $1*$2 }'`
68 echo "$type $X $Y $Z $color 0.0" >> video/atomic_conf_init${app}.xyz