### 3. (un)select all atoms inside sphere AT_SETUP([Selection - All atoms inside sphere]) AT_KEYWORDS([selection,sphere]) file=allatomsoutsidesphere.xyz AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) AT_CHECK([chmod u+w $file], 0) AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" -r], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore]) # check size of sphere AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there AT_CHECK([cat < $file | awk -F" " '{ if (($2-10)*($2-10)+($3-10)*($3-10)+($4-10)*($4-10) > 100) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore]) AT_CHECK([fgrep "507" stdout], 0, [ignore], [ignore]) AT_CHECK([cat < $file | awk -F" " '{ if (($2-10)*($2-10)+($3-10)*($3-10)+($4-10)*($4-10) < 100) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore]) AT_CHECK([fgrep "0" stdout], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Selection - All atoms inside sphere with Undo]) AT_KEYWORDS([selection,sphere]) file=allatomsoutsidesphere.xyz AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) AT_CHECK([chmod u+w $file], 0) AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Selection - All atoms inside sphere with Redo]) AT_KEYWORDS([selection,sphere]) file=allatomsoutsidesphere.xyz AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) AT_CHECK([chmod u+w $file], 0) AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore]) AT_CLEANUP