[512f85] | 1 | ### 2. (un)select all atoms inside cuboid
|
---|
| 2 |
|
---|
| 3 | AT_SETUP([Selection - All atoms inside cuboid])
|
---|
| 4 | AT_KEYWORDS([selection,cuboid])
|
---|
[23b0c2] | 5 |
|
---|
[512f85] | 6 | file=allatomsoutsidecuboid.xyz
|
---|
[b9bfa6] | 7 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 8 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 9 | 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])
|
---|
[23b0c2] | 10 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
| 11 |
|
---|
| 12 | file=allatomsoutsidecuboid.xyz
|
---|
[b9bfa6] | 13 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 14 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 15 | 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] | 16 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
|
---|
[23b0c2] | 17 |
|
---|
| 18 | file=allatomsoutsidecuboid.xyz
|
---|
[b9bfa6] | 19 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 20 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 21 | 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])
|
---|
[23b0c2] | 22 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
| 23 |
|
---|
[512f85] | 24 | # check size of cuboid
|
---|
| 25 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
| 26 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
| 27 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
| 28 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) || ($3 > 10) || ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 29 | AT_CHECK([fgrep "838" stdout], 0, [ignore], [ignore])
|
---|
| 30 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) && ($3 < 10) && ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 31 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
[23b0c2] | 32 |
|
---|
[512f85] | 33 | AT_CLEANUP
|
---|
| 34 |
|
---|
[23b0c2] | 35 |
|
---|
[23d7ff] | 36 | AT_SETUP([Selection - All atoms inside cuboid with defaults])
|
---|
| 37 | AT_KEYWORDS([selection,cuboid])
|
---|
[23b0c2] | 38 |
|
---|
[23d7ff] | 39 | file=allatomsoutsidecuboid.xyz
|
---|
| 40 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 41 | AT_CHECK([chmod u+w $file], 0)
|
---|
[23d7ff] | 42 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" -r], 0, [stdout], [stderr])
|
---|
[23b0c2] | 43 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
| 44 |
|
---|
| 45 | file=allatomsoutsidecuboid.xyz
|
---|
[23d7ff] | 46 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 47 | AT_CHECK([chmod u+w $file], 0)
|
---|
[23d7ff] | 48 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo -r], 0, [stdout], [stderr])
|
---|
| 49 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
|
---|
[23b0c2] | 50 |
|
---|
| 51 | file=allatomsoutsidecuboid.xyz
|
---|
[23d7ff] | 52 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 53 | AT_CHECK([chmod u+w $file], 0)
|
---|
[23d7ff] | 54 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo --redo -r], 0, [stdout], [stderr])
|
---|
[23b0c2] | 55 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
| 56 |
|
---|
[23d7ff] | 57 | # check size of cuboid
|
---|
| 58 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
| 59 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
| 60 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
| 61 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) || ($3 > 10) || ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 62 | AT_CHECK([fgrep "838" stdout], 0, [ignore], [ignore])
|
---|
| 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 "1" stdout], 0, [ignore], [ignore])
|
---|
[23b0c2] | 65 |
|
---|
[23d7ff] | 66 | AT_CLEANUP
|
---|
| 67 |
|
---|
[23b0c2] | 68 |
|
---|
[512f85] | 69 | AT_SETUP([Unselection - All atoms inside cuboid])
|
---|
| 70 | AT_KEYWORDS([selection,cuboid])
|
---|
[23b0c2] | 71 |
|
---|
[512f85] | 72 | file=allatomsinsidecuboid.xyz
|
---|
[b9bfa6] | 73 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 74 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 75 | 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])
|
---|
[23b0c2] | 76 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
| 77 |
|
---|
| 78 | file=allatomsinsidecuboid.xyz
|
---|
[b9bfa6] | 79 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 80 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 81 | 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] | 82 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/empty.xyz], 0, [ignore], [ignore])
|
---|
[23b0c2] | 83 |
|
---|
| 84 | file=allatomsinsidecuboid.xyz
|
---|
[b9bfa6] | 85 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 86 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 87 | 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])
|
---|
[23b0c2] | 88 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
| 89 |
|
---|
[512f85] | 90 | # check size of cuboid
|
---|
| 91 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
| 92 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
| 93 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
| 94 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) || ($3 < 10) || ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 95 | AT_CHECK([fgrep "193" stdout], 0, [ignore], [ignore])
|
---|
| 96 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) && ($3 > 10) && ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 97 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
[23b0c2] | 98 |
|
---|
[512f85] | 99 | AT_CLEANUP
|
---|