11 for i in $1/OUTCAR.*; do
12 index=`echo $i | awk -F. '{ print $2 }'`
13 if [ ! -f $1/CONTCAR.${index} ] ; then
14 echo "no such file: CONTCAR.${index}"
17 cfile=$1/CONTCAR.${index}
24 acnt=`sed -n 6p $cfile | awk '{ print $1 }'`
28 while [ $lcnt -le $acnt ]; do
29 line="`sed -n ${lcnt}p $cfile`"
30 x1=`echo $line | awk '{ print $1 }'`
31 x2=`echo $line | awk '{ print $2 }'`
32 x3=`echo $line | awk '{ print $3 }'`
33 line="`sed -n ${lcnt}p $last`"
34 y1=`echo $line | awk '{ print $1 }'`
35 y2=`echo $line | awk '{ print $2 }'`
36 y3=`echo $line | awk '{ print $3 }'`
37 rc=`echo $rc $x1 $x2 $x3 $y1 $y2 $y3 |\
38 awk '{ print $1+sqrt(($2-$5)^2+($3-$6)^2+($4-$7)^2) }'`
42 energy=`./e_coh $i | grep Si\ and\ C | awk '{ print $8 }'`