Index: tests/Calculations/Makefile.am
===================================================================
--- tests/Calculations/Makefile.am	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/Makefile.am	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,85 @@
+AUTOM4TE = autom4te
+
+TESTSUITE = $(srcdir)/testsuite
+
+TESTSCRIPTS = \
+	testsuite-calculations-1_2-dimethoxyethane.at \
+	testsuite-calculations-1_2-dimethylbenzene.at \
+	testsuite-calculations-2-methylcyclohexanone.at \
+	testsuite-calculations-anthracene.at \
+	testsuite-calculations-benzene.at \
+	testsuite-calculations-cholesterol.at \
+	testsuite-calculations-coronene.at \
+	testsuite-calculations-cycloheptane.at \
+	testsuite-calculations-dimethyl_bromomalonate.at \
+	testsuite-calculations-glucose.at \
+	testsuite-calculations-heptan.at \
+	testsuite-calculations-isoleucine.at \
+	testsuite-calculations-mpqc.at \
+	testsuite-calculations-naphthalene.at \
+	testsuite-calculations-neohexane.at \
+	testsuite-calculations-N_N-dimethylacetamide.at \
+	testsuite-calculations-phenanthrene.at \
+	testsuite-calculations-proline.at \
+	testsuite-calculations-putrescine.at \
+	testsuite-calculations-tartaric_acid.at
+
+DISTCLEANFILES = atconfig
+
+EXTRA_DIST = \
+	atlocal.in \
+	package.m4 \
+	testsuite.at \
+	$(TESTSUITE) \
+	$(TESTSCRIPTS)
+
+max_jobs = 4
+
+if CONDJOBMARKET
+
+extracheck:
+installextracheck:
+
+else
+
+extracheck: atlocal package.m4 $(TESTSUITE)
+	nrjobs=; \
+	for flag in $$MAKEFLAGS; do \
+		case $$flag in \
+		--* | =*=) ;; \
+		*j*) nrjobs="-j$(max_jobs)" ;; \
+		esac; \
+	done; \
+	$(SHELL) '$(TESTSUITE)' $$nrjobs AUTOTEST_PATH='$(abs_top_builddir)/src' $(TESTSUITEFLAGS)
+
+installextracheck: atconfig atlocal $(TESTSUITE)
+	nrjobs=; \
+	for flag in $$MAKEFLAGS; do \
+		case $$flag in \
+		--* | =*=) ;; \
+		*j*) nrjobs="-j$(max_jobs)" ;; \
+		esac; \
+	done; \
+	$(SHELL) '$(TESTSUITE)' $$nrjobs AUTOTEST_PATH='$(bindir)' $(TESTSUITEFLAGS)
+
+endif
+
+clean-local:
+	test ! -f '$(TESTSUITE)' || \
+	$(SHELL) '$(TESTSUITE)' --clean
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): $(srcdir)/testsuite.at package.m4 $(TESTSCRIPTS)
+	$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+	mv $@.tmp $@
+
+# The `:;' works around a Bash 3.2 bug when the output is not writeable.
+package.m4: $(top_srcdir)/configure.ac
+	:;{ \
+		echo '# Signature of the current package.' && \
+		echo 'm4_define([AT_PACKAGE_NAME],      [@PACKAGE_NAME@])' && \
+		echo 'm4_define([AT_PACKAGE_TARNAME],   [@PACKAGE_TARNAME@])' && \
+		echo 'm4_define([AT_PACKAGE_VERSION],   [@PACKAGE_VERSION@])' && \
+		echo 'm4_define([AT_PACKAGE_STRING],    [@PACKAGE_STRING@])' && \
+		echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+	} >'package.m4'
Index: tests/Calculations/atlocal.in
===================================================================
--- tests/Calculations/atlocal.in	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/atlocal.in	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,1 @@
+abs_top_srcdir='@abs_top_srcdir@'
Index: tests/Calculations/molecuilder.in
===================================================================
--- tests/Calculations/molecuilder.in	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/molecuilder.in	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# wrapper for testing molecuilder
+
+. ../../atlocal
+
+if test ! -z ${valgrind}
+then
+G_SLICE=always-malloc G_DEBUG=gc-friendly \
+libtool --mode=execute \
+${valgrind} -v \
+--log-file=valgrind.log \
+--xml=yes \
+--xml-file=valgrind.err \
+--time-stamp=yes \
+--error-exitcode=255 \
+--leak-check=full \
+--leak-resolution=high \
+--num-callers=20 \
+--track-origins=yes \
+--show-reachable=yes \
+"${AUTOTEST_PATH}/molecuilder" \
+${1+"$@"}
+else
+"${AUTOTEST_PATH}/molecuilder" \
+${1+"$@"}
+fi
+
+status=$?
+
+exit $status
Index: tests/Calculations/testsuite-calculations-1_2-dimethoxyethane.at
===================================================================
--- tests/Calculations/testsuite-calculations-1_2-dimethoxyethane.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-1_2-dimethoxyethane.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### 1_2-dimethoxyethane
+
+AT_SETUP([Calculations - 1_2-dimethoxyethane])
+AT_KEYWORDS([Calculations 1_2-dimethoxyethane xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=1_2-dimethoxyethane
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-305.8824861"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-1_2-dimethylbenzene.at
===================================================================
--- tests/Calculations/testsuite-calculations-1_2-dimethylbenzene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-1_2-dimethylbenzene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### 1_2-dimethylbenzene
+
+AT_SETUP([Calculations - 1_2-dimethylbenzene])
+AT_KEYWORDS([Calculations 1_2-dimethylbenzene xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=1_2-dimethylbenzene
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-307.7013126"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-2-methylcyclohexanone.at
===================================================================
--- tests/Calculations/testsuite-calculations-2-methylcyclohexanone.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-2-methylcyclohexanone.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### 2-methylcyclohexanone
+
+AT_SETUP([Calculations - 2-methylcyclohexanone])
+AT_KEYWORDS([Calculations 2-methylcyclohexanone xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=2-methylcyclohexanone
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-345.7785727"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-N_N-dimethylacetamide.at
===================================================================
--- tests/Calculations/testsuite-calculations-N_N-dimethylacetamide.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-N_N-dimethylacetamide.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### N_N-dimethylacetamide
+
+AT_SETUP([Calculations - N_N-dimethylacetamide])
+AT_KEYWORDS([Calculations N_N-dimethylacetamide xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=N_N-dimethylacetamide
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-285.0372976"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-anthracene.at
===================================================================
--- tests/Calculations/testsuite-calculations-anthracene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-anthracene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,49 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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
+
+AT_SETUP([Calculations - anthracene])
+AT_KEYWORDS([Calculations anthracene pdb])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=anthracene
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-534.0229783"
+
+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 \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-benzene.at
===================================================================
--- tests/Calculations/testsuite-calculations-benzene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-benzene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### benzene
+
+AT_SETUP([Calculations - benzene])
+AT_KEYWORDS([Calculations benzene  xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=benzene
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-229.8685512"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-cholesterol.at
===================================================================
--- tests/Calculations/testsuite-calculations-cholesterol.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-cholesterol.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### cholesterol
+
+AT_SETUP([Calculations - cholesterol])
+AT_KEYWORDS([Calculations cholesterol  xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=cholesterol
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-1120.472417"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-coronene.at
===================================================================
--- tests/Calculations/testsuite-calculations-coronene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-coronene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,49 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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
+
+AT_SETUP([Calculations - coronene])
+AT_KEYWORDS([Calculations coronene pdb])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=coronene
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-912.5460915"
+
+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 \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-cycloheptane.at
===================================================================
--- tests/Calculations/testsuite-calculations-cycloheptane.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-cycloheptane.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### cycloheptane
+
+AT_SETUP([Calculations - cycloheptane])
+AT_KEYWORDS([Calculations cycloheptane  xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=cycloheptane
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-272.3623064"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-dimethyl_bromomalonate.at
===================================================================
--- tests/Calculations/testsuite-calculations-dimethyl_bromomalonate.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-dimethyl_bromomalonate.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### dimethyl_bromomalonate
+
+AT_SETUP([Calculations - dimethyl_bromomalonate])
+AT_KEYWORDS([Calculations dimethyl_bromomalonate  xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=dimethyl_bromomalonate
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-3051.178822"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-glucose.at
===================================================================
--- tests/Calculations/testsuite-calculations-glucose.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-glucose.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### glucose
+
+AT_SETUP([Calculations - glucose])
+AT_KEYWORDS([Calculations glucose xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=glucose
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-680.7605748"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-heptan.at
===================================================================
--- tests/Calculations/testsuite-calculations-heptan.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-heptan.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### heptan
+
+AT_SETUP([Calculations - heptan])
+AT_KEYWORDS([Calculations heptan xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=heptan
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-273.5415941"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-isoleucine.at
===================================================================
--- tests/Calculations/testsuite-calculations-isoleucine.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-isoleucine.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### isoleucine
+
+AT_SETUP([Calculations - isoleucine])
+AT_KEYWORDS([Calculations isoleucine xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=isoleucine
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-437.4301237"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-mpqc.at
===================================================================
--- tests/Calculations/testsuite-calculations-mpqc.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-mpqc.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,32 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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_SETUP([Checking for present and working mpqc])
+AT_KEYWORDS([Calculations mpqc])
+AT_TESTED([mpqc])
+AT_SKIP_IF([test x"`which mpqc`" = "x"])
+
+file=input.in
+AT_CHECK([cp -f $abs_top_srcdir/tests/Calculations/pre/water.in $file], 0, ignore, ignore)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([mpqc -o output.out input.in], 0, ignore, ignore)
+AT_CHECK(
+	[grep -E 'Value of the MolecularEnergy:' output.out | tr -d \  | awk -F":" 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - -74.9598807973) > 1e-5) exit(1)}'], 
+	0, 
+	ignore, 
+	ignore)
+AT_CLEANUP
Index: tests/Calculations/testsuite-calculations-naphthalene.at
===================================================================
--- tests/Calculations/testsuite-calculations-naphthalene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-naphthalene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,49 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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
+
+AT_SETUP([Calculations - naphthalene])
+AT_KEYWORDS([Calculations naphthalene pdb])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=naphthalene
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-381.9499338"
+
+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 \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-neohexane.at
===================================================================
--- tests/Calculations/testsuite-calculations-neohexane.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-neohexane.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### neohexane
+
+AT_SETUP([Calculations - neohexane])
+AT_KEYWORDS([Calculations neohexane xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=neohexane
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-234.6428085"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-phenanthrene.at
===================================================================
--- tests/Calculations/testsuite-calculations-phenanthrene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-phenanthrene.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,49 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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
+
+AT_SETUP([Calculations - phenanthrene])
+AT_KEYWORDS([Calculations phenanthrene pdb])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=phenanthrene
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-534.0348792"
+
+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 \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-proline.at
===================================================================
--- tests/Calculations/testsuite-calculations-proline.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-proline.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### proline
+
+AT_SETUP([Calculations - proline])
+AT_KEYWORDS([Calculations proline xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=proline
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-397.3029549"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-putrescine.at
===================================================================
--- tests/Calculations/testsuite-calculations-putrescine.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-putrescine.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### putrescine
+
+AT_SETUP([Calculations - putrescine])
+AT_KEYWORDS([Calculations putrescine xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=putrescine
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-266.4176686"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite-calculations-tartaric_acid.at
===================================================================
--- tests/Calculations/testsuite-calculations-tartaric_acid.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite-calculations-tartaric_acid.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -0,0 +1,50 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 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/>.
+#
+### tartaric_acid
+
+AT_SETUP([Calculations - tartaric_acid])
+AT_KEYWORDS([Calculations tartaric_acid xyz])
+AT_SKIP_IF([test x"`which mpqc`" = x])
+
+MOL=tartaric_acid
+DISTANCE="2."
+FILENAME="BondFragment"
+ENERGY="-601.8663851"
+
+file=${MOL}.xyz
+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 \
+	--subgraph-dissection \
+	--select-molecule-by-id 0 \
+	--select-molecules-atoms \
+	--fragment-molecule $FILENAME \
+	--order 3 \
+	--distance $DISTANCE \
+	--fragment-automation \
+	--fragment-executable mpqc \
+	 --analyse-fragment-results \
+	 --fragment-prefix $FILENAME \
+	 --fragment-resultfile ${FILENAME}_results.dat], 
+	 0, [stdout], [stderr])
+AT_CHECK([tail -n 1 ${FILENAME}_Energy.dat | awk -v energy=$ENERGY 'function abs(x){return ((x < 0.0) ? -x : x)} {if (abs($2 - energy) > 1e-5) exit(1)}'], 0)
+
+AT_CLEANUP
+
Index: tests/Calculations/testsuite.at
===================================================================
--- tests/Calculations/testsuite.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
+++ tests/Calculations/testsuite.at	(revision abfc95ba5c74e7d73ba21441037391420169955e)
@@ -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/>.
+#
+# Process with autom4te to create an -*- Autotest -*- test suite.
+#
+# see regression/... subdirs wherein for each of the cases and each check (enumerated) is a pre and post dir. 
+# In pre initial files are placed, in post results can be found to be checked by diff in this testsuite.
+
+AT_INIT([Molecular Builder])
+AT_TESTED(basename egrep find grep sed)
+
+# Use colored output with new-enough Autotest.
+m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS])
+
+AT_BANNER([MoleCuilder - Calculations Checks])
+m4_include(atlocal)
+
+# MPQC can be found and runs
+m4_include(testsuite-calculations-mpqc.at)
+
+# now all the molecules
+m4_include(testsuite-calculations-1_2-dimethoxyethane.at)
+m4_include(testsuite-calculations-1_2-dimethylbenzene.at)
+m4_include(testsuite-calculations-2-methylcyclohexanone.at)
+m4_include(testsuite-calculations-anthracene.at)
+m4_include(testsuite-calculations-benzene.at)
+m4_include(testsuite-calculations-cholesterol.at)
+m4_include(testsuite-calculations-coronene.at)
+m4_include(testsuite-calculations-cycloheptane.at)
+m4_include(testsuite-calculations-dimethyl_bromomalonate.at)
+m4_include(testsuite-calculations-glucose.at)
+m4_include(testsuite-calculations-heptan.at)
+m4_include(testsuite-calculations-isoleucine.at)
+m4_include(testsuite-calculations-naphthalene.at)
+m4_include(testsuite-calculations-neohexane.at)
+m4_include(testsuite-calculations-N_N-dimethylacetamide.at)
+m4_include(testsuite-calculations-phenanthrene.at)
+m4_include(testsuite-calculations-proline.at)
+m4_include(testsuite-calculations-putrescine.at)
+m4_include(testsuite-calculations-tartaric_acid.at)
+
