Z1=ENVIRON["Z1"]; Z2=ENVIRON["Z2"]; Z3=ENVIRON["Z3"]
}
{
- X=sqrt(X1^2+X2^2+X3^2)*$4
- Y=sqrt(Y1^2+Y2^2+Y3^2)*$4
- Z=sqrt(Z1^2+Z2^2+Z3^2)*$4
- print $1*X " " $2*Y " " $3*Z
+ X=sqrt(X1^2+X2^2+X3^2)
+ Y=sqrt(Y1^2+Y2^2+Y3^2)
+ Z=sqrt(Z1^2+Z2^2+Z3^2)
+ x=$1*X
+ if(x>1.0)
+ x-=1.0;
+ if(x<-1.0)
+ x+=1.0;
+ y=$2*Y
+ if(y>1.0)
+ y-=1.0;
+ if(y<-1.0)
+ y+=1.0;
+ z=$3*Z
+ if(z>1.0)
+ z-=1.0;
+ if(z<-1.0)
+ z+=1.0;
+
+ print x*$4 " " y*$4 " " z*$4
}'`
xi=`echo $results | awk '{ print $1 }'`
yb=`echo $tmpb | awk '{ print $2 }'`
zb=`echo $tmpb | awk '{ print $3 }'`
- echo "$xa $ya $za $xb $yb $zb $scale $len $delta" | \
+ echo "$xa $ya $za $xb $yb $zb $scale $len $delta $count $ic" | \
awk ' \
BEGIN {
dxt=0; dyt=0; dzt=0
dist*=$7
if((dist>=($8-$9))&&(dist<=($8+$9))) {
print ""
+ print "atoms: " $10 " - " $11
print $1 " " $2 " " $3
print $4 " " $5 " " $6 " (" dist " - " $8 ")"
print "displace: " dx*X " " dy*Y " " dz*Z
my1=0; my2=0; my3=0;
mz1=0; mz2=0; mz3=0;
ab=0
+sym=0
# parse argv
((cnt+=1))
done
cutoff=$1; shift 1;;
+ -s) sym=$2; shift 2;;
*)
echo "options:"
echo "########"
echo " -l <x> <y> <z> (light source)"
echo "bonds:"
echo " -ab <atom number> <cutoff> (auto bonds)"
+ echo "symmetry:"
+ echo " -s <sym nr>"
+ echo " 1: sym by <1 -1 0> at 1/4 <1 1 0>"
exit 1;;
esac
done
export x0 y0 z0 x1 y1 z1 radius
+ export sym
+
# atoms
((count=1))
checktsd=`sed -n 7p $file | awk '{ print $1 }'`
Z1=ENVIRON["Z1"]; Z2=ENVIRON["Z2"]; Z3=ENVIRON["Z3"];
radius=ENVIRON["radius"]; scale=ENVIRON["scale"];
color=ENVIRON["color"]
+ sym=ENVIRON["sym"]
x=0; y=0; z=0;
xt=0; yt=0; zt=0;
i=0; j=0; k=0;
nx=$1+i; ny=$2+j; nz=$3+k;
+ if(sym==1) {
+ xt=nx-1.0/12.0;
+ yt=ny-1.0/12.0;
+ nx=-yt;
+ ny=-xt;
+ nx+=1.0/12.0;
+ ny+=1.0/12.0;
+ }
+
xt=nx*X1+ny*Y1+nz*Z1;
yt=nx*X2+ny*Y2+nz*Z2;
zt=nx*X3+ny*Y3+nz*Z3;
Y1=ENVIRON["Y1"]; Y2=ENVIRON["Y2"]; Y3=ENVIRON["Y3"];
Z1=ENVIRON["Z1"]; Z2=ENVIRON["Z2"]; Z3=ENVIRON["Z3"];
bcr=ENVIRON["bcr"]; scale=ENVIRON["scale"];
+ sym=ENVIRON["sym"];
}
{
for(i=-1;i<=1;i++) {
for(ik=-1;ik<=1;ik++) {
nx=$1+i; ny=$2+j; nz=$3+k;
+
+ if(sym==1) {
+ xt=nx-1.0/12.0;
+ yt=ny-1.0/12.0;
+ nx=-yt;
+ ny=-xt;
+ nx+=1.0/12.0;
+ ny+=1.0/12.0;
+ }
+
xt=nx*X1+ny*Y1+nz*Z1;
yt=nx*X2+ny*Y2+nz*Z2;
zt=nx*X3+ny*Y3+nz*Z3;
(xt<=x1)&&(yt<=y1)&&(zt<=z1)) {
inx=$4+ii; iny=$5+ij; inz=$6+ik;
+
+ if(sym==1) {
+ ixt=inx-1.0/12.0;
+ iyt=iny-1.0/12.0;
+ inx=-iyt;
+ iny=-ixt;
+ inx+=1.0/12.0;
+ iny+=1.0/12.0;
+ }
+
ixt=inx*X1+iny*Y1+inz*Z1;
iyt=inx*X2+iny*Y2+inz*Z2;
izt=inx*X3+iny*Y3+inz*Z3;
dist=sqrt((xt-ixt)^2+(yt-iyt)^2+(zt-izt)^2);
+ if((ixt>=x0)&&(iyt>=y0)&&(izt>=z0)&&\
+ (ixt<=x1)&&(iyt<=y1)&&(izt<=z1)) {
+
#if((xt>=x0)&&(yt>=y0)&&(zt>=z0)&&\
# (xt<=x1)&&(yt<=y1)&&(zt<=z1)) {
if(dist<=$7) {
}
#}
+ }
+
}
}