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