Index: configure.ac
===================================================================
--- configure.ac	(revision c3f7959e9d2e69c030026730b7bfc8d1664a12ac)
+++ configure.ac	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -523,4 +523,5 @@
 	tests/Calculations/Makefile])
 AC_CONFIG_FILES([tests/Calculations/molecuilder], [chmod +x tests/Calculations/molecuilder])
+AC_CONFIG_FILES([tests/Calculations/molecuilder_mpqc], [chmod +x tests/Calculations/molecuilder_mpqc])
 
 AC_CONFIG_TESTDIR(tests/CodeChecks)
@@ -578,4 +579,5 @@
 	tests/Examples/Makefile])
 AC_CONFIG_FILES([tests/Examples/molecuilder], [chmod +x tests/Examples/molecuilder])
+AC_CONFIG_FILES([tests/Examples/molecuilder_mpqc], [chmod +x tests/Examples/molecuilder_mpqc])
 
 AC_CONFIG_FILES([
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision c3f7959e9d2e69c030026730b7bfc8d1664a12ac)
+++ src/Makefile.am	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -407,10 +407,10 @@
 	$(JobMarket_LIBS)
 
-bin_PROGRAMS += Controller PoolWorker Server
-
-Controller_SOURCES = controller.cpp controller_AddOn_MPQCCommandJob.cpp
-Controller_LDFLAGS = $(AM_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
-Controller_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
-Controller_LDADD = \
+bin_PROGRAMS += molecuilder_controller molecuilder_poolworker molecuilder_server
+
+molecuilder_controller_SOURCES = controller.cpp controller_AddOn_MPQCCommandJob.cpp
+molecuilder_controller_LDFLAGS = $(AM_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
+molecuilder_controller_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
+molecuilder_controller_LDADD = \
 	libFragmentationAutomationController.la \
 	libMolecuilderFragmentation_getFromKeysetStub.la \
@@ -427,8 +427,8 @@
 	${CodePatterns_LIBS}
 
-PoolWorker_SOURCES = poolworker.cpp 
-PoolWorker_LDFLAGS = $(AM_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
-PoolWorker_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
-PoolWorker_LDADD = \
+molecuilder_poolworker_SOURCES = poolworker.cpp 
+molecuilder_poolworker_LDFLAGS = $(AM_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
+molecuilder_poolworker_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
+molecuilder_poolworker_LDADD = \
 	libMolecuilderJobs.la \
 	libMolecuilderJobs_Work.la \
@@ -440,8 +440,8 @@
 	${CodePatterns_LIBS}
 
-Server_SOURCES = Server.cpp 
-Server_LDFLAGS = $(AM_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
-Server_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
-Server_LDADD = \
+molecuilder_server_SOURCES = Server.cpp 
+molecuilder_server_LDFLAGS = $(AM_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS)
+molecuilder_server_CPPFLAGS = $(AM_CPPFLAGS) $(JobMarket_CFLAGS)
+molecuilder_server_LDADD = \
 	libMolecuilderJobs.la \
 	libMolecuilderJobs_Work.la \
Index: tests/Calculations/molecuilder_mpqc.in
===================================================================
--- tests/Calculations/molecuilder_mpqc.in	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
+++ tests/Calculations/molecuilder_mpqc.in	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# wrapper for testing molecuilder
+
+. ../../atlocal
+
+if test -e ${AUTOTEST_PATH}/../ThirdParty/mpqc_open/src/bin/mpqc/molecuilder_mpqc; then
+	${AUTOTEST_PATH}/../ThirdParty/mpqc_open/src/bin/mpqc/molecuilder_mpqc -n "$*"
+else
+	if test -e ${AUTOTEST_PATH}/molecuilder_mpqc; then
+		${AUTOTEST_PATH}/molecuilder_mpqc -n "$*"
+	else
+		echo "Could not find molecuilder_mpqc."
+		exit 127
+	fi
+fi
Index: tests/Examples/PartialChargeFitting/testsuite-examples-partialchargefitting-h2o.at
===================================================================
--- tests/Examples/PartialChargeFitting/testsuite-examples-partialchargefitting-h2o.at	(revision c3f7959e9d2e69c030026730b7bfc8d1664a12ac)
+++ tests/Examples/PartialChargeFitting/testsuite-examples-partialchargefitting-h2o.at	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -22,15 +22,15 @@
 
 # check that ports are unique over all tests such that they may run in parallel
-WORKERPORT=2075
-CONTROLLERPORT=2076
-WORKERLISTENPORT=2077
+WORKERPORT=4015
+CONTROLLERPORT=4016
+WORKERLISTENPORT=4017
 
 # start service in background
-${AUTOTEST_PATH}/Server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
+${AUTOTEST_PATH}/molecuilder_server --signal 2 --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
 server_pid=$!
-AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid])
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/../ThirdParty/mpqc_open/src/bin/mpqc/mpqc -n "+v 5 ++signal 2 ++server 127.0.0.1:${WORKERPORT} ++hostname 127.0.0.1 ++listen $WORKERLISTENPORT" &
+../../molecuilder_mpqc +v 5 ++signal 2 ++server 127.0.0.1:${WORKERPORT} ++hostname 127.0.0.1 ++listen $WORKERLISTENPORT &/
 worker_pid=$!
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
@@ -44,6 +44,6 @@
 
 # removeall to remove workers, then shutdown for server itself
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
 
 # check that server is truely down
Index: tests/Examples/Simple/testsuite-examples-simple-h2o.at
===================================================================
--- tests/Examples/Simple/testsuite-examples-simple-h2o.at	(revision c3f7959e9d2e69c030026730b7bfc8d1664a12ac)
+++ tests/Examples/Simple/testsuite-examples-simple-h2o.at	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -22,20 +22,29 @@
 
 # check that ports are unique over all tests such that they may run in parallel
-WORKERPORT=2065
-CONTROLLERPORT=2066
-WORKERLISTENPORT=2067
+WORKERPORT=4005
+CONTROLLERPORT=4006
+WORKERLISTENPORT=4007
 
 # start service in background
-${AUTOTEST_PATH}/Server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
+${AUTOTEST_PATH}/molecuilder_server --signal 2 --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
 server_pid=$!
-AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid])
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/../ThirdParty/mpqc_open/src/bin/mpqc/mpqc -n "+v 5 ++signal 2 ++server 127.0.0.1:${WORKERPORT} ++hostname 127.0.0.1 ++listen $WORKERLISTENPORT" &
+../../molecuilder_mpqc +v 5 ++signal 2 ++server 127.0.0.1:${WORKERPORT} ++hostname 127.0.0.1 ++listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
 
 # use molecuilder to add jobs, wait for their completion and obtain results
-AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/Examples/Simple/pre/water.pdb -v 3 --select-all-atoms --fragment-molecule BondFragment --order 1 --distance 2 --fragment-automation --server-address 127.0.0.1 --server-port $CONTROLLERPORT], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([../../molecuilder \
+	-i ${abs_top_srcdir}/tests/Examples/Simple/pre/water.pdb \
+	-v 3 --select-all-atoms \
+	--fragment-molecule BondFragment \
+	 --order 1 \
+	 --distance 2 \
+	--fragment-automation \
+	 --server-address 127.0.0.1 \
+	 --server-port $CONTROLLERPORT \
+	 --DoLongrange 0], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
 AT_CHECK([fgrep "There are 1 fragments" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
 AT_CHECK([fgrep "Energy: -75.6976" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
@@ -43,6 +52,6 @@
 
 # removeall to remove workers, then shutdown for server itself
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
 
 # check that server is truely down
Index: tests/Examples/molecuilder_mpqc.in
===================================================================
--- tests/Examples/molecuilder_mpqc.in	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
+++ tests/Examples/molecuilder_mpqc.in	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# wrapper for testing molecuilder
+
+. ../../atlocal
+
+if test -e ${AUTOTEST_PATH}/../ThirdParty/mpqc_open/src/bin/mpqc/molecuilder_mpqc; then
+	${AUTOTEST_PATH}/../ThirdParty/mpqc_open/src/bin/mpqc/molecuilder_mpqc -n "$*"
+else
+	if test -e ${AUTOTEST_PATH}/molecuilder_mpqc; then
+		${AUTOTEST_PATH}/molecuilder_mpqc -n "$*"
+	else
+		echo "Could not find molecuilder_mpqc."
+		exit 127
+	fi
+fi
Index: tests/JobMarket/testsuite-jobmarket-molecuilderrun.at
===================================================================
--- tests/JobMarket/testsuite-jobmarket-molecuilderrun.at	(revision c3f7959e9d2e69c030026730b7bfc8d1664a12ac)
+++ tests/JobMarket/testsuite-jobmarket-molecuilderrun.at	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -36,10 +36,10 @@
 
 # start service in background
-${AUTOTEST_PATH}/Server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
+${AUTOTEST_PATH}/molecuilder_server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
 server_pid=$!
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
+${AUTOTEST_PATH}/molecuilder_poolworker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
@@ -55,6 +55,6 @@
 
 # removeall to remove workers, then shutdown for server itself
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
 
 # check that server is truely down
Index: tests/JobMarket/testsuite-jobmarket-mpqc-jobs.at
===================================================================
--- tests/JobMarket/testsuite-jobmarket-mpqc-jobs.at	(revision c3f7959e9d2e69c030026730b7bfc8d1664a12ac)
+++ tests/JobMarket/testsuite-jobmarket-mpqc-jobs.at	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -37,22 +37,22 @@
 
 # start service in background
-${AUTOTEST_PATH}/Server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
+${AUTOTEST_PATH}/molecuilder_server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
 server_pid=$!
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
 
 # add jobs
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command addjobs --executable "../../mpqc" --jobfiles Job??.in], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command addjobs --executable "../../mpqc" --jobfiles Job??.in], 0, [ignore], [ignore], [kill $server_pid])
 
 # enlist a worker to work on jobs
-${AUTOTEST_PATH}/PoolWorker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
+${AUTOTEST_PATH}/molecuilder_poolworker -v 5 --signal 2 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 5], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
 
 # send removeall to server such that all workers shutdown
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
 
 # check number of done jobs
 NoJobs=`ls -l ${abs_top_srcdir}/tests/JobMarket/pre/BondFragment* 2>/dev/null | wc -l` 
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command receivempqc --fragment-path ${abs_top_srcdir}/tests/JobMarket/pre/ --ids `seq --sep=" " 1 $NoJobs`], 0, [stdout], [ignore], [kill $server_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command receivempqc --fragment-path ${abs_top_srcdir}/tests/JobMarket/pre/ --ids `seq --sep=" " 1 $NoJobs`], 0, [stdout], [ignore], [kill $server_pid])
 AT_CHECK([fgrep "There are 7 fragments" stdout], 0, [ignore], [ignore], [kill $server_pid])
 AT_CHECK([fgrep "There are 23 atoms" stdout], 0, [ignore], [ignore], [kill $server_pid])
@@ -61,5 +61,5 @@
 
 # shutdown controller socket 
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid])
 
 # check that server is truely down
Index: tests/integration/testsuite-integration-mpqc-jobs.at
===================================================================
--- tests/integration/testsuite-integration-mpqc-jobs.at	(revision c3f7959e9d2e69c030026730b7bfc8d1664a12ac)
+++ tests/integration/testsuite-integration-mpqc-jobs.at	(revision 440ac3df4daed0535002cec4b3d8346f49b294a5)
@@ -18,5 +18,5 @@
 ### test mpqc jobs 
 
-# perform test with PoolWorkers using stastand-inn mpqc
+# perform test with PoolWorkers using molecuilder_mpqc
 AT_SETUP([Integration - fragmentation plus automated fragment calculation via mpqc])
 AT_KEYWORDS([fragmentation automation server poolworker molecuilder_mpqc])
@@ -28,5 +28,5 @@
 
 # start service in background
-${AUTOTEST_PATH}/Server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
+${AUTOTEST_PATH}/molecuilder_server --workerport $WORKERPORT --controllerport $CONTROLLERPORT &
 server_pid=$!
 AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid])
@@ -34,5 +34,5 @@
 
 # enlist a worker to work on jobs
-../../molecuilder_mpqc +v 5 ++signal 2 ++server 127.0.0.1:${WORKERPORT} ++hostname 127.0.0.1 ++listen $WORKERLISTENPORT &
+../../molecuilder_mpqc +v 5 ++server 127.0.0.1:${WORKERPORT} ++hostname 127.0.0.1 ++listen $WORKERLISTENPORT &
 worker_pid=$!
 AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
@@ -60,19 +60,18 @@
 
 # send removeall to server such that all workers shutdown
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
-
-# check number of done jobs
-NoJobs=`ls -l ${abs_top_srcdir}/tests/JobMarket/pre/BondFragment* 2>/dev/null | wc -l` 
-AT_CHECK([fgrep "There are 3 fragments" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
-AT_CHECK([fgrep "There are 1 molecules to consider" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
-AT_CHECK([fgrep "8 atoms selected." stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
-AT_CHECK([tail -n 1 BondFragment_Energy.dat | awk '{if ($2!=-78.79298686) exit 1}'], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
-
-# shutdown controller socket 
-AT_CHECK([${AUTOTEST_PATH}/Controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command removeall], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
 
 # check that worker is truely down
 AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $worker_pid $server_pid])
 AT_CHECK([kill $worker_pid], 1, [ignore], [ignore], [kill $server_pid])
+
+# check number of done jobs
+AT_CHECK([fgrep "There are 3 fragments" stdout], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([fgrep "There are 1 molecules to consider" stdout], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([fgrep "8 atoms selected." stdout], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([tail -n 1 BondFragment_Energy.dat | awk '{if ($2!=-78.79298686) exit 1}'], 0, [ignore], [ignore], [kill $server_pid])
+
+# shutdown controller socket 
+AT_CHECK([${AUTOTEST_PATH}/molecuilder_controller --server 127.0.0.1:$CONTROLLERPORT --command shutdown], 0, [stdout], [ignore], [kill $server_pid])
 
 # check that server is truely down
