[512f85] | 1 | ### 6. (un)select atom by id
|
---|
| 2 |
|
---|
[e69c87] | 3 |
|
---|
[512f85] | 4 | AT_SETUP([Unselection - atom with specific id])
|
---|
| 5 | AT_KEYWORDS([selection,id,atom])
|
---|
| 6 | # go through all possible ids (0-7) and remove others
|
---|
| 7 | i=0
|
---|
| 8 | while test $i -lt 8; do
|
---|
| 9 | file=id${i}_present.xyz
|
---|
| 10 | # normal
|
---|
[b9bfa6] | 11 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 12 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 13 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} -r], [], [ignore], [ignore])
|
---|
[caeeb8] | 14 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
---|
[e69c87] | 15 | ((i+=1))
|
---|
| 16 | done
|
---|
| 17 | AT_CLEANUP
|
---|
| 18 |
|
---|
| 19 |
|
---|
| 20 | AT_SETUP([Unselection - atom with specific id with Undo])
|
---|
| 21 | AT_KEYWORDS([selection,id,atom])
|
---|
| 22 | # go through all possible ids (0-7) and remove others
|
---|
| 23 | i=0
|
---|
| 24 | while test $i -lt 8; do
|
---|
| 25 | file=id${i}_present.xyz
|
---|
| 26 | # undo
|
---|
[b9bfa6] | 27 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 28 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 29 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
|
---|
[b9bfa6] | 30 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/empty.xyz])
|
---|
[e69c87] | 31 | ((i+=1))
|
---|
| 32 | done
|
---|
| 33 | AT_CLEANUP
|
---|
| 34 |
|
---|
| 35 |
|
---|
| 36 | AT_SETUP([Unselection - atom with specific id with Redo])
|
---|
| 37 | AT_KEYWORDS([selection,id,atom])
|
---|
| 38 | # go through all possible ids (0-7) and remove others
|
---|
| 39 | i=0
|
---|
| 40 | while test $i -lt 8; do
|
---|
| 41 | file=id${i}_present.xyz
|
---|
[512f85] | 42 | # redo
|
---|
[b9bfa6] | 43 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
[23b0c2] | 44 | AT_CHECK([chmod u+w $file], 0)
|
---|
[512f85] | 45 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
[caeeb8] | 46 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
---|
[512f85] | 47 | ((i+=1))
|
---|
| 48 | done
|
---|
| 49 | AT_CLEANUP
|
---|