1 | ### 5. (un)select atoms by element
|
---|
2 |
|
---|
3 | # select element by atomic number: 1, 4
|
---|
4 | AT_SETUP([Selection - All atoms with specific element by atomic number])
|
---|
5 | AT_KEYWORDS([selection,atom,element,atomic number])
|
---|
6 |
|
---|
7 | file=test-H_missing.xyz
|
---|
8 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
9 | AT_CHECK([chmod u+w $file], 0)
|
---|
10 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-element 1 -r], 0, [stdout], [stderr])
|
---|
11 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-H_missing.xyz], 0, [ignore], [ignore])
|
---|
12 |
|
---|
13 | file=test-Be_missing.xyz
|
---|
14 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
15 | AT_CHECK([chmod u+w $file], 0)
|
---|
16 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-element 4 -r], 0, [stdout], [stderr])
|
---|
17 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-Be_missing.xyz], 0, [ignore], [ignore])
|
---|
18 |
|
---|
19 | AT_CLEANUP
|
---|
20 |
|
---|
21 |
|
---|
22 | AT_SETUP([Selection - All atoms with specific element by symbol with Undo])
|
---|
23 | AT_KEYWORDS([element,symbol])
|
---|
24 |
|
---|
25 | file=test.xyz
|
---|
26 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
27 | AT_CHECK([chmod u+w $file], 0)
|
---|
28 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-element 1 --undo -r], 0, [stdout], [stderr])
|
---|
29 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test.xyz], 0, [ignore], [ignore])
|
---|
30 |
|
---|
31 | file=test.xyz
|
---|
32 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
33 | AT_CHECK([chmod u+w $file], 0)
|
---|
34 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-element 4 --undo -r], 0, [stdout], [stderr])
|
---|
35 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test.xyz], 0, [ignore], [ignore])
|
---|
36 |
|
---|
37 | AT_CLEANUP
|
---|
38 |
|
---|
39 | AT_SETUP([Selection - All atoms with specific element by symbol with Redo])
|
---|
40 | AT_KEYWORDS([element,symbol])
|
---|
41 |
|
---|
42 | file=test-H_missing.xyz
|
---|
43 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
44 | AT_CHECK([chmod u+w $file], 0)
|
---|
45 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-element 1 --undo --redo -r], 0, [stdout], [stderr])
|
---|
46 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-H_missing.xyz], 0, [ignore], [ignore])
|
---|
47 |
|
---|
48 | file=test-Be_missing.xyz
|
---|
49 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
50 | AT_CHECK([chmod u+w $file], 0)
|
---|
51 | AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-element 4 --undo --redo -r], 0, [stdout], [stderr])
|
---|
52 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-Be_missing.xyz], 0, [ignore], [ignore])
|
---|
53 |
|
---|
54 | AT_CLEANUP
|
---|
55 |
|
---|
56 |
|
---|
57 | # select element by atomic number: 1, 4
|
---|
58 | AT_SETUP([Unselection - All atoms with specific element by atomic number])
|
---|
59 | AT_KEYWORDS([selection,atom,element,atomic number])
|
---|
60 |
|
---|
61 | file=test-H_present.xyz
|
---|
62 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
63 | AT_CHECK([chmod u+w $file], 0)
|
---|
64 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 -r], 0, [stdout], [stderr])
|
---|
65 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-H_present.xyz], 0, [ignore], [ignore])
|
---|
66 |
|
---|
67 | file=test-Be_present.xyz
|
---|
68 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
69 | AT_CHECK([chmod u+w $file], 0)
|
---|
70 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 -r], 0, [stdout], [stderr])
|
---|
71 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-Be_present.xyz], 0, [ignore], [ignore])
|
---|
72 |
|
---|
73 | AT_CLEANUP
|
---|
74 |
|
---|
75 |
|
---|
76 | AT_SETUP([Unselection - All atoms with specific element by symbol with Undo])
|
---|
77 | AT_KEYWORDS([element,symbol])
|
---|
78 |
|
---|
79 | file=test.xyz
|
---|
80 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
81 | AT_CHECK([chmod u+w $file], 0)
|
---|
82 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 --undo -r], 0, [stdout], [stderr])
|
---|
83 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/empty.xyz], 0, [ignore], [ignore])
|
---|
84 |
|
---|
85 | file=test.xyz
|
---|
86 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
87 | AT_CHECK([chmod u+w $file], 0)
|
---|
88 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 --undo -r], 0, [stdout], [stderr])
|
---|
89 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/empty.xyz], 0, [ignore], [ignore])
|
---|
90 |
|
---|
91 | AT_CLEANUP
|
---|
92 |
|
---|
93 | AT_SETUP([Unselection - All atoms with specific element by symbol with Redo])
|
---|
94 | AT_KEYWORDS([element,symbol])
|
---|
95 |
|
---|
96 | file=test-H_present.xyz
|
---|
97 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
98 | AT_CHECK([chmod u+w $file], 0)
|
---|
99 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 --undo --redo -r], 0, [stdout], [stderr])
|
---|
100 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-H_present.xyz], 0, [ignore], [ignore])
|
---|
101 |
|
---|
102 | file=test-Be_present.xyz
|
---|
103 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
|
---|
104 | AT_CHECK([chmod u+w $file], 0)
|
---|
105 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 --undo --redo -r], 0, [stdout], [stderr])
|
---|
106 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomByElement/post/test-Be_present.xyz], 0, [ignore], [ignore])
|
---|
107 |
|
---|
108 | AT_CLEANUP |
---|