source: tests/regression/Selection/Atoms/AtomByName/testsuite-selection-unselect-atoms-by-name.at

Candidate_v1.6.1
Last change on this file was 3f6aac, checked in by Frederik Heber <frederik.heber@…>, 8 years ago

Added (Un)selectAtomByName.

  • Descriptor for AtomByName was already present.
  • TESTS: also added regression test.
  • Property mode set to 100644
File size: 3.9 KB
RevLine 
[3f6aac]1#
2# MoleCuilder - creates and alters molecular systems
3# Copyright (C) 2008-2012 University of Bonn
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17#
18### 5. (un)select atoms by element
19
20
21# select element by atomic number: 1, 4
22AT_SETUP([Unselection - All atoms with specific element by atomic number])
23AT_KEYWORDS([unselection atom element unselect-atom-by-element])
24
25file=test-H_present.xyz
26AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
27AT_CHECK([chmod u+w $file], 0)
28AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 -r], 0, [stdout], [stderr])
29AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-H_present.xyz], 0, [ignore], [ignore])
30
31file=test-Be_present.xyz
32AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
33AT_CHECK([chmod u+w $file], 0)
34AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 -r], 0, [stdout], [stderr])
35AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-Be_present.xyz], 0, [ignore], [ignore])
36
37AT_CLEANUP
38
39
40AT_SETUP([Unselection - All atoms with specific element by symbol with Undo])
41AT_KEYWORDS([unselection atom element unselect-atom-by-element undo])
42
43file=test.xyz
44AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
45AT_CHECK([chmod u+w $file], 0)
46AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 --undo -r], 0, [stdout], [stderr])
47AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/empty.xyz], 0, [ignore], [ignore])
48
49file=test.xyz
50AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
51AT_CHECK([chmod u+w $file], 0)
52AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 --undo -r], 0, [stdout], [stderr])
53AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/empty.xyz], 0, [ignore], [ignore])
54
55AT_CLEANUP
56
57AT_SETUP([Unselection - All atoms with specific element by symbol with Redo])
58AT_KEYWORDS([unselection atom element unselect-atom-by-element redo])
59
60file=test-H_present.xyz
61AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
62AT_CHECK([chmod u+w $file], 0)
63AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 --undo --redo -r], 0, [stdout], [stderr])
64AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-H_present.xyz], 0, [ignore], [ignore])
65
66file=test-Be_present.xyz
67AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
68AT_CHECK([chmod u+w $file], 0)
69AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 --undo --redo -r], 0, [stdout], [stderr])
70AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-Be_present.xyz], 0, [ignore], [ignore])
71
72AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.