Index: tests/integration/Makefile.am
===================================================================
--- tests/integration/Makefile.am	(revision 9346af502d49654ce8d98f6cb1f296a98b095731)
+++ tests/integration/Makefile.am	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
@@ -14,5 +14,7 @@
 	$(srcdir)/FragmentJobs/testsuite-integration-fragmentjobs.at \
 	$(srcdir)/FragmentJobs/testsuite-integration-fragmentjobs-mpqc-jobs.at \
-	$(srcdir)/FragmentJobs/testsuite-integration-fragmentjobs-vmg-jobs.at
+	$(srcdir)/FragmentJobs/testsuite-integration-fragmentjobs-vmg-jobs.at \
+	$(srcdir)/MolecularDynamics/testsuite-integration-moleculardynamics.at \
+	$(srcdir)/MolecularDynamics/testsuite-integration-moleculardynamics-water.at
 endif
 
Index: tests/integration/MolecularDynamics/post/water.ekin
===================================================================
--- tests/integration/MolecularDynamics/post/water.ekin	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
+++ tests/integration/MolecularDynamics/post/water.ekin	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
@@ -0,0 +1,32 @@
+# Step Temperature [K] Temperature [a.u.]
+0	0	0
+1	58.4772	0.000185186
+2	460.38	0.00145794
+3	981.739	0.00310899
+4	1299.18	0.00411426
+5	1266.57	0.00401099
+6	946.918	0.00299871
+7	518.561	0.00164219
+8	170.206	0.00053901
+9	35.1933	0.000111451
+10	162.27	0.00051388
+11	507.539	0.00160728
+12	940.706	0.00297904
+13	1272.3	0.00402915
+14	1318.27	0.00417471
+15	1006.99	0.00318895
+16	479.952	0.00151992
+17	65.9985	0.000209005
+18	58.5834	0.000185523
+19	461.338	0.00146097
+20	984.813	0.00311872
+21	1298.47	0.00411203
+22	1256.9	0.00398038
+23	929.165	0.00294249
+24	498.928	0.00158001
+25	156.409	0.000495318
+26	32.7667	0.000103766
+27	172.318	0.000545699
+28	526.098	0.00166605
+29	959.915	0.00303987
+30	0	0
Index: tests/integration/MolecularDynamics/post/water_initial_steps.data
===================================================================
--- tests/integration/MolecularDynamics/post/water_initial_steps.data	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
+++ tests/integration/MolecularDynamics/post/water_initial_steps.data	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
@@ -0,0 +1,9 @@
+# ATOMDATA	Id	type	x=3	u=3	F=3	neighbors=2
+# Box	10	0	0	0	10	0	0	0	10
+1	O	5	5	4.628	0	0	0	0	0	0	2	3	
+2	H	5.72	5	5.186	0	0	0	0	0	0	1	0	
+3	H	4.28	5	5.186	0	0	0	0	0	0	1	0	
+# ATOMDATA	Id	type	x=3	u=3	F=3	neighbors=2
+1	O	5	5	4.628	5.02649e-16	5.07973e-16	-0.000554706	3.21798e-14	3.25082e-14	-0.035499	2	3	
+2	H	5.72	5	5.186	0.00836884	-4.03771e-15	0.00440215	0.0337432	-1.62801e-14	0.0177495	1	0	
+3	H	4.28	5	5.186	-0.00836884	-4.02484e-15	0.00440215	-0.0337432	-1.62282e-14	0.0177495	1	0	
Index: tests/integration/MolecularDynamics/pre/water.pdb
===================================================================
--- tests/integration/MolecularDynamics/pre/water.pdb	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
+++ tests/integration/MolecularDynamics/pre/water.pdb	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
@@ -0,0 +1,8 @@
+REMARK created by molecuilder on Tue Feb 26 16:16:10 2013, time step 0
+ATOM      1 O01 0non 01          0.000   0.000   0.000  0.00  0.00           O 0
+ATOM      2 H01 0non 01          0.720   0.000   0.558  0.00  0.00           H 0
+ATOM      3 H02 0non 01         -0.720   0.000   0.558  0.00  0.00           H 0
+CONECT    1    2    3                                                           
+CONECT    2    1                                                                
+CONECT    3    1                                                                
+END
Index: tests/integration/MolecularDynamics/testsuite-integration-moleculardynamics-water.at
===================================================================
--- tests/integration/MolecularDynamics/testsuite-integration-moleculardynamics-water.at	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
+++ tests/integration/MolecularDynamics/testsuite-integration-moleculardynamics-water.at	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
@@ -0,0 +1,94 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2017 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/>.
+#
+### testing molecular dynamics simulation of water
+
+# perform test with PoolWorkers using molecuilder_poolworker
+AT_SETUP([Integration - molecular dynamics of water])
+AT_KEYWORDS([molecular dynamics water])
+
+# check that ports are unique over all tests such that they may run in parallel
+WORKERPORT=12110
+CONTROLLERPORT=12111
+WORKERLISTENPORT=12112
+
+# start service in background
+${AUTOTEST_PATH}/molecuilder_server --workerport $WORKERPORT --controllerport $CONTROLLERPORT --timeout 3 &
+server_pid=$!
+AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([kill -s 0 $server_pid], 0, [ignore], [ignore], [kill $server_pid])
+
+# enlist a worker to work on jobs
+../../molecuilder_poolworker -v 5 --server 127.0.0.1:${WORKERPORT} --hostname 127.0.0.1 --listen $WORKERLISTENPORT &
+worker_script_pid=$!
+worker_pid=`ps -ef | grep molecuilder_poolworker | grep $worker_script_pid | awk '{print $2}'`
+AT_CHECK([sleep 2], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([kill -s 0 $worker_pid], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
+
+# create jobs via molecuilder
+molfile="water.pdb"
+outputfile="water.data"
+AT_CHECK([cp -f ${abs_top_srcdir}/tests/integration/MolecularDynamics/pre/$molfile $molfile], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
+AT_CHECK([chmod +rw $molfile], 0)
+AT_CHECK([../../molecuilder \
+	-i $molfile \
+	-o tremolo \
+	--set-tremolo-atomdata "Id type x=3 u=3 F=3 neighbors=2" \
+	--select-all-atoms \
+	--center-in-box "10,0,10,0,0,10" \
+	--set-boundary-conditions Wrap Wrap Wrap \
+	--update-molecules \
+	--set-parser-parameters mpqc \
+		--parser-parameters "theory=CLHF;basis=3-21G;" \
+	--molecular-dynamics \
+		--keep-bondgraph 1 \
+		--parse-state-files 0 \
+		--deltat 0.5 \
+		--steps 30 \
+		--order 1 \
+		--grid-level 4 \
+		--server-address 127.0.0.1 \
+		--server-port ${CONTROLLERPORT} \
+		--DoLongrange 0], 0, [ignore], [ignore], [kill $server_pid $worker_pid])
+
+# send removeall to server such that all workers shutdown
+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])
+
+# 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
+AT_CHECK([sleep 1], 0, [ignore], [ignore], [kill $server_pid])
+AT_CHECK([kill $server_pid], 1, [ignore], [ignore])
+
+# check forces at initial two steps
+lines=`echo "2+3+1+3" | bc`
+AT_CHECK([head -n $lines $outputfile | diff - ${abs_top_srcdir}/tests/integration/MolecularDynamics/post/water_initial_steps.data], 0)
+
+# check average temperature
+tempfile="water.ekin"
+AT_CHECK([../../molecuilder \
+	-i $outputfile \
+	--select-all-atoms \
+	--save-temperature $tempfile], 0, [ignore], [ignore])
+AT_CHECK([diff $tempfile ${abs_top_srcdir}/tests/integration/MolecularDynamics/post/$tempfile], 0)
+
+AT_CLEANUP
Index: tests/integration/MolecularDynamics/testsuite-integration-moleculardynamics.at
===================================================================
--- tests/integration/MolecularDynamics/testsuite-integration-moleculardynamics.at	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
+++ tests/integration/MolecularDynamics/testsuite-integration-moleculardynamics.at	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
@@ -0,0 +1,22 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2017 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 - molecular dynamics integration])
+
+# testing molecular dynamics simulation of water
+m4_include([MolecularDynamics/testsuite-integration-moleculardynamics-water.at])
+
Index: tests/integration/testsuite-integration.at
===================================================================
--- tests/integration/testsuite-integration.at	(revision 9346af502d49654ce8d98f6cb1f296a98b095731)
+++ tests/integration/testsuite-integration.at	(revision 3bd4a6697ef35dcf04289447c2e8ab470fdd26cd)
@@ -20,2 +20,5 @@
 # check integration of fragment jobs energy calculation
 m4_include([FragmentJobs/testsuite-integration-fragmentjobs.at])
+
+# check integration of molecular dynamics
+m4_include([MolecularDynamics/testsuite-integration-moleculardynamics.at])
