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