1 | ### 2. (un)select all atoms inside cuboid
|
---|
2 |
|
---|
3 |
|
---|
4 | AT_SETUP([Selection - All atoms inside cuboid with defaults])
|
---|
5 | AT_KEYWORDS([selection cuboid select-atoms-inside-cuboid])
|
---|
6 |
|
---|
7 | file=allatomsoutsidecuboid.xyz
|
---|
8 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
9 | AT_CHECK([chmod u+w $file], 0)
|
---|
10 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" -r], 0, [stdout], [stderr])
|
---|
11 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
12 |
|
---|
13 | # check size of cuboid
|
---|
14 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
15 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
16 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
17 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) || ($3 > 10) || ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
18 | AT_CHECK([fgrep "838" stdout], 0, [ignore], [ignore])
|
---|
19 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) && ($3 < 10) && ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
20 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
21 |
|
---|
22 | AT_CLEANUP
|
---|
23 |
|
---|
24 |
|
---|
25 | AT_SETUP([Selection - All atoms inside cuboid with defaults with Undo])
|
---|
26 | AT_KEYWORDS([selection cuboid select-atoms-inside-cuboid undo])
|
---|
27 |
|
---|
28 | file=allatomsoutsidecuboid.xyz
|
---|
29 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
30 | AT_CHECK([chmod u+w $file], 0)
|
---|
31 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo -r], 0, [stdout], [stderr])
|
---|
32 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
|
---|
33 |
|
---|
34 | AT_CLEANUP
|
---|
35 |
|
---|
36 |
|
---|
37 | AT_SETUP([Selection - All atoms inside cuboid with defaults with Redo])
|
---|
38 | AT_KEYWORDS([selection cuboid select-atoms-inside-cuboid redo])
|
---|
39 |
|
---|
40 | file=allatomsoutsidecuboid.xyz
|
---|
41 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
42 | AT_CHECK([chmod u+w $file], 0)
|
---|
43 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo --redo -r], 0, [stdout], [stderr])
|
---|
44 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
45 |
|
---|
46 |
|
---|
47 | AT_CLEANUP
|
---|
48 |
|
---|