| 1 | ### 6. (un)select atom by id
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 | AT_SETUP([Unselection - atom with specific id])
|
|---|
| 5 | AT_KEYWORDS([unselection,id,atom,unselect-atom-by-id])
|
|---|
| 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
|
|---|
| 11 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomById/pre/test.xyz $file])
|
|---|
| 12 | AT_CHECK([chmod u+w $file], 0)
|
|---|
| 13 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} -r], [], [ignore], [ignore])
|
|---|
| 14 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
|---|
| 15 | ((i+=1))
|
|---|
| 16 | done
|
|---|
| 17 | AT_CLEANUP
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | AT_SETUP([Unselection - atom with specific id with Undo])
|
|---|
| 21 | AT_KEYWORDS([unselection,id,atom,unselect-atom-by-id,undo])
|
|---|
| 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
|
|---|
| 27 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomById/pre/test.xyz $file])
|
|---|
| 28 | AT_CHECK([chmod u+w $file], 0)
|
|---|
| 29 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
|
|---|
| 30 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomById/post/empty.xyz])
|
|---|
| 31 | ((i+=1))
|
|---|
| 32 | done
|
|---|
| 33 | AT_CLEANUP
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | AT_SETUP([Unselection - atom with specific id with Redo])
|
|---|
| 37 | AT_KEYWORDS([unselection,id,atom,unselect-atom-by-id,redo])
|
|---|
| 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
|
|---|
| 42 | # redo
|
|---|
| 43 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomById/pre/test.xyz $file])
|
|---|
| 44 | AT_CHECK([chmod u+w $file], 0)
|
|---|
| 45 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo --redo -r], [], [ignore], [ignore])
|
|---|
| 46 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
|---|
| 47 | ((i+=1))
|
|---|
| 48 | done
|
|---|
| 49 | AT_CLEANUP
|
|---|