[a84e8d] | 1 | #
|
---|
| 2 | # MoleCuilder - creates and alters molecular systems
|
---|
| 3 | # Copyright (C) 2014 Frederik Heber
|
---|
| 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 | ### 10. pop molecule selection
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | AT_SETUP([Selection - Pop molecule selection])
|
---|
| 22 | AT_KEYWORDS([selection molecule select-molecule-by-id push-molecule-selection pop-molecule-selection unselect-all-molecules])
|
---|
| 23 |
|
---|
| 24 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/PopMoleculeSelection"
|
---|
| 25 | srcfile=box.xyz
|
---|
| 26 | testfile=test.xyz
|
---|
| 27 | targetfile=water_id2_4.xyz
|
---|
| 28 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 29 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 2 4 --push-molecule-selection --unselect-all-molecules --pop-molecule-selection -s $targetfile], 0, [stdout], [stderr])
|
---|
| 30 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 31 |
|
---|
| 32 | AT_CLEANUP
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | AT_SETUP([Selection - Pop molecule selection with Undo])
|
---|
| 36 | AT_KEYWORDS([selection molecule select-molecule-by-id push-molecule-selection pop-molecule-selection unselect-all-molecules undo])
|
---|
| 37 |
|
---|
| 38 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/PopMoleculeSelection"
|
---|
| 39 | srcfile=box.xyz
|
---|
| 40 | testfile=test.xyz
|
---|
| 41 | targetfile=empty.xyz
|
---|
| 42 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 43 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 2 4 --push-molecule-selection --unselect-all-molecules --pop-molecule-selection --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
| 44 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 45 |
|
---|
| 46 | AT_CLEANUP
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 | AT_SETUP([Selection - Pop molecule selection with Redo])
|
---|
| 50 | AT_KEYWORDS([selection molecule select-molecule-by-id push-molecule-selection pop-molecule-selection unselect-all-molecules redo])
|
---|
| 51 |
|
---|
| 52 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/PopMoleculeSelection"
|
---|
| 53 | srcfile=box.xyz
|
---|
| 54 | testfile=test.xyz
|
---|
| 55 | targetfile=water_id2_4.xyz
|
---|
| 56 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 57 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecule-by-id 2 4 --push-molecule-selection --unselect-all-molecules --pop-molecule-selection --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
---|
| 58 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 59 |
|
---|
| 60 | AT_CLEANUP
|
---|
| 61 |
|
---|