[512f85] | 1 | ### 3. (un)select all atoms inside sphere
|
---|
| 2 |
|
---|
[23b0c2] | 3 |
|
---|
[512f85] | 4 | AT_SETUP([Unselection - All atoms inside sphere])
|
---|
[93d78e8] | 5 | AT_KEYWORDS([unselection atom sphere unselect-atoms-inside-sphere])
|
---|
[23b0c2] | 6 |
|
---|
[512f85] | 7 | file=allatomsinsidesphere.xyz
|
---|
[7db9bd] | 8 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 9 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 10 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" -r], 0, [stdout], [stderr])
|
---|
[7db9bd] | 11 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore])
|
---|
[23b0c2] | 12 |
|
---|
[e69c87] | 13 | # check size of sphere
|
---|
| 14 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether cat is there
|
---|
| 15 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether awk is there
|
---|
| 16 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
[3e1b7b] | 17 | AT_CHECK([cat < $file | awk -F" " '{ if ((NF == 4) && (($2-10)*($2-10)+($3-10)*($3-10)+($4-10)*($4-10)) > 100) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
| 18 | AT_CHECK([fgrep "0" stdout], 0, [ignore], [ignore])
|
---|
| 19 | AT_CHECK([cat < $file | awk -F" " '{ if ((NF == 4) && (($2-10)*($2-10)+($3-10)*($3-10)+($4-10)*($4-10)) < 100) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
[e69c87] | 20 | AT_CHECK([fgrep "524" stdout], 0, [ignore], [ignore])
|
---|
| 21 |
|
---|
| 22 | AT_CLEANUP
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | AT_SETUP([Unselection - All atoms inside sphere with Undo])
|
---|
[93d78e8] | 26 | AT_KEYWORDS([unselection atom sphere unselect-atoms-inside-sphere undo])
|
---|
[e69c87] | 27 |
|
---|
[23b0c2] | 28 | file=allatomsinsidesphere.xyz
|
---|
[7db9bd] | 29 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 30 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 31 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo -r], 0, [stdout], [stderr])
|
---|
[7db9bd] | 32 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/empty.xyz], 0, [ignore], [ignore])
|
---|
[23b0c2] | 33 |
|
---|
[e69c87] | 34 | AT_CLEANUP
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | AT_SETUP([Unselection - All atoms inside sphere with Redo])
|
---|
[93d78e8] | 38 | AT_KEYWORDS([unselection atom sphere unselect-atoms-inside-sphere redo])
|
---|
[e69c87] | 39 |
|
---|
[23b0c2] | 40 | file=allatomsinsidesphere.xyz
|
---|
[7db9bd] | 41 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0)
|
---|
[23b0c2] | 42 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 43 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-sphere 10 --position "10,10,10" --undo --redo -r], 0, [stdout], [stderr])
|
---|
[7db9bd] | 44 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore])
|
---|
[23b0c2] | 45 |
|
---|
[512f85] | 46 | AT_CLEANUP
|
---|