[512f85] | 1 | ### 6. (un)select atom by id
|
---|
| 2 |
|
---|
| 3 | AT_SETUP([Selection - atom with specific id])
|
---|
| 4 | AT_KEYWORDS([selection,id,atom])
|
---|
| 5 | # go through all possible ids (0-7) and removed
|
---|
| 6 | i=0
|
---|
| 7 | while test $i -lt 8; do
|
---|
| 8 | file=id${i}_missing.xyz
|
---|
| 9 | # normal
|
---|
[b9bfa6] | 10 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 11 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 12 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} -r], [], [ignore], [ignore])
|
---|
[caeeb8] | 13 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_missing.xyz])
|
---|
[e69c87] | 14 | ((i+=1))
|
---|
| 15 | done
|
---|
| 16 | AT_CLEANUP
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | AT_SETUP([Selection - atom with specific id with Undo])
|
---|
| 20 | AT_KEYWORDS([selection,id,atom])
|
---|
| 21 | # go through all possible ids (0-7) and removed
|
---|
| 22 | i=0
|
---|
| 23 | while test $i -lt 8; do
|
---|
| 24 | file=id${i}_missing.xyz
|
---|
| 25 | # undo
|
---|
[b9bfa6] | 26 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 27 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 28 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
|
---|
[caeeb8] | 29 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/test-undo.xyz])
|
---|
[e69c87] | 30 | ((i+=1))
|
---|
| 31 | done
|
---|
| 32 | AT_CLEANUP
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | AT_SETUP([Selection - atom with specific id with Redo])
|
---|
| 36 | AT_KEYWORDS([selection,id,atom])
|
---|
| 37 | # go through all possible ids (0-7) and removed
|
---|
| 38 | i=0
|
---|
| 39 | while test $i -lt 8; do
|
---|
| 40 | file=id${i}_missing.xyz
|
---|
[512f85] | 41 | # redo
|
---|
[b9bfa6] | 42 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 43 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 44 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
[caeeb8] | 45 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_missing.xyz])
|
---|
[512f85] | 46 | ((i+=1))
|
---|
| 47 | done
|
---|
| 48 | AT_CLEANUP
|
---|
| 49 |
|
---|
[e69c87] | 50 |
|
---|
[512f85] | 51 | AT_SETUP([Unselection - atom with specific id])
|
---|
| 52 | AT_KEYWORDS([selection,id,atom])
|
---|
| 53 | # go through all possible ids (0-7) and remove others
|
---|
| 54 | i=0
|
---|
| 55 | while test $i -lt 8; do
|
---|
| 56 | file=id${i}_present.xyz
|
---|
| 57 | # normal
|
---|
[b9bfa6] | 58 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 59 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 60 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} -r], [], [ignore], [ignore])
|
---|
[caeeb8] | 61 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
---|
[e69c87] | 62 | ((i+=1))
|
---|
| 63 | done
|
---|
| 64 | AT_CLEANUP
|
---|
| 65 |
|
---|
| 66 |
|
---|
| 67 | AT_SETUP([Unselection - atom with specific id with Undo])
|
---|
| 68 | AT_KEYWORDS([selection,id,atom])
|
---|
| 69 | # go through all possible ids (0-7) and remove others
|
---|
| 70 | i=0
|
---|
| 71 | while test $i -lt 8; do
|
---|
| 72 | file=id${i}_present.xyz
|
---|
| 73 | # undo
|
---|
[b9bfa6] | 74 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 75 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 76 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
|
---|
[b9bfa6] | 77 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/empty.xyz])
|
---|
[e69c87] | 78 | ((i+=1))
|
---|
| 79 | done
|
---|
| 80 | AT_CLEANUP
|
---|
| 81 |
|
---|
| 82 |
|
---|
| 83 | AT_SETUP([Unselection - atom with specific id with Redo])
|
---|
| 84 | AT_KEYWORDS([selection,id,atom])
|
---|
| 85 | # go through all possible ids (0-7) and remove others
|
---|
| 86 | i=0
|
---|
| 87 | while test $i -lt 8; do
|
---|
| 88 | file=id${i}_present.xyz
|
---|
[512f85] | 89 | # redo
|
---|
[b9bfa6] | 90 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 91 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 92 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
[caeeb8] | 93 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
---|
[512f85] | 94 | ((i+=1))
|
---|
| 95 | done
|
---|
| 96 | AT_CLEANUP
|
---|