X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fposic.git;a=blobdiff_plain;f=vasp_tools%2Fsearch_bonds;h=5fa2e93fc2a51e87663227c7284139c97b66c022;hp=88051ee7e96ee3067d7c9451b1872021dd62c4a4;hb=170485f4072200994932e5675bad4e6e3d35b4e6;hpb=8d4b140464e036fe920497805d47cf53b28eeeb2 diff --git a/vasp_tools/search_bonds b/vasp_tools/search_bonds index 88051ee..5fa2e93 100755 --- a/vasp_tools/search_bonds +++ b/vasp_tools/search_bonds @@ -91,11 +91,15 @@ while [ "1" ]; do BEGIN { dxt=0; dyt=0; dzt=0 dx=0; dy=0; dz=0; dist=0 + X=0; Y=0; Z=0 X1=ENVIRON["X1"]; X2=ENVIRON["X2"]; X3=ENVIRON["X3"] Y1=ENVIRON["Y1"]; Y2=ENVIRON["Y2"]; Y3=ENVIRON["Y3"] Z1=ENVIRON["Z1"]; Z2=ENVIRON["Z2"]; Z3=ENVIRON["Z3"] } { + X=sqrt(X1^2+X2^2+X3^2) + Y=sqrt(Y1^2+Y2^2+Y3^2) + Z=sqrt(Z1^2+Z2^2+Z3^2) dx=$1-$4 dy=$2-$5 dz=$3-$6 @@ -117,10 +121,10 @@ while [ "1" ]; do dist=sqrt(dxt^2+dyt^2+dzt^2) dist*=$7 if((dist>=($8-$9))&&(dist<=($8+$9))) { - print "\n" + print "" print $1 " " $2 " " $3 print $4 " " $5 " " $6 " (" dist " - " $8 ")" - print dx " " dy " " dz " " dxt " " dyt " " dzt + print "displace: " dx*X " " dy*Y " " dz*Z } }' fi