1 | ### Removing atoms inside and outside of sphere
|
---|
2 |
|
---|
3 | AT_SETUP([Atoms - Removing sphere of atoms])
|
---|
4 | AT_KEYWORDS([atoms remove-atom])
|
---|
5 |
|
---|
6 | file=test-withoutsphere.xyz
|
---|
7 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
|
---|
8 | AT_CHECK([chmod u+w $file], 0)
|
---|
9 | AT_CHECK([../../molecuilder -i $file --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr])
|
---|
10 | AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
11 | AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
12 |
|
---|
13 | file=test-sphere.xyz
|
---|
14 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
|
---|
15 | AT_CHECK([chmod u+w $file], 0)
|
---|
16 | AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr])
|
---|
17 | AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
18 | AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-sphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
19 | AT_CHECK([cat test-sphere.xyz-sorted test-withoutsphere.xyz-sorted | sort -n >test.xyz-sorted], 0, [ignore], [ignore])
|
---|
20 | AT_CHECK([file=test.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test.xyz-sorted], 0, [ignore], [ignore])
|
---|
21 |
|
---|
22 | AT_CLEANUP
|
---|
23 |
|
---|
24 |
|
---|
25 | AT_SETUP([Atoms - Removing sphere of atoms with Undo])
|
---|
26 | AT_KEYWORDS([atoms remove-atom undo])
|
---|
27 |
|
---|
28 | file=test.xyz
|
---|
29 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
|
---|
30 | AT_CHECK([chmod u+w $file], 0)
|
---|
31 | AT_CHECK([../../molecuilder -i $file --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr])
|
---|
32 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/$file], 0, [ignore], [ignore])
|
---|
33 |
|
---|
34 | file=test.xyz
|
---|
35 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
|
---|
36 | AT_CHECK([chmod u+w $file], 0)
|
---|
37 | AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr])
|
---|
38 | AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/$file], 0, [ignore], [ignore])
|
---|
39 |
|
---|
40 | AT_CLEANUP
|
---|
41 |
|
---|
42 |
|
---|
43 | AT_SETUP([Atoms - Removing sphere of atoms with Redo])
|
---|
44 | AT_KEYWORDS([atoms remove-atom redo])
|
---|
45 |
|
---|
46 | file=test-withoutsphere.xyz
|
---|
47 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
|
---|
48 | AT_CHECK([chmod u+w $file], 0)
|
---|
49 | AT_CHECK([../../molecuilder -i $file --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr])
|
---|
50 | AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
51 | AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-withoutsphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
52 |
|
---|
53 | file=test-sphere.xyz
|
---|
54 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0)
|
---|
55 | AT_CHECK([chmod u+w $file], 0)
|
---|
56 | AT_CHECK([../../molecuilder -i $file --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr])
|
---|
57 | AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
58 | AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-sphere.xyz-sorted], 0, [ignore], [ignore])
|
---|
59 | AT_CHECK([cat test-sphere.xyz-sorted test-withoutsphere.xyz-sorted | sort -n >test.xyz-sorted], 0, [ignore], [ignore])
|
---|
60 | AT_CHECK([file=test.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test.xyz-sorted], 0, [ignore], [ignore])
|
---|
61 |
|
---|
62 | AT_CLEANUP
|
---|