Index: tests/Fragmentations/Fragmenting/anthracene/pre/anthracene.pdb
===================================================================
--- tests/Fragmentations/Fragmenting/anthracene/pre/anthracene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/anthracene/pre/anthracene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,52 @@
+COMPND    UNNAMED
+AUTHOR    GENERATED BY OPEN BABEL 2.3.0
+HETATM    1  C   LIG     1      25.220 -16.237   0.000  1.00  0.00           C  
+HETATM    2  C   LIG     1      25.220 -17.639   0.000  1.00  0.00           C  
+HETATM    3  C   LIG     1      26.437 -18.339   0.000  1.00  0.00           C  
+HETATM    4  C   LIG     1      26.437 -15.536   0.000  1.00  0.00           C  
+HETATM    5  C   LIG     1      27.647 -16.237   0.000  1.00  0.00           C  
+HETATM    6  C   LIG     1      27.641 -17.639   0.000  1.00  0.00           C  
+HETATM    7  C   LIG     1      28.852 -18.345   0.000  1.00  0.00           C  
+HETATM    8  C   LIG     1      28.864 -15.541   0.000  1.00  0.00           C  
+HETATM    9  C   LIG     1      30.076 -16.247   0.000  1.00  0.00           C  
+HETATM   10  C   LIG     1      30.133 -17.645   0.000  1.00  0.00           C  
+HETATM   11  C   LIG     1      31.267 -18.355   0.000  1.00  0.00           C  
+HETATM   12  C   LIG     1      32.485 -17.667   0.000  1.00  0.00           C  
+HETATM   13  C   LIG     1      32.497 -16.269   0.000  1.00  0.00           C  
+HETATM   14  C   LIG     1      31.293 -15.559   0.000  1.00  0.00           C  
+HETATM   15  H   LIG     1      24.327 -15.720   0.000  1.00  0.00           H  
+HETATM   16  H   LIG     1      24.327 -18.155   0.000  1.00  0.00           H  
+HETATM   17  H   LIG     1      26.440 -19.371   0.000  1.00  0.00           H  
+HETATM   18  H   LIG     1      26.439 -14.504   0.000  1.00  0.00           H  
+HETATM   19  H   LIG     1      28.838 -19.376   0.000  1.00  0.00           H  
+HETATM   20  H   LIG     1      28.869 -14.509   0.000  1.00  0.00           H  
+HETATM   21  H   LIG     1      31.244 -19.387   0.000  1.00  0.00           H  
+HETATM   22  H   LIG     1      33.374 -18.191   0.000  1.00  0.00           H  
+HETATM   23  H   LIG     1      33.396 -15.761   0.000  1.00  0.00           H  
+HETATM   24  H   LIG     1      31.302 -14.527   0.000  1.00  0.00           H  
+CONECT    1    4    2   15                                            
+CONECT    2    1    3   16                                            
+CONECT    3    2    6   17                                            
+CONECT    4    5    1   18                                            
+CONECT    5    8    4    6                                            
+CONECT    6    3    5    7                                            
+CONECT    7    6   10   19                                            
+CONECT    8    9    5   20                                            
+CONECT    9    8   10   14                                            
+CONECT   10    9   11    7                                            
+CONECT   11   10   12   21                                            
+CONECT   12   11   13   22                                            
+CONECT   13   12   14   23                                            
+CONECT   14   13    9   24                                            
+CONECT   15    1                                                      
+CONECT   16    2                                                      
+CONECT   17    3                                                      
+CONECT   18    4                                                      
+CONECT   19    7                                                      
+CONECT   20    8                                                      
+CONECT   21   11                                                      
+CONECT   22   12                                                      
+CONECT   23   13                                                      
+CONECT   24   14                                                      
+MASTER        0    0    0    0    0    0    0    0   24    0   24    0
+END
Index: tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order1.at
===================================================================
--- tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,69 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### anthracene - order 1 w cycles
+
+AT_SETUP([Fragmentations - anthracene order 1 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=anthracene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=14
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 1 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+# check cycles just have six non-hydrogen
+let i=$FragNo-$CycleNo
+while test $i -lt $FragNo; do
+	AT_CHECK([grep -c "^HETATM.*C 0" ${FILENAME}`printf %02d $i`.pdb], 0, [stdout], [ignore])
+	AT_CHECK([test 6 == `cat stdout`], 0, [ignore], [ignore])
+	let i=$i+1
+done
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order2.at
===================================================================
--- tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### anthracene - order 2 w cycles
+
+AT_SETUP([Fragmentations - anthracene order 2 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=anthracene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=30
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 2 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order3.at
===================================================================
--- tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### anthracene - order 3 w cycles
+
+AT_SETUP([Fragmentations - anthracene order 3 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=anthracene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=52
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 3 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order4.at
===================================================================
--- tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### anthracene - order 4 w cycles
+
+AT_SETUP([Fragmentations - anthracene order 4 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=anthracene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=86
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 4 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order5.at
===================================================================
--- tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### anthracene - order 5 w cycles
+
+AT_SETUP([Fragmentations - anthracene order 5 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=anthracene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=142
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 5 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order6.at
===================================================================
--- tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/anthracene/testsuite-fragmenting-anthracene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### anthracene - order 6 w cycles
+
+AT_SETUP([Fragmentations - anthracene order 6 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=anthracene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=223
+#let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 6 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/coronene/pre/coronene.pdb
===================================================================
--- tests/Fragmentations/Fragmenting/coronene/pre/coronene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/coronene/pre/coronene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,76 @@
+COMPND    UNNAMED
+AUTHOR    GENERATED BY OPEN BABEL 2.3.0
+HETATM    1  C   LIG     1      16.170 -15.750   0.000  1.00  0.00           C  
+HETATM    2  C   LIG     1      16.170 -17.150   0.000  1.00  0.00           C  
+HETATM    3  C   LIG     1      17.382 -17.850   0.000  1.00  0.00           C  
+HETATM    4  C   LIG     1      18.595 -17.150   0.000  1.00  0.00           C  
+HETATM    5  C   LIG     1      18.595 -15.750   0.000  1.00  0.00           C  
+HETATM    6  C   LIG     1      17.382 -15.050   0.000  1.00  0.00           C  
+HETATM    7  C   LIG     1      17.382 -13.650   0.000  1.00  0.00           C  
+HETATM    8  C   LIG     1      16.170 -12.950   0.000  1.00  0.00           C  
+HETATM    9  C   LIG     1      14.958 -13.650   0.000  1.00  0.00           C  
+HETATM   10  C   LIG     1      14.958 -15.050   0.000  1.00  0.00           C  
+HETATM   11  C   LIG     1      13.745 -15.750   0.000  1.00  0.00           C  
+HETATM   12  C   LIG     1      13.745 -17.150   0.000  1.00  0.00           C  
+HETATM   13  C   LIG     1      14.958 -17.850   0.000  1.00  0.00           C  
+HETATM   14  C   LIG     1      14.957 -19.250   0.000  1.00  0.00           C  
+HETATM   15  C   LIG     1      16.170 -19.950   0.000  1.00  0.00           C  
+HETATM   16  C   LIG     1      17.382 -19.250   0.000  1.00  0.00           C  
+HETATM   17  C   LIG     1      18.595 -19.950   0.000  1.00  0.00           C  
+HETATM   18  C   LIG     1      19.807 -19.250   0.000  1.00  0.00           C  
+HETATM   19  C   LIG     1      19.807 -17.850   0.000  1.00  0.00           C  
+HETATM   20  C   LIG     1      21.020 -17.150   0.000  1.00  0.00           C  
+HETATM   21  C   LIG     1      21.020 -15.750   0.000  1.00  0.00           C  
+HETATM   22  C   LIG     1      19.807 -15.050   0.000  1.00  0.00           C  
+HETATM   23  C   LIG     1      19.807 -13.650   0.000  1.00  0.00           C  
+HETATM   24  C   LIG     1      18.595 -12.950   0.000  1.00  0.00           C  
+HETATM   25  H   LIG     1      16.170 -11.918   0.000  1.00  0.00           H  
+HETATM   26  H   LIG     1      14.064 -13.134   0.000  1.00  0.00           H  
+HETATM   27  H   LIG     1      12.851 -15.234   0.000  1.00  0.00           H  
+HETATM   28  H   LIG     1      12.851 -17.666   0.000  1.00  0.00           H  
+HETATM   29  H   LIG     1      14.064 -19.766   0.000  1.00  0.00           H  
+HETATM   30  H   LIG     1      16.170 -20.982   0.000  1.00  0.00           H  
+HETATM   31  H   LIG     1      18.595 -20.982   0.000  1.00  0.00           H  
+HETATM   32  H   LIG     1      20.701 -19.766   0.000  1.00  0.00           H  
+HETATM   33  H   LIG     1      21.914 -17.666   0.000  1.00  0.00           H  
+HETATM   34  H   LIG     1      21.914 -15.234   0.000  1.00  0.00           H  
+HETATM   35  H   LIG     1      20.701 -13.134   0.000  1.00  0.00           H  
+HETATM   36  H   LIG     1      18.595 -11.918   0.000  1.00  0.00           H  
+CONECT    1    2    6   10                                            
+CONECT    2    1    3   13                                            
+CONECT    3    2    4   16                                            
+CONECT    4    3    5   19                                            
+CONECT    5    4    6   22                                            
+CONECT    6    5    1    7                                            
+CONECT    7    6    8   24                                            
+CONECT    8    7    9   25                                            
+CONECT    9    8   10   26                                            
+CONECT   10    9    1   11                                            
+CONECT   11   10   12   27                                            
+CONECT   12   11   13   28                                            
+CONECT   13   12    2   14                                            
+CONECT   14   13   15   29                                            
+CONECT   15   14   16   30                                            
+CONECT   16   15    3   17                                            
+CONECT   17   16   18   31                                            
+CONECT   18   17   19   32                                            
+CONECT   19   18    4   20                                            
+CONECT   20   19   21   33                                            
+CONECT   21   20   22   34                                            
+CONECT   22   21    5   23                                            
+CONECT   23   22   24   35                                            
+CONECT   24   23    7   36                                            
+CONECT   25    8                                                      
+CONECT   26    9                                                      
+CONECT   27   11                                                      
+CONECT   28   12                                                      
+CONECT   29   14                                                      
+CONECT   30   15                                                      
+CONECT   31   17                                                      
+CONECT   32   18                                                      
+CONECT   33   20                                                      
+CONECT   34   21                                                      
+CONECT   35   23                                                      
+CONECT   36   24                                                      
+MASTER        0    0    0    0    0    0    0    0   36    0   36    0
+END
Index: tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order1.at
===================================================================
--- tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,69 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### coronene - order 1 w cycles
+
+AT_SETUP([Fragmentations - coronene order 1 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=coronene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=7
+FragNo=24
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 1 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+# check cycles just have six non-hydrogen
+let i=$FragNo-$CycleNo
+while test $i -lt $FragNo; do
+	AT_CHECK([grep -c "^HETATM.*C 0" ${FILENAME}`printf %02d $i`.pdb], 0, [stdout], [ignore])
+	AT_CHECK([test 6 == `cat stdout`], 0, [ignore], [ignore])
+	let i=$i+1
+done
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order2.at
===================================================================
--- tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### coronene - order 2 w cycles
+
+AT_SETUP([Fragmentations - coronene order 2 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=coronene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=7
+FragNo=54
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 2 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order3.at
===================================================================
--- tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### coronene - order 3 w cycles
+
+AT_SETUP([Fragmentations - coronene order 3 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=coronene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=7
+FragNo=102
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 3 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order4.at
===================================================================
--- tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### coronene - order 4 w cycles
+
+AT_SETUP([Fragmentations - coronene order 4 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=coronene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=7
+FragNo=192
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 4 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order5.at
===================================================================
--- tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### coronene - order 5 w cycles
+
+AT_SETUP([Fragmentations - coronene order 5 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=coronene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=7
+FragNo=378
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 5 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order6.at
===================================================================
--- tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/coronene/testsuite-fragmenting-coronene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### coronene - order 6 w cycles
+
+AT_SETUP([Fragmentations - coronene order 6 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=coronene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=7
+FragNo=757
+#let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 6 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/naphthalene/pre/naphthalene.pdb
===================================================================
--- tests/Fragmentations/Fragmenting/naphthalene/pre/naphthalene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/naphthalene/pre/naphthalene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,40 @@
+COMPND    UNNAMED
+AUTHOR    GENERATED BY OPEN BABEL 2.3.0
+HETATM    1  C   LIG     1      22.114 -16.869   0.000  1.00  0.00           C  
+HETATM    2  C   LIG     1      22.114 -15.471   0.000  1.00  0.00           C  
+HETATM    3  C   LIG     1      20.900 -17.574   0.000  1.00  0.00           C  
+HETATM    4  C   LIG     1      23.334 -17.568   0.000  1.00  0.00           C  
+HETATM    5  C   LIG     1      20.900 -14.778   0.000  1.00  0.00           C  
+HETATM    6  C   LIG     1      23.327 -14.759   0.000  1.00  0.00           C  
+HETATM    7  C   LIG     1      19.706 -16.869   0.000  1.00  0.00           C  
+HETATM    8  C   LIG     1      24.554 -16.875   0.000  1.00  0.00           C  
+HETATM    9  C   LIG     1      19.706 -15.471   0.000  1.00  0.00           C  
+HETATM   10  C   LIG     1      24.547 -15.465   0.000  1.00  0.00           C  
+HETATM   11  H   LIG     1      20.896 -18.606   0.000  1.00  0.00           H  
+HETATM   12  H   LIG     1      23.332 -18.600   0.000  1.00  0.00           H  
+HETATM   13  H   LIG     1      20.896 -13.746   0.000  1.00  0.00           H  
+HETATM   14  H   LIG     1      23.324 -13.728   0.000  1.00  0.00           H  
+HETATM   15  H   LIG     1      18.809 -17.380   0.000  1.00  0.00           H  
+HETATM   16  H   LIG     1      25.447 -17.393   0.000  1.00  0.00           H  
+HETATM   17  H   LIG     1      18.811 -14.956   0.000  1.00  0.00           H  
+HETATM   18  H   LIG     1      25.440 -14.947   0.000  1.00  0.00           H  
+CONECT    1    2    3    4                                            
+CONECT    2    1    5    6                                            
+CONECT    3    1    7   11                                            
+CONECT    4    1    8   12                                            
+CONECT    5    2    9   13                                            
+CONECT    6    2   10   14                                            
+CONECT    7    3    9   15                                            
+CONECT    8    4   10   16                                            
+CONECT    9    5    7   17                                            
+CONECT   10    6    8   18                                            
+CONECT   11    3                                                      
+CONECT   12    4                                                      
+CONECT   13    5                                                      
+CONECT   14    6                                                      
+CONECT   15    7                                                      
+CONECT   16    8                                                      
+CONECT   17    9                                                      
+CONECT   18   10                                                      
+MASTER        0    0    0    0    0    0    0    0   18    0   18    0
+END
Index: tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order1.at
===================================================================
--- tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,69 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### naphthalene - order 1 w cycles
+
+AT_SETUP([Fragmentations - naphthalene order 1 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=naphthalene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=2
+FragNo=10
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 1 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+# check cycles just have six non-hydrogen
+let i=$FragNo-$CycleNo
+while test $i -lt $FragNo; do
+	AT_CHECK([grep -c "^HETATM.*C 0" ${FILENAME}`printf %02d $i`.pdb], 0, [stdout], [ignore])
+	AT_CHECK([test 6 == `cat stdout`], 0, [ignore], [ignore])
+	let i=$i+1
+done
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order2.at
===================================================================
--- tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### naphthalene - order 2 w cycles
+
+AT_SETUP([Fragmentations - naphthalene order 2 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=naphthalene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=2
+FragNo=21
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 2 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order3.at
===================================================================
--- tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### naphthalene - order 3 w cycles
+
+AT_SETUP([Fragmentations - naphthalene order 3 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=naphthalene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=2
+FragNo=35
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 3 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order4.at
===================================================================
--- tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### naphthalene - order 4 w cycles
+
+AT_SETUP([Fragmentations - naphthalene order 4 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=naphthalene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=2
+FragNo=55
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 4 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order5.at
===================================================================
--- tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### naphthalene - order 5 w cycles
+
+AT_SETUP([Fragmentations - naphthalene order 5 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=naphthalene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=2
+FragNo=85
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 5 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order6.at
===================================================================
--- tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/naphthalene/testsuite-fragmenting-naphthalene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### naphthalene - order 6 w cycles
+
+AT_SETUP([Fragmentations - naphthalene order 6 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=naphthalene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=2
+FragNo=120
+#let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 6 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/phenanthrene/pre/phenanthrene.pdb
===================================================================
--- tests/Fragmentations/Fragmenting/phenanthrene/pre/phenanthrene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/phenanthrene/pre/phenanthrene.pdb	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,52 @@
+COMPND    UNNAMED
+AUTHOR    GENERATED BY OPEN BABEL 2.3.0
+HETATM    1  C   LIG     1      29.492 -19.399   0.000  1.00  0.00           C  
+HETATM    2  C   LIG     1      30.702 -18.698   0.000  1.00  0.00           C  
+HETATM    3  C   LIG     1      29.489 -16.601   0.000  1.00  0.00           C  
+HETATM    4  C   LIG     1      30.699 -17.302   0.000  1.00  0.00           C  
+HETATM    5  C   LIG     1      31.911 -16.603   0.000  1.00  0.00           C  
+HETATM    6  C   LIG     1      31.912 -15.205   0.000  1.00  0.00           C  
+HETATM    7  C   LIG     1      30.701 -14.505   0.000  1.00  0.00           C  
+HETATM    8  C   LIG     1      29.490 -15.203   0.000  1.00  0.00           C  
+HETATM    9  C   LIG     1      28.275 -18.698   0.000  1.00  0.00           C  
+HETATM   10  C   LIG     1      28.275 -17.296   0.000  1.00  0.00           C  
+HETATM   11  C   LIG     1      27.061 -16.595   0.000  1.00  0.00           C  
+HETATM   12  C   LIG     1      25.847 -17.296   0.000  1.00  0.00           C  
+HETATM   13  C   LIG     1      25.847 -18.698   0.000  1.00  0.00           C  
+HETATM   14  C   LIG     1      27.061 -19.399   0.000  1.00  0.00           C  
+HETATM   15  H   LIG     1      29.493 -20.431   0.000  1.00  0.00           H  
+HETATM   16  H   LIG     1      31.597 -19.213   0.000  1.00  0.00           H  
+HETATM   17  H   LIG     1      32.804 -17.120   0.000  1.00  0.00           H  
+HETATM   18  H   LIG     1      32.806 -14.690   0.000  1.00  0.00           H  
+HETATM   19  H   LIG     1      30.702 -13.473   0.000  1.00  0.00           H  
+HETATM   20  H   LIG     1      28.597 -14.686   0.000  1.00  0.00           H  
+HETATM   21  H   LIG     1      27.061 -15.563   0.000  1.00  0.00           H  
+HETATM   22  H   LIG     1      24.953 -16.780   0.000  1.00  0.00           H  
+HETATM   23  H   LIG     1      24.953 -19.214   0.000  1.00  0.00           H  
+HETATM   24  H   LIG     1      27.061 -20.431   0.000  1.00  0.00           H  
+CONECT    1    9    2   15                                            
+CONECT    2    1    4   16                                            
+CONECT    3    8   10    4                                            
+CONECT    4    5    2    3                                            
+CONECT    5    4    6   17                                            
+CONECT    6    5    7   18                                            
+CONECT    7    6    8   19                                            
+CONECT    8    7    3   20                                            
+CONECT    9    1   10   14                                            
+CONECT   10    3    9   11                                            
+CONECT   11   10   12   21                                            
+CONECT   12   11   13   22                                            
+CONECT   13   12   14   23                                            
+CONECT   14   13    9   24                                            
+CONECT   15    1                                                      
+CONECT   16    2                                                      
+CONECT   17    5                                                      
+CONECT   18    6                                                      
+CONECT   19    7                                                      
+CONECT   20    8                                                      
+CONECT   21   11                                                      
+CONECT   22   12                                                      
+CONECT   23   13                                                      
+CONECT   24   14                                                      
+MASTER        0    0    0    0    0    0    0    0   24    0   24    0
+END
Index: tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order1.at
===================================================================
--- tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order1.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,69 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### phenanthrene - order 1 w cycles
+
+AT_SETUP([Fragmentations - phenanthrene order 1 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=phenanthrene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=14
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 1 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+# check cycles just have six non-hydrogen
+let i=$FragNo-$CycleNo
+while test $i -lt $FragNo; do
+	AT_CHECK([grep -c "^HETATM.*C 0" ${FILENAME}`printf %02d $i`.pdb], 0, [stdout], [ignore])
+	AT_CHECK([test 6 == `cat stdout`], 0, [ignore], [ignore])
+	let i=$i+1
+done
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order2.at
===================================================================
--- tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order2.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### phenanthrene - order 2 w cycles
+
+AT_SETUP([Fragmentations - phenanthrene order 2 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=phenanthrene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=30
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 2 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order3.at
===================================================================
--- tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order3.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### phenanthrene - order 3 w cycles
+
+AT_SETUP([Fragmentations - phenanthrene order 3 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=phenanthrene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=52
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 3 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order4.at
===================================================================
--- tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order4.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### phenanthrene - order 4 w cycles
+
+AT_SETUP([Fragmentations - phenanthrene order 4 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=phenanthrene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=87
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 4 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order5.at
===================================================================
--- tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order5.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### phenanthrene - order 5 w cycles
+
+AT_SETUP([Fragmentations - phenanthrene order 5 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=phenanthrene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=147
+let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 5 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order6.at
===================================================================
--- tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
+++ tests/Fragmentations/Fragmenting/phenanthrene/testsuite-fragmenting-phenanthrene-order6.at	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -0,0 +1,61 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### phenanthrene - order 6 w cycles
+
+AT_SETUP([Fragmentations - phenanthrene order 6 w cycles])
+AT_KEYWORDS([fragmentation non-convex-envelope])
+
+MOL=phenanthrene
+DISTANCE="2."
+FILENAME="BondFragment"
+
+CycleNo=3
+FragNo=238
+#let FragNo=$FragNo+$CycleNo
+
+file=${MOL}.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/Fragmentations/Fragmenting/${MOL}/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 --select-molecules-atoms -f $FILENAME --order 6 --distance $DISTANCE --DoCyclesFull 1  --output-types mpqc pcp pdb], 0, [stdout], [stderr])
+AT_CHECK([ls ${FILENAME}*.conf | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.pdb | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+AT_CHECK([ls ${FILENAME}*.in | wc -l | awk '{print $1}'], 0, [stdout], [ignore])
+AT_CHECK([test $FragNo == `cat stdout`], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
