[6253ed] | 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 | #
|
---|
| 19 | # MoleCuilder - creates and alters molecular systems
|
---|
| 20 | # Copyright (C) 2008-2012 University of Bonn
|
---|
| 21 | #
|
---|
| 22 | # This program is free software: you can redistribute it and/or modify
|
---|
| 23 | # it under the terms of the GNU General Public License as published by
|
---|
| 24 | # the Free Software Foundation, either version 3 of the License, or
|
---|
| 25 | # (at your option) any later version.
|
---|
| 26 | #
|
---|
| 27 | # This program is distributed in the hope that it will be useful,
|
---|
| 28 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 30 | # GNU General Public License for more details.
|
---|
| 31 | #
|
---|
| 32 | # You should have received a copy of the GNU General Public License
|
---|
| 33 | # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 34 | #
|
---|
[61c364] | 35 | ### 6. (un)select atom by order
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | AT_SETUP([Unselection - atom with specific order])
|
---|
| 39 | AT_KEYWORDS([unselection order atom unselect-atom-by-order])
|
---|
| 40 | # go through all possible orders (0-7) and remove others
|
---|
| 41 | i=1
|
---|
| 42 | while test $i -le 8; do
|
---|
| 43 | let id=$i-1
|
---|
| 44 | file=order${id}_present.xyz
|
---|
| 45 | # normal
|
---|
| 46 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
|
---|
| 47 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 48 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-order ${i} -r], [], [ignore], [ignore])
|
---|
| 49 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
|
---|
| 50 | ((i+=1))
|
---|
| 51 | done
|
---|
| 52 | # go reverse through all possible orders (0-7) and remove others
|
---|
| 53 | i=1
|
---|
| 54 | while test $i -le 8; do
|
---|
| 55 | let id=8-$i
|
---|
| 56 | file=order${id}_present.xyz
|
---|
| 57 | # normal
|
---|
| 58 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/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-order -${i} -r], [], [ignore], [ignore])
|
---|
| 61 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
|
---|
| 62 | ((i+=1))
|
---|
| 63 | done
|
---|
| 64 | AT_CLEANUP
|
---|
| 65 |
|
---|
| 66 |
|
---|
| 67 | AT_SETUP([Unselection - atom with specific order with Undo])
|
---|
| 68 | AT_KEYWORDS([unselection order atom unselect-atom-by-order undo])
|
---|
| 69 | # go through all possible orders (0-7) and remove others
|
---|
| 70 | i=1
|
---|
| 71 | while test $i -le 8; do
|
---|
| 72 | let id=$i-1
|
---|
| 73 | file=order${id}_present.xyz
|
---|
| 74 | # undo
|
---|
| 75 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
|
---|
| 76 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 77 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-order ${i} --undo -r], [], [ignore], [ignore])
|
---|
| 78 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/empty.xyz])
|
---|
| 79 | ((i+=1))
|
---|
| 80 | done
|
---|
| 81 | # go reverse through all possible orders (0-7) and remove others
|
---|
| 82 | i=1
|
---|
| 83 | while test $i -le 8; do
|
---|
| 84 | let id=8-$i
|
---|
| 85 | file=order${id}_present.xyz
|
---|
| 86 | # undo
|
---|
| 87 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
|
---|
| 88 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 89 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-order -${i} --undo -r], [], [ignore], [ignore])
|
---|
| 90 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/empty.xyz])
|
---|
| 91 | ((i+=1))
|
---|
| 92 | done
|
---|
| 93 | AT_CLEANUP
|
---|
| 94 |
|
---|
| 95 |
|
---|
| 96 | AT_SETUP([Unselection - atom with specific order with Redo])
|
---|
| 97 | AT_KEYWORDS([unselection order atom unselect-atom-by-order redo])
|
---|
| 98 | # go through all possible orders (0-7) and remove others
|
---|
| 99 | i=1
|
---|
| 100 | while test $i -le 8; do
|
---|
| 101 | let id=$i-1
|
---|
| 102 | file=order${id}_present.xyz
|
---|
| 103 | # redo
|
---|
| 104 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
|
---|
| 105 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 106 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-order ${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
| 107 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
|
---|
| 108 | ((i+=1))
|
---|
| 109 | done
|
---|
| 110 | # go reverse through all possible orders (0-7) and remove others
|
---|
| 111 | i=1
|
---|
| 112 | while test $i -le 8; do
|
---|
| 113 | let id=8-$i
|
---|
| 114 | file=order${id}_present.xyz
|
---|
| 115 | # redo
|
---|
| 116 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/pre/test.xyz $file])
|
---|
| 117 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 118 | AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-order -${i} --undo --redo -r], [], [ignore], [ignore])
|
---|
| 119 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByOrder/post/id${id}_present.xyz])
|
---|
| 120 | ((i+=1))
|
---|
| 121 | done
|
---|
| 122 | AT_CLEANUP
|
---|