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
|
---|
10 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
11 | AT_CHECK([chmod u+w $file], 0)
|
---|
12 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} -r], [], [ignore], [ignore])
|
---|
13 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_missing.xyz])
|
---|
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
|
---|
26 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
27 | AT_CHECK([chmod u+w $file], 0)
|
---|
28 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
|
---|
29 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/test-undo.xyz])
|
---|
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
|
---|
41 | # redo
|
---|
42 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
43 | AT_CHECK([chmod u+w $file], 0)
|
---|
44 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-id ${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
45 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_missing.xyz])
|
---|
46 | ((i+=1))
|
---|
47 | done
|
---|
48 | AT_CLEANUP
|
---|
49 |
|
---|
50 |
|
---|
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
|
---|
58 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
59 | AT_CHECK([chmod u+w $file], 0)
|
---|
60 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} -r], [], [ignore], [ignore])
|
---|
61 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
---|
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
|
---|
74 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
75 | AT_CHECK([chmod u+w $file], 0)
|
---|
76 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo -r], [], [ignore], [ignore])
|
---|
77 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/empty.xyz])
|
---|
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
|
---|
89 | # redo
|
---|
90 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/pre/test.xyz $file])
|
---|
91 | AT_CHECK([chmod u+w $file], 0)
|
---|
92 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-id ${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
93 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomById/post/id${i}_present.xyz])
|
---|
94 | ((i+=1))
|
---|
95 | done
|
---|
96 | AT_CLEANUP
|
---|