6 cnt_si_si=`sed -n 6p $si_file`
7 cnt_si_sic=`sed -n 6p $sic_file | awk '{ print $1 }'`
8 cnt_c_sic=`sed -n 6p $sic_file | awk '{ print $2 }'`
10 lc_si=`sed -n 2p $si_file`
12 x_si=`sed -n 3p $si_file | awk '{ print $1 }'`
13 x_sic=`sed -n 3p $sic_file | awk '{ print $1 }'`
15 h_si=`sed -n 5p $si_file | awk '{ print $3 }'`
16 h_sic=`sed -n 5p $sic_file | awk '{ print $3 }'`
17 h_sic=`echo $h_sic $x_si $x_sic | awk '{ print $1*$2/$3 }'`
19 ((tot_si=cnt_si_si+cnt_si_sic))
21 h_tot=`echo $h_si + $h_sic | bc`
27 echo " 0.00000 0.00000 $h_tot"
28 echo " $tot_si $cnt_c_sic"
31 # silicon atoms of si lattice (bottom)
33 while [ $cnt -le $cnt_si_si ]; do
35 line=`sed -n ${gl}p $si_file`
36 x=`echo $line | awk '{ print $1 }'`
37 y=`echo $line | awk '{ print $2 }'`
38 z=`echo $line | awk '{ print $3 }'`
39 nz=`echo $z $h_tot $h_si | awk '{ print $1*$3/$2 }'`
40 echo " $x $y $nz T T T"
44 # silicon atoms of sic lattice (top / 2nd fcc)
46 while [ $cnt -le $cnt_si_sic ]; do
47 ((gl=cnt+offset+cnt_c_sic))
48 line=`sed -n ${gl}p $sic_file`
49 x=`echo $line | awk '{ print $1 }'`
50 y=`echo $line | awk '{ print $2 }'`
51 z=`echo $line | awk '{ print $3 }'`
52 nz=`echo $z $h_tot $h_si $h_sic | awk '{ print $1*$4/$2 + $3/$2 }'`
53 echo " $x $y $nz T T T"
57 # carbon atoms of sic lattice (top / 1st fcc <- odd counts)
59 while [ $cnt -le $cnt_c_sic ]; do
61 line=`sed -n ${gl}p $sic_file`
62 x=`echo $line | awk '{ print $1 }'`
63 y=`echo $line | awk '{ print $2 }'`
64 z=`echo $line | awk '{ print $3 }'`
65 nz=`echo $z $h_tot $h_si $h_sic | awk '{ print $1*$4/$2 + $3/$2 }'`
66 echo " $x $y $nz T T T"