[b10593] | 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 --dry-run -i $file --select-atom-by-element C --rotate-around-bond 90. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 27 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 28 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 29 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
| 30 |
|
---|
| 31 | file=test-195-true.pdb
|
---|
| 32 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
| 33 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 34 | AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 195. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 35 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 36 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 37 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
| 38 |
|
---|
| 39 | file=test-95-false.pdb
|
---|
| 40 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
| 41 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 42 | AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 43 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 44 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 45 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
| 46 |
|
---|
| 47 | AT_CLEANUP
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 | AT_SETUP([Molecules - Rotate around bond with Undo])
|
---|
| 51 | AT_KEYWORDS([molecules rotate-around-bond undo])
|
---|
| 52 |
|
---|
| 53 | file=test.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 --dry-run -i $file --select-atom-by-element C --rotate-around-bond 90. --undo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 57 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 58 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 59 | AT_CHECK([diff -I '.*reated by molecuilder.*' -I 'CONECT.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb], 0, [ignore], [ignore])
|
---|
| 60 |
|
---|
| 61 | file=test-95-false.pdb
|
---|
| 62 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
| 63 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 64 | AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --undo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 65 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 66 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 67 | AT_CHECK([diff -I '.*reated by molecuilder.*' -I 'CONECT.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb], 0, [ignore], [ignore])
|
---|
| 68 |
|
---|
| 69 | AT_CLEANUP
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | AT_SETUP([Molecules - Rotate around bond with Redo])
|
---|
| 73 | AT_KEYWORDS([molecules rotate-around-bond redo])
|
---|
| 74 |
|
---|
| 75 | file=test-90-true.pdb
|
---|
| 76 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
| 77 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 78 | AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 90. --undo --redo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 79 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 80 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 81 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
| 82 |
|
---|
| 83 | file=test-95-false.pdb
|
---|
| 84 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test.pdb $file], 0)
|
---|
| 85 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 86 | AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-element C --rotate-around-bond 95. --bondside 0 --undo --redo --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 87 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 88 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 89 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
| 90 |
|
---|
| 91 | AT_CLEANUP
|
---|
| 92 |
|
---|
| 93 | AT_SETUP([Molecules - Rotate around bond fails for cycles])
|
---|
| 94 | AT_KEYWORDS([molecules rotate-around-bond cycle])
|
---|
| 95 |
|
---|
| 96 | file=test_cycle.pdb
|
---|
| 97 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/test_cycle.pdb $file], 0)
|
---|
| 98 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 99 | AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-id 1 2 --rotate-around-bond 90. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 100 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 101 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 5, [stdout], [stderr])
|
---|
| 102 |
|
---|
| 103 | AT_CLEANUP
|
---|
| 104 |
|
---|
| 105 | AT_SETUP([Molecules - Rotate around bond on almost complete cycle])
|
---|
| 106 | AT_KEYWORDS([molecules rotate-around-bond])
|
---|
| 107 |
|
---|
| 108 | file=benzene_90degree.pdb
|
---|
| 109 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/pre/benzene.pdb $file], 0)
|
---|
| 110 | AT_CHECK([chmod u+w $file], 0)
|
---|
| 111 | AT_CHECK([../../molecuilder --dry-run -i $file --select-atom-by-order -1 -6 --remove-atom --select-atom-by-id 3 5 --rotate-around-bond 90. --no-dry-run --store-session session-molecules-rotate-around-bond.py --session-type python], 0, [stdout], [stderr])
|
---|
| 112 | AT_CHECK([grep -v "Command.*DryRun" session-molecules-rotate-around-bond.py >session-molecules-rotate-around-bond_new.py], 0, [ignore], [ignore])
|
---|
| 113 | AT_CHECK([../../molecuilderguitest session-molecules-rotate-around-bond_new.py], 0, [stdout], [stderr])
|
---|
| 114 | AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/RotateAroundBond/post/$file], 0, [ignore], [ignore])
|
---|
| 115 |
|
---|
| 116 | AT_CLEANUP
|
---|