Index: tests/GuiChecks/Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at
===================================================================
--- tests/GuiChecks/Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
+++ tests/GuiChecks/Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
@@ -0,0 +1,105 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 University of Bonn
+#    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/>.
+#
+### fragment the molecule and check the number of configs
+#
+# BondFragmentShortRangeResults.dat is created like this:
+# ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Ignore Ignore Ignore --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 0 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragmentShortRangeResults.dat
+
+AT_SETUP([Fragmentation - Analyse short-range fragmentation results])
+AT_KEYWORDS([fragmentation analyse-fragment-results])
+
+file=BondFragmentShortRangeResults.dat
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run --analyse-fragment-results --fragment-resultfile $file --no-dry-run --store-session session-fragmentation-analyse-fragment-results.py --session-type python], 0, [ignore], [ignore])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-analyse-fragment-results.py >session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Forces.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Times.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Eigenvalues.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Eigenhistogram.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_IndexedEnergy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Fragmentation - Analyse short-range fragmentation results with forces])
+AT_KEYWORDS([fragmentation analyse-fragment-results forces])
+
+file=BondFragmentShortRangeResults.dat
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file --no-dry-run --store-session session-fragmentation-analyse-fragment-results.py --session-type python], 0, [ignore], [ignore])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-analyse-fragment-results.py >session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [ignore])
+AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/alkane-3.data], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+#
+# BondFragmentLongRangeResults.dat is created like this:
+# ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Ignore Ignore Ignore --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 1 --DoValenceOnly 0 --grid-level 4 --near-field-cells 3 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragmentLongRangeResults.dat
+
+AT_SETUP([Fragmentation - Analyse long-range fragmentation results with OBC])
+AT_KEYWORDS([fragmentation analyse-fragment-results])
+
+file=BondFragmentLongRangeResults_OBC.dat
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file --no-dry-run --store-session session-fragmentation-analyse-fragment-results.py --session-type python], 0, [ignore], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-analyse-fragment-results.py >session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [stderr])
+#AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/alkane-3.data], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Forces.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Times.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Eigenvalues.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Eigenhistogram.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_IndexedEnergy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
+AT_CHECK([grep "File contains long-range information" stderr], 0, [ignore], [ignore], [
+	AT_CHECK([output=BondFragment_LongRangeEnergy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/OBC/$output], 0, [ignore], [ignore])
+	])
+
+AT_CLEANUP
+
+#
+# BondFragmentLongRangeResults.dat is created like this:
+# ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Wrap Wrap Wrap --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 1 --DoValenceOnly 0 --grid-level 4 --near-field-cells 3 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragmentLongRangeResults.dat
+
+AT_SETUP([Fragmentation - Analyse long-range fragmentation results with PBC])
+AT_KEYWORDS([fragmentation analyse-fragment-results])
+
+file=BondFragmentLongRangeResults_PBC.dat
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb -o tremolo --set-tremolo-atomdata "Id type x=3 u=3 F=3" --reset 1 --analyse-fragment-results --fragment-resultfile $file --no-dry-run --store-session session-fragmentation-analyse-fragment-results.py --session-type python], 0, [ignore], [stderr])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-analyse-fragment-results.py >session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-analyse-fragment-results_new.py], 0, [ignore], [stderr])
+#AT_CHECK([diff alkane-3.data ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/alkane-3.data], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Forces.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Times.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Eigenvalues.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_Eigenhistogram.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
+AT_CHECK([output=BondFragment_IndexedEnergy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
+AT_CHECK([grep "File contains long-range information" stderr], 0, [ignore], [ignore], [
+	AT_CHECK([output=BondFragment_LongRangeEnergy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/PBC/$output], 0, [ignore], [ignore])
+	])
+
+AT_CLEANUP
Index: tests/GuiChecks/Fragmentation/FragmentMolecule-MaxOrder/testsuite-fragmentation-fragment-molecule-maxorder.at
===================================================================
--- tests/GuiChecks/Fragmentation/FragmentMolecule-MaxOrder/testsuite-fragmentation-fragment-molecule-maxorder.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
+++ tests/GuiChecks/Fragmentation/FragmentMolecule-MaxOrder/testsuite-fragmentation-fragment-molecule-maxorder.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
@@ -0,0 +1,38 @@
+#
+#    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/>.
+#
+### check whether parsing of BondFragment files and re-rwriting config files is working (exit code is 2 as we don't need to continue wrt to ...OrderAtSite)
+
+# NOTE: Result code of 2 is not returned if "-v 1" is missing, then sequence of atoms is changed all the time and Adjacency files never match.
+AT_SETUP([Fragmentation - Fragmentation is at MaxOrder])
+AT_KEYWORDS([fragmentation fragment-molecule])
+# is set to XFAIL as OrderAtSite is currently deleted after fragmentation
+# since it comes in the way of molecular dynamic runs (which is a MakroAction)
+# hence we have no way of removing OrderAtSite only for this action.
+AT_XFAIL_IF([/bin/true])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule-MaxOrder/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run -i $file -I -v 1 --select-molecule-by-id 0 --select-molecules-atoms -f ./BondFragment --distance 1.55 --order 2 --output-types "pcp" --no-dry-run --store-session session-fragmentation-fragment-molecule-maxorder.py --session-type python], 0, [ignore], [ignore])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-fragment-molecule-maxorder.py >session-fragmentation-fragment-molecule-maxorder_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-fragment-molecule-maxorder_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run -i $file -I -v 1 --select-molecule-by-id 0 --select-molecules-atoms -f ./BondFragment --distance 1.55 --order 2 --output-types "pcp" --no-dry-run --store-session session-fragmentation-fragment-molecule-maxorder.py --session-type python], 0, [ignore], [ignore])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-fragment-molecule-maxorder.py >session-fragmentation-fragment-molecule-maxorder_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-fragment-molecule-maxorder_new.py], 2, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/GuiChecks/Fragmentation/FragmentMolecule/testsuite-fragmentation-fragment-molecule.at
===================================================================
--- tests/GuiChecks/Fragmentation/FragmentMolecule/testsuite-fragmentation-fragment-molecule.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
+++ tests/GuiChecks/Fragmentation/FragmentMolecule/testsuite-fragmentation-fragment-molecule.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
@@ -0,0 +1,55 @@
+#
+#    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/>.
+#
+### fragment the molecule and check the number of configs
+
+AT_SETUP([Fragmentation - Fragmentation])
+AT_KEYWORDS([fragmentation fragment-molecule])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run -i $file -I -v 1 --select-molecule-by-id 0 --select-molecules-atoms -f ./BondFragment --distance 1.55 --order 2 --output-types "pcp" --no-dry-run --store-session session-fragmentation-fragment-molecule.py --session-type python], 0, [ignore], [ignore])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-fragment-molecule.py >session-fragmentation-fragment-molecule_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-fragment-molecule_new.py], 0, [ignore], [ignore])
+#AT_CHECK([diff BondFragment0.conf ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/post/BondFragment0.conf], 0, [ignore], [ignore])
+#AT_CHECK([diff BondFragment1.conf ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/post/BondFragment1.conf], 0, [ignore], [ignore])
+#AT_CHECK([diff BondFragment2.conf ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/post/BondFragment2.conf], 0, [ignore], [ignore])
+#AT_CHECK([diff BondFragment3.conf ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/post/BondFragment3.conf], 0, [ignore], [ignore])
+#AT_CHECK([diff BondFragment4.conf ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/post/BondFragment4.conf], 0, [ignore], [ignore])
+AT_CHECK([ls -l BondFragment*.conf | wc -l], 0, [5
+], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Fragmentation - Fragmentation with cycles])
+AT_KEYWORDS([fragmentation fragment-molecule cycle])
+
+file=benzene.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/pre/$file $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder --dry-run -i $file --update-molecules --select-all-atoms --fragment-molecule ./BondFragment --DoCyclesFull 1 --distance 2 --order 2 --output-types "xyz" --no-dry-run --store-session session-fragmentation-fragment-molecule.py --session-type python], 0, [ignore], [ignore])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-fragment-molecule.py >session-fragmentation-fragment-molecule_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-fragment-molecule_new.py], 0, [ignore], [ignore])
+AT_CHECK([ls -l BondFragment??.xyz | wc -l], 0, [13
+], [ignore])
+AT_CHECK([cat <BondFragment12.xyz | wc -l], 0, [14
+], [ignore])
+AT_CHECK([cat <BondFragmentCycles.dat | wc -w], 0, [6
+], [ignore])
+
+AT_CLEANUP
Index: tests/GuiChecks/Fragmentation/FragmentationAutomation/testsuite-fragmentation-fragmentation-automation.at
===================================================================
--- tests/GuiChecks/Fragmentation/FragmentationAutomation/testsuite-fragmentation-fragmentation-automation.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
+++ tests/GuiChecks/Fragmentation/FragmentationAutomation/testsuite-fragmentation-fragmentation-automation.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
@@ -0,0 +1,63 @@
+#
+#    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/>.
+#
+### calculate fragment energies with mpqc
+
+AT_SETUP([Fragmentation Automation - Fragmentation fails correctly])
+AT_KEYWORDS([fragmentation automation fragment-molecule fragmentation-automation])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder \
+	-i $file \
+	--subgraph-dissection \
+	--verbose 1 \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule BondFragment \
+	--distance 1.55 \
+	--order 2 \
+	--fragment-automation \
+	--fragment-executable /bin/false], 
+	5, [stdout], [stderr])
+
+AT_CLEANUP
+
+AT_SETUP([Fragmentation Automation - Fragmentation fails, more Actions still in queue])
+AT_KEYWORDS([fragmentation automation fragment-molecule fragmentation-automation])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/FragmentMolecule/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder \
+	-i $file \
+	--subgraph-dissection \
+	--verbose 1 \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule BondFragment \
+	--distance 1.55 \
+	--order 2 \
+	--fragment-automation \
+	--fragment-executable /bin/false \ 
+	--analyse-fragment-results \
+	--fragment-prefix $FILENAME \
+	--fragment-resultfile ${FILENAME}_results.dat], 
+	5, [stdout], [stderr])
+
+AT_CLEANUP
Index: tests/GuiChecks/Fragmentation/StoreSaturatedFragment/testsuite-fragmentation-store-saturated-fragment.at
===================================================================
--- tests/GuiChecks/Fragmentation/StoreSaturatedFragment/testsuite-fragmentation-store-saturated-fragment.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
+++ tests/GuiChecks/Fragmentation/StoreSaturatedFragment/testsuite-fragmentation-store-saturated-fragment.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
@@ -0,0 +1,33 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2013 University of Bonn
+#    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/>.
+#
+### store a saturated fragment of a molecule
+
+AT_SETUP([Fragmentation - Store saturated fragment])
+AT_KEYWORDS([fragmentation store-saturated-fragment])
+AT_XFAIL_IF([/bin/false])
+
+file=BondFragment0.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/StoreSaturatedFragment/pre/C6-0.Sheet.Aligned.xyz C6-0.Sheet.Aligned.xyz], 0)
+length="10.5"
+AT_CHECK([../../molecuilder --dry-run -i C6-0.Sheet.Aligned.xyz --add-empty-boundary .6,.6,5 --select-all-atoms --create-adjacency --create-shape --shape-type cube --stretch $length,$length,2 --translation 10,10,4 --shape-name testfragment --select-shape-by-name testfragment --clear-atom-selection --select-atoms-inside-volume --store-saturated-fragment BondFragment --DoSaturate 1 --output-types xyz --no-dry-run --store-session session-fragmentation-store-saturated-fragment.py --session-type python], 0, [ignore], [ignore])
+AT_CHECK([grep -v "Command.*DryRun" session-fragmentation-store-saturated-fragment.py >session-fragmentation-store-saturated-fragment_new.py], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilderguitest session-fragmentation-store-saturated-fragment_new.py], 0, [ignore], [ignore])
+#AT_CHECK([diff -I '.*reated by.*' $file ${abs_top_srcdir}/tests/regression/Fragmentation/StoreSaturatedFragment/post/$file], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/GuiChecks/Fragmentation/testsuite-fragmentation.at
===================================================================
--- tests/GuiChecks/Fragmentation/testsuite-fragmentation.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
+++ tests/GuiChecks/Fragmentation/testsuite-fragmentation.at	(revision dd6c07d2c5d563c8e46c0a4b01a0de11563eb584)
@@ -0,0 +1,34 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#    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/>.
+#
+AT_BANNER([MoleCuilder - fragmentation tests])
+
+# check fragmentation
+m4_include([Fragmentation/FragmentMolecule/testsuite-fragmentation-fragment-molecule.at])
+
+# check analysis
+m4_include([Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at])
+
+# check whether parsing of BondFragment files and re-rwriting config files is working (exit code is 2 as we don't need to continue wrt to ...OrderAtSite)
+m4_include([Fragmentation/FragmentMolecule-MaxOrder/testsuite-fragmentation-fragment-molecule-maxorder.at])
+
+# check storing saturated fragment
+m4_include([Fragmentation/StoreSaturatedFragment/testsuite-fragmentation-store-saturated-fragment.at])
+
+# check automation
+m4_include([Fragmentation/FragmentationAutomation/testsuite-fragmentation-fragmentation-automation.at])
