[512f85] | 1 | ### 2. (un)select all atoms inside cuboid
|
---|
| 2 |
|
---|
| 3 | AT_SETUP([Selection - All atoms inside cuboid])
|
---|
| 4 | AT_KEYWORDS([selection,cuboid])
|
---|
| 5 | file=allatomsoutsidecuboid.xyz
|
---|
[b9bfa6] | 6 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[512f85] | 7 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
|
---|
[b9bfa6] | 8 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/$file], 0, [ignore], [ignore])
|
---|
| 9 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[512f85] | 10 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo -r], 0, [stdout], [stderr])
|
---|
[b9bfa6] | 11 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
|
---|
| 12 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[512f85] | 13 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo --redo -r], 0, [stdout], [stderr])
|
---|
[b9bfa6] | 14 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/$file], 0, [ignore], [ignore])
|
---|
[512f85] | 15 | # check size of cuboid
|
---|
| 16 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
| 17 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
| 18 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
| 19 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) || ($3 > 10) || ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 20 | AT_CHECK([fgrep "838" stdout], 0, [ignore], [ignore])
|
---|
| 21 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) && ($3 < 10) && ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 22 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
| 23 | AT_CLEANUP
|
---|
| 24 |
|
---|
[23d7ff] | 25 | AT_SETUP([Selection - All atoms inside cuboid with defaults])
|
---|
| 26 | AT_KEYWORDS([selection,cuboid])
|
---|
| 27 | file=allatomsoutsidecuboid.xyz
|
---|
| 28 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
| 29 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" -r], 0, [stdout], [stderr])
|
---|
| 30 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/$file], 0, [ignore], [ignore])
|
---|
| 31 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
| 32 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo -r], 0, [stdout], [stderr])
|
---|
| 33 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
|
---|
| 34 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
| 35 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo --redo -r], 0, [stdout], [stderr])
|
---|
| 36 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/$file], 0, [ignore], [ignore])
|
---|
| 37 | # check size of cuboid
|
---|
| 38 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
| 39 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
| 40 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
| 41 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) || ($3 > 10) || ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 42 | AT_CHECK([fgrep "838" stdout], 0, [ignore], [ignore])
|
---|
| 43 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) && ($3 < 10) && ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 44 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
| 45 | AT_CLEANUP
|
---|
| 46 |
|
---|
[512f85] | 47 | AT_SETUP([Unselection - All atoms inside cuboid])
|
---|
| 48 | AT_KEYWORDS([selection,cuboid])
|
---|
| 49 | file=allatomsinsidecuboid.xyz
|
---|
[b9bfa6] | 50 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[512f85] | 51 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
|
---|
[b9bfa6] | 52 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/$file], 0, [ignore], [ignore])
|
---|
| 53 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[512f85] | 54 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo -r], 0, [stdout], [stderr])
|
---|
[b9bfa6] | 55 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/empty.xyz], 0, [ignore], [ignore])
|
---|
| 56 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[512f85] | 57 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo --redo -r], 0, [stdout], [stderr])
|
---|
[b9bfa6] | 58 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/$file], 0, [ignore], [ignore])
|
---|
[512f85] | 59 | # check size of cuboid
|
---|
| 60 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
| 61 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
| 62 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
| 63 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) || ($3 < 10) || ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 64 | AT_CHECK([fgrep "193" stdout], 0, [ignore], [ignore])
|
---|
| 65 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) && ($3 > 10) && ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 66 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
| 67 | AT_CLEANUP
|
---|