1 | ### 3. (un)select molecules by formula
|
---|
2 |
|
---|
3 |
|
---|
4 | AT_SETUP([Unselection - Molecule by formula])
|
---|
5 | AT_KEYWORDS([unselection molecule unselect-molecules-by-formula])
|
---|
6 |
|
---|
7 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
8 | srcfile=mix.xyz
|
---|
9 | testfile=test.xyz
|
---|
10 | targetfile=water_missing.xyz
|
---|
11 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
12 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr])
|
---|
13 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
14 |
|
---|
15 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
16 | srcfile=mix.xyz
|
---|
17 | testfile=test.xyz
|
---|
18 | targetfile=ethanol_missing.xyz
|
---|
19 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
20 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr])
|
---|
21 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
22 |
|
---|
23 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
24 | srcfile=mix.xyz
|
---|
25 | testfile=test.xyz
|
---|
26 | targetfile=benzene_missing.xyz
|
---|
27 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
28 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr])
|
---|
29 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
30 |
|
---|
31 | AT_CLEANUP
|
---|
32 |
|
---|
33 |
|
---|
34 | AT_SETUP([Unselection - Molecule by formula with Undo])
|
---|
35 | AT_KEYWORDS([unselection molecule unselect-molecules-by-formula undo])
|
---|
36 |
|
---|
37 | comparisonfile=mix.xyz
|
---|
38 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
39 | srcfile=mix.xyz
|
---|
40 | testfile=test.xyz
|
---|
41 | targetfile=mix1.xyz
|
---|
42 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
43 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
44 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
45 |
|
---|
46 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
47 | srcfile=mix.xyz
|
---|
48 | testfile=test.xyz
|
---|
49 | targetfile=mix2.xyz
|
---|
50 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
51 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
52 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
53 |
|
---|
54 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
55 | srcfile=mix.xyz
|
---|
56 | testfile=test.xyz
|
---|
57 | targetfile=mix3.xyz
|
---|
58 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
59 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr])
|
---|
60 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore])
|
---|
61 |
|
---|
62 | AT_CLEANUP
|
---|
63 |
|
---|
64 |
|
---|
65 | AT_SETUP([Unselection - Molecule by formula with Redo])
|
---|
66 | AT_KEYWORDS([unselection molecule unselect-molecules-by-formula redo])
|
---|
67 |
|
---|
68 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
69 | srcfile=mix.xyz
|
---|
70 | testfile=test.xyz
|
---|
71 | targetfile=water_missing.xyz
|
---|
72 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
73 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
---|
74 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
75 |
|
---|
76 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
77 | srcfile=mix.xyz
|
---|
78 | testfile=test.xyz
|
---|
79 | targetfile=ethanol_missing.xyz
|
---|
80 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
81 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
---|
82 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
83 |
|
---|
84 | regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula"
|
---|
85 | srcfile=mix.xyz
|
---|
86 | testfile=test.xyz
|
---|
87 | targetfile=benzene_missing.xyz
|
---|
88 | AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0)
|
---|
89 | AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr])
|
---|
90 | AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore])
|
---|
91 |
|
---|
92 | AT_CLEANUP
|
---|