1 | #
|
---|
2 | # MoleCuilder - creates and alters molecular systems
|
---|
3 | # Copyright (C) 2017 Frederik Heber
|
---|
4 | #
|
---|
5 | # This program is free software: you can redistribute it and/or modify
|
---|
6 | # it under the terms of the GNU General Public License as published by
|
---|
7 | # the Free Software Foundation, either version 3 of the License, or
|
---|
8 | # (at your option) any later version.
|
---|
9 | #
|
---|
10 | # This program is distributed in the hope that it will be useful,
|
---|
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | # GNU General Public License for more details.
|
---|
14 | #
|
---|
15 | # You should have received a copy of the GNU General Public License
|
---|
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
17 | #
|
---|
18 | ### Rotate around bond
|
---|
19 |
|
---|
20 | AT_SETUP([Molecules - Rotate around bond])
|
---|
21 | AT_KEYWORDS([molecules rotate-around-bond])
|
---|
22 |
|
---|
23 | file=test-90-true.pdb
|
---|
24 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
25 | AT_CHECK([chmod u+w $file], 0)
|
---|
26 | AT_CHECK([../../molecuilder -i $file --select-atom-by-element C --rotate-around-bond 90.], 0, [stdout], [stderr])
|
---|
27 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
28 |
|
---|
29 | file=test-195-true.pdb
|
---|
30 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
31 | AT_CHECK([chmod u+w $file], 0)
|
---|
32 | AT_CHECK([../../molecuilder -i $file --select-atom-by-element C --rotate-around-bond 195.], 0, [stdout], [stderr])
|
---|
33 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
34 |
|
---|
35 | file=test-95-false.pdb
|
---|
36 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
37 | AT_CHECK([chmod u+w $file], 0)
|
---|
38 | AT_CHECK([../../molecuilder -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0], 0, [stdout], [stderr])
|
---|
39 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
40 |
|
---|
41 | AT_CLEANUP
|
---|
42 |
|
---|
43 |
|
---|
44 | AT_SETUP([Molecules - Rotate around bond with Undo])
|
---|
45 | AT_KEYWORDS([molecules rotate-around-bond undo])
|
---|
46 |
|
---|
47 | file=test.pdb
|
---|
48 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
49 | AT_CHECK([chmod u+w $file], 0)
|
---|
50 | AT_CHECK([../../molecuilder -i $file --select-atom-by-element C --rotate-around-bond 90. --undo], 0, [stdout], [stderr])
|
---|
51 | AT_CHECK([diff -I '.*reated by molecuilder.*' -I 'CONECT.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb], 0, [ignore], [ignore])
|
---|
52 |
|
---|
53 | file=test-95-false.pdb
|
---|
54 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
55 | AT_CHECK([chmod u+w $file], 0)
|
---|
56 | AT_CHECK([../../molecuilder -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --undo], 0, [stdout], [stderr])
|
---|
57 | AT_CHECK([diff -I '.*reated by molecuilder.*' -I 'CONECT.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb], 0, [ignore], [ignore])
|
---|
58 |
|
---|
59 | AT_CLEANUP
|
---|
60 |
|
---|
61 |
|
---|
62 | AT_SETUP([Molecules - Rotate around bond with Redo])
|
---|
63 | AT_KEYWORDS([molecules rotate-around-bond redo])
|
---|
64 |
|
---|
65 | file=test-90-true.pdb
|
---|
66 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
67 | AT_CHECK([chmod u+w $file], 0)
|
---|
68 | AT_CHECK([../../molecuilder -i $file --select-atom-by-element C --rotate-around-bond 90. --undo --redo], 0, [stdout], [stderr])
|
---|
69 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
70 |
|
---|
71 | file=test-95-false.pdb
|
---|
72 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
73 | AT_CHECK([chmod u+w $file], 0)
|
---|
74 | AT_CHECK([../../molecuilder -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --undo --redo], 0, [stdout], [stderr])
|
---|
75 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
76 |
|
---|
77 | AT_CLEANUP
|
---|
78 |
|
---|
79 | AT_SETUP([Molecules - Rotate around bond fails for cycles])
|
---|
80 | AT_KEYWORDS([molecules rotate-around-bond cycle])
|
---|
81 |
|
---|
82 | file=test_cycle.pdb
|
---|
83 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test_cycle.pdb $file], 0)
|
---|
84 | AT_CHECK([chmod u+w $file], 0)
|
---|
85 | AT_CHECK([../../molecuilder -i $file --select-atom-by-id 1 2 --rotate-around-bond 90.], 5, [stdout], [stderr])
|
---|
86 |
|
---|
87 | AT_CLEANUP
|
---|
88 |
|
---|
89 | AT_SETUP([Molecules - Rotate around bond on almost complete cycle])
|
---|
90 | AT_KEYWORDS([molecules rotate-around-bond])
|
---|
91 |
|
---|
92 | file=benzene_90degree.pdb
|
---|
93 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/benzene.pdb $file], 0)
|
---|
94 | AT_CHECK([chmod u+w $file], 0)
|
---|
95 | AT_CHECK([../../molecuilder -i $file --select-atom-by-order -1 -6 --remove-atom --select-atom-by-id 3 5 --rotate-around-bond 90.], 0, [stdout], [stderr])
|
---|
96 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
97 |
|
---|
98 | AT_CLEANUP
|
---|