[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 | #
|
---|
[d70fff] | 35 | ### 3. (un)select molecules by formula
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | AT_SETUP([Selection - Molecule by formula])
|
---|
[e611dc] | 39 | AT_KEYWORDS([selection molecule select-molecules-by-formula])
|
---|
[d70fff] | 40 |
|
---|
[7db9bd] | 41 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 42 | srcfile=mix.xyz
|
---|
| 43 | testfile=test.xyz
|
---|
| 44 | targetfile=water.xyz
|
---|
| 45 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 46 | AT_CHECK([../../molecuilder -i $testfile -I --select-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 |
|
---|
[7db9bd] | 49 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 50 | srcfile=mix.xyz
|
---|
| 51 | testfile=test.xyz
|
---|
| 52 | targetfile=ethanol.xyz
|
---|
| 53 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 54 | AT_CHECK([../../molecuilder -i $testfile -I --select-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 |
|
---|
[7db9bd] | 57 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 58 | srcfile=mix.xyz
|
---|
| 59 | testfile=test.xyz
|
---|
| 60 | targetfile=benzene.xyz
|
---|
| 61 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 62 | AT_CHECK([../../molecuilder -i $testfile -I --select-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([Selection - Molecule by formula with Undo])
|
---|
[e611dc] | 69 | AT_KEYWORDS([selection molecule select-molecules-by-formula undo])
|
---|
[d70fff] | 70 |
|
---|
[23958d] | 71 | comparisonfile=empty.xyz
|
---|
[7db9bd] | 72 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 73 | srcfile=mix.xyz
|
---|
| 74 | testfile=test.xyz
|
---|
[23958d] | 75 | targetfile=empty1.xyz
|
---|
[d70fff] | 76 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 77 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
[23958d] | 78 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
[d70fff] | 79 |
|
---|
[7db9bd] | 80 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 81 | srcfile=mix.xyz
|
---|
| 82 | testfile=test.xyz
|
---|
[23958d] | 83 | targetfile=empty2.xyz
|
---|
[d70fff] | 84 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 85 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
[23958d] | 86 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
[d70fff] | 87 |
|
---|
[7db9bd] | 88 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 89 | srcfile=mix.xyz
|
---|
| 90 | testfile=test.xyz
|
---|
[23958d] | 91 | targetfile=empty3.xyz
|
---|
[d70fff] | 92 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 93 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
[23958d] | 94 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
[d70fff] | 95 |
|
---|
| 96 | AT_CLEANUP
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | AT_SETUP([Selection - Molecule by formula with Redo])
|
---|
[e611dc] | 100 | AT_KEYWORDS([selection molecule select-molecules-by-formula redo])
|
---|
[d70fff] | 101 |
|
---|
[7db9bd] | 102 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 103 | srcfile=mix.xyz
|
---|
| 104 | testfile=test.xyz
|
---|
| 105 | targetfile=water.xyz
|
---|
| 106 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 107 | AT_CHECK([../../molecuilder -i $testfile -I --select-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 |
|
---|
[7db9bd] | 110 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 111 | srcfile=mix.xyz
|
---|
| 112 | testfile=test.xyz
|
---|
| 113 | targetfile=ethanol.xyz
|
---|
| 114 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 115 | AT_CHECK([../../molecuilder -i $testfile -I --select-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 |
|
---|
[7db9bd] | 118 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
[d70fff] | 119 | srcfile=mix.xyz
|
---|
| 120 | testfile=test.xyz
|
---|
| 121 | targetfile=benzene.xyz
|
---|
| 122 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 123 | AT_CHECK([../../molecuilder -i $testfile -I --select-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
|
---|