[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 | ### 3. (un)select molecules by formula
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | AT_SETUP([Selection - Molecule by formula])
|
---|
| 22 | AT_KEYWORDS([selection molecule select-molecules-by-formula])
|
---|
| 23 |
|
---|
| 24 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 25 | srcfile=mix.xyz
|
---|
| 26 | testfile=test.xyz
|
---|
| 27 | targetfile=water.xyz
|
---|
| 28 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 29 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula H2O -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 30 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 31 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_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/MoleculeByFormula"
|
---|
| 35 | srcfile=mix.xyz
|
---|
| 36 | testfile=test.xyz
|
---|
| 37 | targetfile=ethanol.xyz
|
---|
| 38 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 39 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula "C2H5(OH)" -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 40 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 41 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 42 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 43 |
|
---|
| 44 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 45 | srcfile=mix.xyz
|
---|
| 46 | testfile=test.xyz
|
---|
| 47 | targetfile=benzene.xyz
|
---|
| 48 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 49 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula C6H6 -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 50 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 51 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 52 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 53 |
|
---|
| 54 | AT_CLEANUP
|
---|
| 55 |
|
---|
| 56 |
|
---|
| 57 | AT_SETUP([Selection - Molecule by formula with Undo])
|
---|
| 58 | AT_KEYWORDS([selection molecule select-molecules-by-formula undo])
|
---|
| 59 |
|
---|
| 60 | comparisonfile=empty.xyz
|
---|
| 61 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 62 | srcfile=mix.xyz
|
---|
| 63 | testfile=test.xyz
|
---|
| 64 | targetfile=empty1.xyz
|
---|
| 65 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 66 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula H2O --undo -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 67 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 68 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 69 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
| 70 |
|
---|
| 71 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 72 | srcfile=mix.xyz
|
---|
| 73 | testfile=test.xyz
|
---|
| 74 | targetfile=empty2.xyz
|
---|
| 75 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 76 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 77 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 78 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 79 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
| 80 |
|
---|
| 81 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 82 | srcfile=mix.xyz
|
---|
| 83 | testfile=test.xyz
|
---|
| 84 | targetfile=empty3.xyz
|
---|
| 85 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 86 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula C6H6 --undo -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 87 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 88 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 89 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
| 90 |
|
---|
| 91 | AT_CLEANUP
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 | AT_SETUP([Selection - Molecule by formula with Redo])
|
---|
| 95 | AT_KEYWORDS([selection molecule select-molecules-by-formula redo])
|
---|
| 96 |
|
---|
| 97 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 98 | srcfile=mix.xyz
|
---|
| 99 | testfile=test.xyz
|
---|
| 100 | targetfile=water.xyz
|
---|
| 101 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 102 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula H2O --undo --redo -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 103 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 104 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 105 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 106 |
|
---|
| 107 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 108 | srcfile=mix.xyz
|
---|
| 109 | testfile=test.xyz
|
---|
| 110 | targetfile=ethanol.xyz
|
---|
| 111 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 112 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 113 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 114 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 115 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 116 |
|
---|
| 117 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
| 118 | srcfile=mix.xyz
|
---|
| 119 | testfile=test.xyz
|
---|
| 120 | targetfile=benzene.xyz
|
---|
| 121 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
| 122 | AT_CHECK([../../molecuilder --dry-run -i $testfile -I --select-molecules-by-formula C6H6 --undo --redo -s $targetfile --no-dry-run --store-session session-selection-select-molecules-by-formula.py --session-type python], 0, [stdout], [stderr])
|
---|
| 123 | AT_CHECK([grep -v "Command.*DryRun" session-selection-select-molecules-by-formula.py >session-selection-select-molecules-by-formula_new.py], 0, [ignore], [ignore])
|
---|
| 124 | AT_CHECK([../../molecuilderguitest session-selection-select-molecules-by-formula_new.py], 0, [stdout], [stderr])
|
---|
| 125 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
| 126 |
|
---|
| 127 | AT_CLEANUP
|
---|