| 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 | #
|
|---|
| 35 | ### 3. (un)select molecules by formula
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | AT_SETUP([Unselection - Molecule by formula])
|
|---|
| 39 | AT_KEYWORDS([unselection molecule unselect-molecules-by-formula])
|
|---|
| 40 |
|
|---|
| 41 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 42 | srcfile=mix.xyz
|
|---|
| 43 | testfile=test.xyz
|
|---|
| 44 | targetfile=water_missing.xyz
|
|---|
| 45 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 46 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 47 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
|---|
| 48 |
|
|---|
| 49 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 50 | srcfile=mix.xyz
|
|---|
| 51 | testfile=test.xyz
|
|---|
| 52 | targetfile=ethanol_missing.xyz
|
|---|
| 53 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 54 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 55 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
|---|
| 56 |
|
|---|
| 57 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 58 | srcfile=mix.xyz
|
|---|
| 59 | testfile=test.xyz
|
|---|
| 60 | targetfile=benzene_missing.xyz
|
|---|
| 61 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 62 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 63 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
|---|
| 64 |
|
|---|
| 65 | AT_CLEANUP
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 | AT_SETUP([Unselection - Molecule by formula with Undo])
|
|---|
| 69 | AT_KEYWORDS([unselection molecule unselect-molecules-by-formula undo])
|
|---|
| 70 |
|
|---|
| 71 | comparisonfile=mix.xyz
|
|---|
| 72 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 73 | srcfile=mix.xyz
|
|---|
| 74 | testfile=test.xyz
|
|---|
| 75 | targetfile=mix1.xyz
|
|---|
| 76 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 77 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 78 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
|---|
| 79 |
|
|---|
| 80 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 81 | srcfile=mix.xyz
|
|---|
| 82 | testfile=test.xyz
|
|---|
| 83 | targetfile=mix2.xyz
|
|---|
| 84 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 85 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 86 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
|---|
| 87 |
|
|---|
| 88 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 89 | srcfile=mix.xyz
|
|---|
| 90 | testfile=test.xyz
|
|---|
| 91 | targetfile=mix3.xyz
|
|---|
| 92 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 93 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 94 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
|---|
| 95 |
|
|---|
| 96 | AT_CLEANUP
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 | AT_SETUP([Unselection - Molecule by formula with Redo])
|
|---|
| 100 | AT_KEYWORDS([unselection molecule unselect-molecules-by-formula redo])
|
|---|
| 101 |
|
|---|
| 102 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 103 | srcfile=mix.xyz
|
|---|
| 104 | testfile=test.xyz
|
|---|
| 105 | targetfile=water_missing.xyz
|
|---|
| 106 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 107 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 108 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
|---|
| 109 |
|
|---|
| 110 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 111 | srcfile=mix.xyz
|
|---|
| 112 | testfile=test.xyz
|
|---|
| 113 | targetfile=ethanol_missing.xyz
|
|---|
| 114 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 115 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 116 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
|---|
| 117 |
|
|---|
| 118 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
|---|
| 119 | srcfile=mix.xyz
|
|---|
| 120 | testfile=test.xyz
|
|---|
| 121 | targetfile=benzene_missing.xyz
|
|---|
| 122 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
|---|
| 123 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
|---|
| 124 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
|---|
| 125 |
|
|---|
| 126 | AT_CLEANUP
|
|---|