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 -i $testfile -I --select-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr])
|
---|
30 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
31 |
|
---|
32 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
33 | srcfile=mix.xyz
|
---|
34 | testfile=test.xyz
|
---|
35 | targetfile=ethanol.xyz
|
---|
36 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
37 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr])
|
---|
38 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
39 |
|
---|
40 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
41 | srcfile=mix.xyz
|
---|
42 | testfile=test.xyz
|
---|
43 | targetfile=benzene.xyz
|
---|
44 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
45 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr])
|
---|
46 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
47 |
|
---|
48 | AT_CLEANUP
|
---|
49 |
|
---|
50 |
|
---|
51 | AT_SETUP([Selection - Molecule by formula with Undo])
|
---|
52 | AT_KEYWORDS([selection molecule select-molecules-by-formula undo])
|
---|
53 |
|
---|
54 | comparisonfile=empty.xyz
|
---|
55 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
56 | srcfile=mix.xyz
|
---|
57 | testfile=test.xyz
|
---|
58 | targetfile=empty1.xyz
|
---|
59 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
60 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
61 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
62 |
|
---|
63 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
64 | srcfile=mix.xyz
|
---|
65 | testfile=test.xyz
|
---|
66 | targetfile=empty2.xyz
|
---|
67 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
68 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 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=empty3.xyz
|
---|
75 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
76 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
77 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
78 |
|
---|
79 | AT_CLEANUP
|
---|
80 |
|
---|
81 |
|
---|
82 | AT_SETUP([Selection - Molecule by formula with Redo])
|
---|
83 | AT_KEYWORDS([selection molecule select-molecules-by-formula redo])
|
---|
84 |
|
---|
85 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
86 | srcfile=mix.xyz
|
---|
87 | testfile=test.xyz
|
---|
88 | targetfile=water.xyz
|
---|
89 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
90 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
---|
91 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
92 |
|
---|
93 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
94 | srcfile=mix.xyz
|
---|
95 | testfile=test.xyz
|
---|
96 | targetfile=ethanol.xyz
|
---|
97 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
98 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
---|
99 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
100 |
|
---|
101 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
102 | srcfile=mix.xyz
|
---|
103 | testfile=test.xyz
|
---|
104 | targetfile=benzene.xyz
|
---|
105 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
106 | AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
---|
107 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
108 |
|
---|
109 | AT_CLEANUP
|
---|