| [dd6c07] | 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 | ### (un)select molecules by order
 | 
|---|
 | 19 | 
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 | AT_SETUP([Unselection - Molecule by order, backward])
 | 
|---|
 | 22 | AT_KEYWORDS([unselection molecule unselect-molecule-by-order])
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
 | 
|---|
 | 25 | srcfile=twowater.xyz
 | 
|---|
 | 26 | testfile=test.xyz
 | 
|---|
 | 27 | targetfile=water_id1.xyz
 | 
|---|
 | 28 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
 | 
|---|
 | 29 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-all-molecules --unselect-molecule-by-order -2 -s $targetfile --no-dry-run --store-session session-selection-unselect-molecule-by-order-backward.py --session-type python], 0, [stdout], [stderr])
 | 
|---|
 | 30 | AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-molecule-by-order-backward.py >session-selection-unselect-molecule-by-order-backward_new.py], 0, [ignore], [ignore])
 | 
|---|
 | 31 | AT_CHECK([../../molecuilderguitest session-selection-unselect-molecule-by-order-backward_new.py], 0, [stdout], [stderr])
 | 
|---|
 | 32 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
 | 
|---|
 | 33 | 
 | 
|---|
 | 34 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
 | 
|---|
 | 35 | srcfile=twowater.xyz
 | 
|---|
 | 36 | testfile=test.xyz
 | 
|---|
 | 37 | targetfile=water_id0.xyz
 | 
|---|
 | 38 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
 | 
|---|
 | 39 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-all-molecules --unselect-molecule-by-order -1 -s $targetfile --no-dry-run --store-session session-selection-unselect-molecule-by-order-backward.py --session-type python], 0, [stdout], [stderr])
 | 
|---|
 | 40 | AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-molecule-by-order-backward.py >session-selection-unselect-molecule-by-order-backward_new.py], 0, [ignore], [ignore])
 | 
|---|
 | 41 | AT_CHECK([../../molecuilderguitest session-selection-unselect-molecule-by-order-backward_new.py], 0, [stdout], [stderr])
 | 
|---|
 | 42 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
 | 
|---|
 | 43 | 
 | 
|---|
 | 44 | AT_CLEANUP
 | 
|---|
 | 45 | 
 | 
|---|
 | 46 | 
 | 
|---|
 | 47 | AT_SETUP([Unselection - Molecule by order, backward with Undo])
 | 
|---|
 | 48 | AT_KEYWORDS([unselection molecule unselect-molecule-by-order undo])
 | 
|---|
 | 49 | 
 | 
|---|
 | 50 | comparisonfile=twowater.xyz
 | 
|---|
 | 51 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
 | 
|---|
 | 52 | srcfile=twowater.xyz
 | 
|---|
 | 53 | testfile=test.xyz
 | 
|---|
 | 54 | targetfile=twowater1.xyz
 | 
|---|
 | 55 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
 | 
|---|
 | 56 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-all-molecules --unselect-molecule-by-order -2 --undo -s $targetfile --no-dry-run --store-session session-selection-unselect-molecule-by-order-backward.py --session-type python], 0, [stdout], [stderr])
 | 
|---|
 | 57 | AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-molecule-by-order-backward.py >session-selection-unselect-molecule-by-order-backward_new.py], 0, [ignore], [ignore])
 | 
|---|
 | 58 | AT_CHECK([../../molecuilderguitest session-selection-unselect-molecule-by-order-backward_new.py], 0, [stdout], [stderr])
 | 
|---|
 | 59 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
 | 
|---|
 | 60 | 
 | 
|---|
 | 61 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
 | 
|---|
 | 62 | srcfile=twowater.xyz
 | 
|---|
 | 63 | testfile=test.xyz
 | 
|---|
 | 64 | targetfile=twowater2.xyz
 | 
|---|
 | 65 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
 | 
|---|
 | 66 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-all-molecules --unselect-molecule-by-order -1 --undo -s $targetfile --no-dry-run --store-session session-selection-unselect-molecule-by-order-backward.py --session-type python], 0, [stdout], [stderr])
 | 
|---|
 | 67 | AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-molecule-by-order-backward.py >session-selection-unselect-molecule-by-order-backward_new.py], 0, [ignore], [ignore])
 | 
|---|
 | 68 | AT_CHECK([../../molecuilderguitest session-selection-unselect-molecule-by-order-backward_new.py], 0, [stdout], [stderr])
 | 
|---|
 | 69 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
 | 
|---|
 | 70 | 
 | 
|---|
 | 71 | AT_CLEANUP
 | 
|---|
 | 72 | 
 | 
|---|
 | 73 | 
 | 
|---|
 | 74 | AT_SETUP([Unselection - Molecule by order, backward with Redo])
 | 
|---|
 | 75 | AT_KEYWORDS([unselection molecule unselect-molecule-by-order redo])
 | 
|---|
 | 76 | 
 | 
|---|
 | 77 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
 | 
|---|
 | 78 | srcfile=twowater.xyz
 | 
|---|
 | 79 | testfile=test.xyz
 | 
|---|
 | 80 | targetfile=water_id1.xyz
 | 
|---|
 | 81 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
 | 
|---|
 | 82 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-all-molecules --unselect-molecule-by-order -2 --undo --redo -s $targetfile --no-dry-run --store-session session-selection-unselect-molecule-by-order-backward.py --session-type python], 0, [stdout], [stderr])
 | 
|---|
 | 83 | AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-molecule-by-order-backward.py >session-selection-unselect-molecule-by-order-backward_new.py], 0, [ignore], [ignore])
 | 
|---|
 | 84 | AT_CHECK([../../molecuilderguitest session-selection-unselect-molecule-by-order-backward_new.py], 0, [stdout], [stderr])
 | 
|---|
 | 85 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
 | 
|---|
 | 86 | 
 | 
|---|
 | 87 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByOrder"
 | 
|---|
 | 88 | srcfile=twowater.xyz
 | 
|---|
 | 89 | testfile=test.xyz
 | 
|---|
 | 90 | targetfile=water_id0.xyz
 | 
|---|
 | 91 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
 | 
|---|
 | 92 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-all-molecules --unselect-molecule-by-order -1 --undo --redo -s $targetfile --no-dry-run --store-session session-selection-unselect-molecule-by-order-backward.py --session-type python], 0, [stdout], [stderr])
 | 
|---|
 | 93 | AT_CHECK([grep -v "Command.*DryRun" session-selection-unselect-molecule-by-order-backward.py >session-selection-unselect-molecule-by-order-backward_new.py], 0, [ignore], [ignore])
 | 
|---|
 | 94 | AT_CHECK([../../molecuilderguitest session-selection-unselect-molecule-by-order-backward_new.py], 0, [stdout], [stderr])
 | 
|---|
 | 95 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
 | 
|---|
 | 96 | 
 | 
|---|
 | 97 | AT_CLEANUP
 | 
|---|