1 | ### 2. (un)select all atoms inside cuboid
|
---|
2 |
|
---|
3 | AT_SETUP([Selection - All atoms inside cuboid])
|
---|
4 | AT_KEYWORDS([selection,cuboid])
|
---|
5 |
|
---|
6 | file=allatomsoutsidecuboid.xyz
|
---|
7 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
8 | AT_CHECK([chmod u+w $file], 0)
|
---|
9 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
|
---|
10 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
11 |
|
---|
12 | file=allatomsoutsidecuboid.xyz
|
---|
13 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
14 | AT_CHECK([chmod u+w $file], 0)
|
---|
15 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo -r], 0, [stdout], [stderr])
|
---|
16 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
|
---|
17 |
|
---|
18 | file=allatomsoutsidecuboid.xyz
|
---|
19 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
20 | AT_CHECK([chmod u+w $file], 0)
|
---|
21 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo --redo -r], 0, [stdout], [stderr])
|
---|
22 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
23 |
|
---|
24 | # check size of cuboid
|
---|
25 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
26 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
27 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
28 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) || ($3 > 10) || ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
29 | AT_CHECK([fgrep "838" stdout], 0, [ignore], [ignore])
|
---|
30 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) && ($3 < 10) && ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
31 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
32 |
|
---|
33 | AT_CLEANUP
|
---|
34 |
|
---|
35 |
|
---|
36 | AT_SETUP([Selection - All atoms inside cuboid with defaults])
|
---|
37 | AT_KEYWORDS([selection,cuboid])
|
---|
38 |
|
---|
39 | file=allatomsoutsidecuboid.xyz
|
---|
40 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
41 | AT_CHECK([chmod u+w $file], 0)
|
---|
42 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" -r], 0, [stdout], [stderr])
|
---|
43 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
44 |
|
---|
45 | file=allatomsoutsidecuboid.xyz
|
---|
46 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
47 | AT_CHECK([chmod u+w $file], 0)
|
---|
48 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo -r], 0, [stdout], [stderr])
|
---|
49 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore])
|
---|
50 |
|
---|
51 | file=allatomsoutsidecuboid.xyz
|
---|
52 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
53 | AT_CHECK([chmod u+w $file], 0)
|
---|
54 | AT_CHECK([../../molecuilder -i $file -v 5 --select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --undo --redo -r], 0, [stdout], [stderr])
|
---|
55 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
56 |
|
---|
57 | # check size of cuboid
|
---|
58 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
59 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
60 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
61 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) || ($3 > 10) || ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
62 | AT_CHECK([fgrep "838" stdout], 0, [ignore], [ignore])
|
---|
63 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) && ($3 < 10) && ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
64 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
65 |
|
---|
66 | AT_CLEANUP
|
---|
67 |
|
---|
68 |
|
---|
69 | AT_SETUP([Unselection - All atoms inside cuboid])
|
---|
70 | AT_KEYWORDS([selection,cuboid])
|
---|
71 |
|
---|
72 | file=allatomsinsidecuboid.xyz
|
---|
73 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
74 | AT_CHECK([chmod u+w $file], 0)
|
---|
75 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 -r], 0, [stdout], [stderr])
|
---|
76 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
77 |
|
---|
78 | file=allatomsinsidecuboid.xyz
|
---|
79 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
80 | AT_CHECK([chmod u+w $file], 0)
|
---|
81 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo -r], 0, [stdout], [stderr])
|
---|
82 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/empty.xyz], 0, [ignore], [ignore])
|
---|
83 |
|
---|
84 | file=allatomsinsidecuboid.xyz
|
---|
85 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0)
|
---|
86 | AT_CHECK([chmod u+w $file], 0)
|
---|
87 | AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0 --undo --redo -r], 0, [stdout], [stderr])
|
---|
88 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore])
|
---|
89 |
|
---|
90 | # check size of cuboid
|
---|
91 | AT_SKIP_IF([! awk '' < /dev/null]) # check whether awk is there
|
---|
92 | AT_SKIP_IF([! cat >/dev/null < /dev/null]) # check whether cat is there
|
---|
93 | AT_SKIP_IF([! wc -l /dev/null]) # check whether wc is there
|
---|
94 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 < 10) || ($3 < 10) || ($4 < 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
95 | AT_CHECK([fgrep "193" stdout], 0, [ignore], [ignore])
|
---|
96 | AT_CHECK([cat < $file | awk -F" " '{ if (($2 > 10) && ($3 > 10) && ($4 > 10)) print $1,$2,$3,$4;}' | wc -l], 0, [stdout], [ignore])
|
---|
97 | AT_CHECK([fgrep "1" stdout], 0, [ignore], [ignore])
|
---|
98 |
|
---|
99 | AT_CLEANUP
|
---|