source: tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-select-molecules-by-formula.at

Candidate_v1.6.1
Last change on this file was 0d97b4, checked in by Frederik Heber <heber@…>, 12 years ago

FIX: Disclaimer appeared twice in each testsuite. Second time removed.

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