X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fposic.git;a=blobdiff_plain;f=vasp_tools%2Fvisualize;h=1ed430ca0786a2c479baaa8f8c32e37c08a7acff;hp=793e72eb85946b3f2cbcf931962ef07d6e22cbd5;hb=d13da35aeda0b12006d4568b271b26c8d9365c5a;hpb=35c146f98c24f0a72a3c6f06f2f6a1a776c26f69 diff --git a/vasp_tools/visualize b/vasp_tools/visualize index 793e72e..1ed430c 100755 --- a/vasp_tools/visualize +++ b/vasp_tools/visualize @@ -71,8 +71,13 @@ while [ "$1" ]; do my1=$5; my2=$6; my3=$7; mz1=$8; mz2=$9; mz3=${10}; mirror=1; shift 10;; - -A) ab=1; - anr=$2; cutoff=$3; shift 3;; + -A) ab=$2; shift 2; + ((cnt=1)) + while [ $cnt -le $ab ]; do + anr[$cnt]=$1; shift 1; + ((cnt+=1)) + done + cutoff=$1; shift 1;; *) echo "options:" echo "########" @@ -351,7 +356,11 @@ EOF fi # auto bonds - if [ "$ab" = "1" ]; then + if [ "$ab" != "0" ]; then + ((cnt=1)) + while [ $cnt -le $ab ]; do + anr=${anr[$cnt]} + ((tmp=anr+1)) line="`sed -n ${tmp}p $file`" aX=`echo $line | awk '{ print $2 }'` @@ -409,6 +418,9 @@ EOF } }' >> temp.pov + + ((cnt+=1)) + done fi # add camera and light source