1 | ### (un)select molecules by order
|
---|
2 |
|
---|
3 |
|
---|
4 | AT_SETUP([Selection - Molecule by order, forward])
|
---|
5 | AT_KEYWORDS([selection,molecule])
|
---|
6 | # some variables before
|
---|
7 | srcpath="Selection/Molecules/MoleculeByOrder"
|
---|
8 | srcfile=twowater.xyz
|
---|
9 | m4_include(CheckCommand.sh)
|
---|
10 | # the tests
|
---|
11 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order 1 -s water_id0.xyz"
|
---|
12 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order 2 -s water_id1.xyz"
|
---|
13 | mv water_id0.xyz water_id0_a.xyz
|
---|
14 | mv water_id1.xyz water_id1_a.xyz
|
---|
15 | check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order 1 --undo -s empty.xyz"
|
---|
16 | check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order 2 --undo -s empty.xyz"
|
---|
17 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order 1 --undo --redo -s water_id0.xyz"
|
---|
18 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order 2 --undo --redo -s water_id1.xyz"
|
---|
19 | mv water_id0.xyz water_id0_b.xyz
|
---|
20 | mv water_id1.xyz water_id1_b.xyz
|
---|
21 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore])
|
---|
22 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore])
|
---|
23 | AT_CLEANUP
|
---|
24 |
|
---|
25 | AT_SETUP([Selection - Molecule by order, backward])
|
---|
26 | AT_KEYWORDS([selection,molecule])
|
---|
27 | # some variables before
|
---|
28 | srcpath="Selection/Molecules/MoleculeByOrder"
|
---|
29 | srcfile=twowater.xyz
|
---|
30 | m4_include(CheckCommand.sh)
|
---|
31 | # the tests
|
---|
32 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order -2 -s water_id0.xyz"
|
---|
33 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order -1 -s water_id1.xyz"
|
---|
34 | mv water_id0.xyz water_id0_a.xyz
|
---|
35 | mv water_id1.xyz water_id1_a.xyz
|
---|
36 | check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order -2 --undo -s empty.xyz"
|
---|
37 | check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order -1 --undo -s empty.xyz"
|
---|
38 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order -2 --undo --redo -s water_id0.xyz"
|
---|
39 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order -1 --undo --redo -s water_id1.xyz"
|
---|
40 | mv water_id0.xyz water_id0_b.xyz
|
---|
41 | mv water_id1.xyz water_id1_b.xyz
|
---|
42 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore])
|
---|
43 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore])
|
---|
44 | AT_CLEANUP
|
---|
45 |
|
---|
46 | AT_SETUP([Unselection - Molecule by order, forward])
|
---|
47 | AT_KEYWORDS([selection,molecule])
|
---|
48 | # some variables before
|
---|
49 | srcpath="Selection/Molecules/MoleculeByOrder"
|
---|
50 | srcfile=twowater.xyz
|
---|
51 | m4_include(CheckCommand.sh)
|
---|
52 | # the tests
|
---|
53 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 -s water_id1.xyz"
|
---|
54 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 -s water_id0.xyz"
|
---|
55 | mv water_id1.xyz water_id1_a.xyz
|
---|
56 | mv water_id0.xyz water_id0_a.xyz
|
---|
57 | check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 --undo -s twowater.xyz"
|
---|
58 | check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 --undo -s twowater.xyz"
|
---|
59 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 --undo --redo -s water_id1.xyz"
|
---|
60 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 --undo --redo -s water_id0.xyz"
|
---|
61 | mv water_id0.xyz water_id0_b.xyz
|
---|
62 | mv water_id1.xyz water_id1_b.xyz
|
---|
63 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore])
|
---|
64 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore])
|
---|
65 | AT_CLEANUP
|
---|
66 |
|
---|
67 | AT_SETUP([Unselection - Molecule by order, backward])
|
---|
68 | AT_KEYWORDS([selection,molecule])
|
---|
69 | # some variables before
|
---|
70 | srcpath="Selection/Molecules/MoleculeByOrder"
|
---|
71 | srcfile=twowater.xyz
|
---|
72 | m4_include(CheckCommand.sh)
|
---|
73 | # the tests
|
---|
74 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 -s water_id1.xyz"
|
---|
75 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 -s water_id0.xyz"
|
---|
76 | mv water_id1.xyz water_id1_a.xyz
|
---|
77 | mv water_id0.xyz water_id0_a.xyz
|
---|
78 | check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 --undo -s twowater.xyz"
|
---|
79 | check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 --undo -s twowater.xyz"
|
---|
80 | check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 --undo --redo -s water_id1.xyz"
|
---|
81 | check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 --undo --redo -s water_id0.xyz"
|
---|
82 | mv water_id0.xyz water_id0_b.xyz
|
---|
83 | mv water_id1.xyz water_id1_b.xyz
|
---|
84 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore])
|
---|
85 | AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore])
|
---|
86 | AT_CLEANUP
|
---|