Index: tests/regression/Molecules/BondFile/testsuite-molecules-bond-file.at
===================================================================
--- tests/regression/Molecules/BondFile/testsuite-molecules-bond-file.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ 	(revision )
@@ -1,26 +1,0 @@
-### Bonds from file
-
-AT_SETUP([Molecules - Fragmentation bonds file])
-AT_KEYWORDS([Molecules])
-
-file=test.conf
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.conf $file], 0)
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.dbond .], 0)
-AT_CHECK([../../molecuilder -i $file -o pdb -v 4 --select-molecule-by-id 0 -A test.dbond --skiplines 1 --offset 0], 0, [stdout], [stderr])
-AT_CHECK([file=test.pdb; diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/post/test.pdb], 0, [ignore], [ignore])
-
-AT_CLEANUP
-
-
-AT_SETUP([Molecules - TREMOLO dbond file])
-AT_KEYWORDS([Molecules])
-
-file=silica.pov1.0000.pdb
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.pov1.0000.pdb $file], 0)
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.dbond.0000 .], 0)
-AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder -i $file -v 4 --select-molecule-by-id 0 -A silica.dbond.0000 --skiplines 2 --offset 1], 0, [stdout], [stderr])
-AT_CHECK([fgrep -c "CONECT 7153 6098 5949 5922" $file], 0, [1
-], [ignore])
-
-AT_CLEANUP
Index: tests/regression/Molecules/BondFile/testsuite-molecules-fragmentation-bond-file.at
===================================================================
--- tests/regression/Molecules/BondFile/testsuite-molecules-fragmentation-bond-file.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
+++ tests/regression/Molecules/BondFile/testsuite-molecules-fragmentation-bond-file.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -0,0 +1,39 @@
+### Bonds from file
+
+AT_SETUP([Molecules - Fragmentation bonds file])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.conf $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.dbond .], 0)
+AT_CHECK([../../molecuilder -i $file -o pdb -v 4 --select-molecule-by-id 0 -A test.dbond --skiplines 1 --offset 0], 0, [stdout], [stderr])
+AT_CHECK([file=test.pdb; diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/post/test.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Fragmentation bonds file with Undo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.conf $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.dbond .], 0)
+AT_CHECK([../../molecuilder -i $file -o pdb -v 4 --select-molecule-by-id 0 -A test.dbond --skiplines 1 --offset 0 --undo], 0, [stdout], [stderr])
+AT_CHECK([file=test.pdb; diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/post/test.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Fragmentation bonds file with Redo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.conf $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/test.dbond .], 0)
+AT_CHECK([../../molecuilder -i $file -o pdb -v 4 --select-molecule-by-id 0 -A test.dbond --skiplines 1 --offset 0 --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([file=test.pdb; diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/post/test.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
Index: tests/regression/Molecules/BondFile/testsuite-molecules-tremolo-dbond-file.at
===================================================================
--- tests/regression/Molecules/BondFile/testsuite-molecules-tremolo-dbond-file.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
+++ tests/regression/Molecules/BondFile/testsuite-molecules-tremolo-dbond-file.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -0,0 +1,44 @@
+### Bonds from file
+
+AT_SETUP([Molecules - TREMOLO dbond file])
+AT_KEYWORDS([Molecules])
+
+file=silica.pov1.0000.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.pov1.0000.pdb $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.dbond.0000 .], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 4 --select-molecule-by-id 0 -A silica.dbond.0000 --skiplines 2 --offset 1], 0, [stdout], [stderr])
+AT_CHECK([fgrep -c "CONECT 7153 6098 5949 5922" $file], 0, [1
+], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - TREMOLO dbond file with Undo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=silica.pov1.0000.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.pov1.0000.pdb $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.dbond.0000 .], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 4 --select-molecule-by-id 0 -A silica.dbond.0000 --skiplines 2 --offset 1 --undo], 0, [stdout], [stderr])
+AT_CHECK([fgrep -c "CONECT 7153 6098 5949 5922" $file], 0, [1
+], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - TREMOLO dbond file with Redo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=silica.pov1.0000.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.pov1.0000.pdb $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/BondFile/pre/silica.dbond.0000 .], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 4 --select-molecule-by-id 0 -A silica.dbond.0000 --skiplines 2 --offset 1 --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([fgrep -c "CONECT 7153 6098 5949 5922" $file], 0, [1
+], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/Copy/post/tensid-undo.data
===================================================================
--- tests/regression/Molecules/Copy/post/tensid-undo.data	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
+++ tests/regression/Molecules/Copy/post/tensid-undo.data	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -0,0 +1,58 @@
+# ATOMDATA	Id	name	resName	chainID	x=3	type	neighbors=4	charge
+1	NA	SLES	1	32.397	35.231	26.737	NA	0	0	0	0	1.000000e+00	
+2	S	SLES	1	31.282	33.88	29.208	SL	3	4	5	6	1.330000e+00	
+3	OS1	SLES	1	30.788	33.072	28.08	OSL	2	7	0	0	-2.800000e-01	
+4	OS2	SLES	1	30.674	35.071	28.658	O2L	2	0	0	0	-6.500000e-01	
+5	OS3	SLES	1	32.652	33.652	28.81	O2L	2	0	0	0	-6.500000e-01	
+6	OS4	SLES	1	30.761	33.284	30.406	O2L	2	0	0	0	-6.500000e-01	
+7	C2	SLES	1	30.018	31.938	28.128	CC32A	3	8	9	10	-1.100000e-01	
+8	H2A	SLES	1	29.033	32.147	28.623	HCA2	7	0	0	0	9.000000e-02	
+9	H2B	SLES	1	30.55	31.115	28.675	HCA2	7	0	0	0	9.000000e-02	
+10	C1	SLES	1	29.84	31.605	26.631	CC32A	7	11	12	13	-1.000000e-02	
+11	H1B	SLES	1	29.337	32.448	26.09	HCA2	10	0	0	0	9.000000e-02	
+12	H1A	SLES	1	30.828	31.408	26.147	HCA2	10	0	0	0	9.000000e-02	
+13	O1	SLES	1	29.087	30.49	26.279	OC30A	10	14	0	0	-3.400000e-01	
+14	C2	SLES	1	28.503	29.727	27.319	CC32A	13	15	16	17	-1.000000e-02	
+15	H2A	SLES	1	27.804	30.366	27.931	HCA2	14	0	0	0	9.000000e-02	
+16	H2B	SLES	1	29.281	29.306	27.998	HCA2	14	0	0	0	9.000000e-02	
+17	C1	SLES	1	27.786	28.897	26.193	CC32A	14	18	19	20	-1.000000e-02	
+18	H1B	SLES	1	26.806	29.197	26.587	HCA2	17	0	0	0	9.000000e-02	
+19	H1A	SLES	1	28.461	28.076	26.632	HCA2	17	0	0	0	9.000000e-02	
+20	O1	SLES	1	27.309	27.793	25.468	OC30A	17	21	0	0	-3.400000e-01	
+21	C1	SLES	1	26.479	26.857	26.141	CTL2	20	22	23	24	-1.800000e-01	
+22	H11	SLES	1	25.639	27.291	26.752	HAL2	21	0	0	0	9.000000e-02	
+23	H12	SLES	1	27.089	26.219	26.829	HAL2	21	0	0	0	9.000000e-02	
+24	C2	SLES	1	25.959	26.079	24.933	CTL2	21	25	26	27	-1.800000e-01	
+25	H21	SLES	1	25.299	26.683	24.265	HAL2	24	0	0	0	9.000000e-02	
+26	H22	SLES	1	26.775	25.623	24.321	HAL2	24	0	0	0	9.000000e-02	
+27	C3	SLES	1	25.166	25	25.552	CTL2	24	28	29	30	-1.800000e-01	
+28	H31	SLES	1	24.374	25.53	26.148	HAL2	27	0	0	0	9.000000e-02	
+29	H32	SLES	1	25.893	24.446	26.208	HAL2	27	0	0	0	9.000000e-02	
+30	C4	SLES	1	24.47	23.973	24.719	CTL2	27	31	32	33	-1.800000e-01	
+31	H41	SLES	1	23.721	24.443	24.035	HAL2	30	0	0	0	9.000000e-02	
+32	H42	SLES	1	25.193	23.397	24.095	HAL2	30	0	0	0	9.000000e-02	
+33	C5	SLES	1	23.845	23.159	25.86	CTL2	30	34	35	36	-1.800000e-01	
+34	H51	SLES	1	23.187	23.811	26.494	HAL2	33	0	0	0	9.000000e-02	
+35	H52	SLES	1	24.641	22.777	26.552	HAL2	33	0	0	0	9.000000e-02	
+36	C6	SLES	1	23.033	21.996	25.484	CTL2	33	37	38	39	-1.800000e-01	
+37	H61	SLES	1	22.025	22.151	25.956	HAL2	36	0	0	0	9.000000e-02	
+38	H62	SLES	1	23.483	21.114	26.014	HAL2	36	0	0	0	9.000000e-02	
+39	C7	SLES	1	22.888	21.707	23.985	CTL2	36	40	41	42	-1.800000e-01	
+40	H71	SLES	1	22.373	22.516	23.415	HAL2	39	0	0	0	9.000000e-02	
+41	H72	SLES	1	23.849	21.466	23.474	HAL2	39	0	0	0	9.000000e-02	
+42	C8	SLES	1	22.025	20.5	24.062	CTL2	39	43	44	45	-1.800000e-01	
+43	H81	SLES	1	21.09	20.813	24.606	HAL2	42	0	0	0	9.000000e-02	
+44	H82	SLES	1	22.598	19.741	24.667	HAL2	42	0	0	0	9.000000e-02	
+45	C9	SLES	1	21.583	19.808	22.82	CTL2	42	46	47	48	-1.800000e-01	
+46	H91	SLES	1	20.987	20.501	22.185	HAL2	45	0	0	0	9.000000e-02	
+47	H92	SLES	1	22.466	19.449	22.245	HAL2	45	0	0	0	9.000000e-02	
+48	C10	SLES	1	20.753	18.675	23.42	CTL2	45	49	50	51	-1.800000e-01	
+49	H10	SLES	1	19.924	19.1	24.048	HAL2	48	0	0	0	9.000000e-02	
+50	H10	SLES	1	21.392	18.056	24.107	HAL2	48	0	0	0	9.000000e-02	
+51	C11	SLES	1	20.134	17.748	22.425	CTL2	48	52	53	54	-1.800000e-01	
+52	H11	SLES	1	19.484	18.362	21.759	HAL2	51	0	0	0	9.000000e-02	
+53	H11	SLES	1	20.961	17.312	21.818	HAL2	51	0	0	0	9.000000e-02	
+54	C12	SLES	1	19.337	16.67	23.165	CTL3	51	55	56	57	-2.700000e-01	
+55	H12	SLES	1	18.268	16.727	22.882	HAL3	54	0	0	0	9.000000e-02	
+56	H12	SLES	1	19.755	15.669	22.942	HAL3	54	0	0	0	9.000000e-02	
+57	H12	SLES	1	19.381	16.794	24.275	HAL3	54	0	0	0	9.000000e-02	
Index: tests/regression/Molecules/Copy/post/test-undo.xyz
===================================================================
--- tests/regression/Molecules/Copy/post/test-undo.xyz	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
+++ tests/regression/Molecules/Copy/post/test-undo.xyz	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -0,0 +1,13 @@
+11
+	Created by molecuilder on Fri Aug  6 15:40:35 2010
+H	9.78209	2.64589	2.64589
+H	9.78209	2.64589	4.42589
+H	10.672	3.90454	3.53589
+H	8.53279	4.78789	2.64589
+H	8.53279	4.78789	4.42589
+H	6.39363	3.90454	3.53589
+H	7.28359	2.64589	2.64589
+H	7.28359	2.64589	4.42589
+C	9.78209	3.27519	3.53589
+C	8.53279	4.15859	3.53589
+C	7.28359	3.27519	3.53589
Index: tests/regression/Molecules/Copy/testsuite-molecules-copy-molecule.at
===================================================================
--- tests/regression/Molecules/Copy/testsuite-molecules-copy-molecule.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/Copy/testsuite-molecules-copy-molecule.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -1,5 +1,5 @@
 ### copy molecule
 
-AT_SETUP([Molecules - Copy molecule with Undo/Redo])
+AT_SETUP([Molecules - Copy molecule])
 AT_KEYWORDS([Molecules])
 
@@ -10,9 +10,35 @@
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/post/test-copy.xyz], 0, [ignore], [ignore])
 
+file=tensid.data
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/pre/tensid.data $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/pre/tensid.potentials .], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --copy-molecule 0 --position "0,0,10"], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/post/tensid.data], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Copy molecule with Undo])
+AT_KEYWORDS([Molecules])
+
 file=test-copy.xyz
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/pre/test.xyz $file], 0)
 AT_CHECK([chmod u+w $file], 0)
 AT_CHECK([../../molecuilder -i $file  --copy-molecule 0 --position "0,0,10" --undo], 0, [stdout], [stderr])
-AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/pre/test.xyz], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/post/test-undo.xyz], 0, [ignore], [ignore])
+
+file=tensid.data
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/pre/tensid.data $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/pre/tensid.potentials .], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --copy-molecule 0 --position "0,0,10" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/post/tensid-undo.data], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Copy molecule with Redo])
+AT_KEYWORDS([Molecules])
 
 file=test-copy.xyz
@@ -26,5 +52,5 @@
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/pre/tensid.potentials .], 0)
 AT_CHECK([chmod u+w $file], 0)
-AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --copy-molecule 0 --position "0,0,10"], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --copy-molecule 0 --position "0,0,10" --undo --redo], 0, [stdout], [stderr])
 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Copy/post/tensid.data], 0, [ignore], [ignore])
 
Index: tests/regression/Molecules/RotateAroundOrigin/testsuite-molecules-rotate-around-origin.at
===================================================================
--- tests/regression/Molecules/RotateAroundOrigin/testsuite-molecules-rotate-around-origin.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/RotateAroundOrigin/testsuite-molecules-rotate-around-origin.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -30,2 +30,63 @@
 
 AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate around origin with Undo])
+AT_KEYWORDS([Molecules])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 90. --position "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 180. --position "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 360. --position "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 20. --position "1,2,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate around origin with Redo])
+AT_KEYWORDS([Molecules])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 90. --position "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/post/test-rotated-z90.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 180. --position "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/post/test-rotated-z180.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 360. --position "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/post/test-rotated-z360.xyz], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms --rotate-around-origin 20. --position "1,2,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundOrigin/post/test-rotated-xYz20.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/RotateAroundSelf/testsuite-molecules-rotate-around-self.at
===================================================================
--- tests/regression/Molecules/RotateAroundSelf/testsuite-molecules-rotate-around-self.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/RotateAroundSelf/testsuite-molecules-rotate-around-self.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -30,2 +30,63 @@
 
 AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate around self with Undo])
+AT_KEYWORDS([Molecules])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 90. --axis "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 180. --axis "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 360. --axis "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 20. --axis "1,2,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate around self with Redo])
+AT_KEYWORDS([Molecules])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 90. --axis "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/post/test-rotated-z90.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 180. --axis "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/post/test-rotated-z180.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 360. --axis "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/post/test-rotated-z360.xyz], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-molecules --rotate-around-self 20. --axis "1,2,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateAroundSelf/post/test-rotated-xYz20.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at
===================================================================
--- tests/regression/Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -29,2 +29,64 @@
 
 AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate to PAS with Undo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=test-rotated-z90.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z90.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 -m "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z90.xyz], 0, [ignore], [ignore])
+
+file=test-rotated-z180.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z180.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 -m "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z180.xyz], 0, [ignore], [ignore])
+
+file=test-rotated-z360.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z360.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 -m "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z360.xyz], 0, [ignore], [ignore])
+
+file=test-rotated-xYz20.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-xYz20.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-molecule-by-id 0 -m "0,0,1" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-xYz20.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Rotate to PAS with Redo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=test-rotated-z90.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z90.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 -m "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/post/test-rotated-z90.xyz], 0, [ignore], [ignore])
+
+file=test-rotated-z180.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z180.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 -m "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/post/test-rotated-z180.xyz], 0, [ignore], [ignore])
+
+file=test-rotated-z360.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-z360.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 -m "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/post/test-rotated-z360.xyz], 0, [ignore], [ignore])
+
+file=test-rotated-xYz20.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/pre/test-rotated-xYz20.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-molecule-by-id 0 -m "0,0,1" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/RotateToPrincipalAxisSystem/post/test-rotated-xYz20.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/Translation-Periodic/post/test-undo.conf
===================================================================
--- tests/regression/Molecules/Translation-Periodic/post/test-undo.conf	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
+++ tests/regression/Molecules/Translation-Periodic/post/test-undo.conf	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -0,0 +1,83 @@
+# ParallelCarParinello - main configuration file - created with molecuilder
+
+mainname	pcp	# programm name (for runtime files)
+defaultpath	not specified	# where to put files during runtime
+pseudopotpath	not specified	# where to find pseudopotentials
+
+ProcPEGamma	8	# for parallel computing: share constants
+ProcPEPsi	1	# for parallel computing: share wave functions
+DoOutVis	0	# Output data for OpenDX
+DoOutMes	1	# Output data for measurements
+DoOutOrbitals	0	# Output all Orbitals
+DoOutCurr	0	# Ouput current density for OpenDx
+DoOutNICS	0	# Output Nucleus independent current shieldings
+DoPerturbation	0	# Do perturbation calculate and determine susceptibility and shielding
+DoFullCurrent	0	# Do full perturbation
+DoConstrainedMD	0	# Do perform a constrained (>0, relating to current MD step) instead of unconstrained (0) MD
+Thermostat	Berendsen	2.5	# Which Thermostat and its parameters to use in MD case.
+CommonWannier	0	# Put virtual centers at indivual orbits, all common, merged by variance, to grid point, to cell center
+SawtoothStart	0.01	# Absolute value for smooth transition at cell border 
+VectorPlane	0	# Cut plane axis (x, y or z: 0,1,2) for two-dim current vector plot
+VectorCut	0	# Cut plane axis value
+AddGramSch	1	# Additional GramSchmidtOrtogonalization to be safe
+Seed		1	# initial value for random seed for Psi coefficients
+
+MaxOuterStep	0	# number of MolecularDynamics/Structure optimization steps
+Deltat	0.01	# time per MD step
+OutVisStep	10	# Output visual data every ...th step
+OutSrcStep	5	# Output "restart" data every ..th step
+TargetTemp	0.000950045	# Target temperature
+MaxPsiStep	3	# number of Minimisation steps per state (0 - default)
+EpsWannier	1e-07	# tolerance value for spread minimisation of orbitals
+
+# Values specifying when to stop
+MaxMinStep	100	# Maximum number of steps
+RelEpsTotalE	1e-07	# relative change in total energy
+RelEpsKineticE	1e-05	# relative change in kinetic energy
+MaxMinStopStep	10	# check every ..th steps
+MaxMinGapStopStep	1	# check every ..th steps
+
+# Values specifying when to stop for INIT, otherwise same as above
+MaxInitMinStep	100	# Maximum number of steps
+InitRelEpsTotalE	1e-05	# relative change in total energy
+InitRelEpsKineticE	0.0001	# relative change in kinetic energy
+InitMaxMinStopStep	10	# check every ..th steps
+InitMaxMinGapStopStep	1	# check every ..th steps
+
+BoxLength			# (Length of a unit cell)
+20	
+0	20	
+0	0	20	
+
+ECut		128	# energy cutoff for discretization in Hartrees
+MaxLevel	5	# number of different levels in the code, >=2
+Level0Factor	2	# factor by which node number increases from S to 0 level
+RiemannTensor	0	# (Use metric)
+PsiType		0	# 0 - doubly occupied, 1 - SpinUp,SpinDown
+MaxPsiDouble	10	# here: specifying both maximum number of SpinUp- and -Down-states
+PsiMaxNoUp	10	# here: specifying maximum number of SpinUp-states
+PsiMaxNoDown	10	# here: specifying maximum number of SpinDown-states
+AddPsis		0	# Additional unoccupied Psis for bandgap determination
+
+RCut		20	# R-cut for the ewald summation
+StructOpt	0	# Do structure optimization beforehand
+IsAngstroem	1	# 0 - Bohr, 1 - Angstroem
+RelativeCoord	0	# whether ion coordinates are relative (1) or absolute (0)
+MaxTypes	2	# maximum number of different ion types
+
+# Ion type data (PP = PseudoPotential, Z = atomic number)
+#Ion_TypeNr.	Amount	Z	RGauss	L_Max(PP)L_Loc(PP)IonMass	# chemical name, symbol
+Ion_Type1	8	1	1.0	3	3	1.00800000000	Hydrogen	H
+Ion_Type2	3	6	1.0	3	3	12.01100000000	Carbon	C
+#Ion_TypeNr._Nr.R[0]    R[1]    R[2]    MoveType (0 MoveIon, 1 FixedIon)
+Ion_Type1_1	9.782085945	2.645886050	2.645886050	0 # molecule nr 0
+Ion_Type1_2	9.782085945	2.645886050	4.425886024	0 # molecule nr 1
+Ion_Type1_3	10.672039608	3.904536878	3.535886037	0 # molecule nr 2
+Ion_Type1_4	8.532785963	4.787886018	2.645886050	0 # molecule nr 3
+Ion_Type1_5	8.532785963	4.787886018	4.425886024	0 # molecule nr 4
+Ion_Type1_6	6.393632318	3.904536877	3.535886037	0 # molecule nr 5
+Ion_Type1_7	7.283585982	2.645886050	2.645886050	0 # molecule nr 6
+Ion_Type1_8	7.283585982	2.645886050	4.425886024	0 # molecule nr 7
+Ion_Type2_1	9.782085945	3.275186040	3.535886037	0 # molecule nr 8
+Ion_Type2_2	8.532785963	4.158586027	3.535886037	0 # molecule nr 9
+Ion_Type2_3	7.283585982	3.275186040	3.535886037	0 # molecule nr 10
Index: tests/regression/Molecules/Translation-Periodic/testsuite-molecules-translation-periodic.at
===================================================================
--- tests/regression/Molecules/Translation-Periodic/testsuite-molecules-translation-periodic.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/Translation-Periodic/testsuite-molecules-translation-periodic.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -11,2 +11,26 @@
 
 AT_CLEANUP
+
+
+AT_SETUP([Molecules - Translation with periodic boundaries with Undo])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation-Periodic/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-molecule-by-id 0 --select-molecules-atoms -t "-8., -8., -8." --periodic 1 --undo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation-Periodic/post/test-undo.conf], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Translation with periodic boundaries with Redo])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation-Periodic/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-molecule-by-id 0 --select-molecules-atoms -t "-8., -8., -8." --periodic 1 --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation-Periodic/post/test.conf], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/Translation/post/test-undo.conf
===================================================================
--- tests/regression/Molecules/Translation/post/test-undo.conf	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
+++ tests/regression/Molecules/Translation/post/test-undo.conf	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -0,0 +1,83 @@
+# ParallelCarParinello - main configuration file - created with molecuilder
+
+mainname	pcp	# programm name (for runtime files)
+defaultpath	not specified	# where to put files during runtime
+pseudopotpath	not specified	# where to find pseudopotentials
+
+ProcPEGamma	8	# for parallel computing: share constants
+ProcPEPsi	1	# for parallel computing: share wave functions
+DoOutVis	0	# Output data for OpenDX
+DoOutMes	1	# Output data for measurements
+DoOutOrbitals	0	# Output all Orbitals
+DoOutCurr	0	# Ouput current density for OpenDx
+DoOutNICS	0	# Output Nucleus independent current shieldings
+DoPerturbation	0	# Do perturbation calculate and determine susceptibility and shielding
+DoFullCurrent	0	# Do full perturbation
+DoConstrainedMD	0	# Do perform a constrained (>0, relating to current MD step) instead of unconstrained (0) MD
+Thermostat	Berendsen	2.5	# Which Thermostat and its parameters to use in MD case.
+CommonWannier	0	# Put virtual centers at indivual orbits, all common, merged by variance, to grid point, to cell center
+SawtoothStart	0.01	# Absolute value for smooth transition at cell border 
+VectorPlane	0	# Cut plane axis (x, y or z: 0,1,2) for two-dim current vector plot
+VectorCut	0	# Cut plane axis value
+AddGramSch	1	# Additional GramSchmidtOrtogonalization to be safe
+Seed		1	# initial value for random seed for Psi coefficients
+
+MaxOuterStep	0	# number of MolecularDynamics/Structure optimization steps
+Deltat	0.01	# time per MD step
+OutVisStep	10	# Output visual data every ...th step
+OutSrcStep	5	# Output "restart" data every ..th step
+TargetTemp	0.000950045	# Target temperature
+MaxPsiStep	3	# number of Minimisation steps per state (0 - default)
+EpsWannier	1e-07	# tolerance value for spread minimisation of orbitals
+
+# Values specifying when to stop
+MaxMinStep	100	# Maximum number of steps
+RelEpsTotalE	1e-07	# relative change in total energy
+RelEpsKineticE	1e-05	# relative change in kinetic energy
+MaxMinStopStep	10	# check every ..th steps
+MaxMinGapStopStep	1	# check every ..th steps
+
+# Values specifying when to stop for INIT, otherwise same as above
+MaxInitMinStep	100	# Maximum number of steps
+InitRelEpsTotalE	1e-05	# relative change in total energy
+InitRelEpsKineticE	0.0001	# relative change in kinetic energy
+InitMaxMinStopStep	10	# check every ..th steps
+InitMaxMinGapStopStep	1	# check every ..th steps
+
+BoxLength			# (Length of a unit cell)
+20	
+0	20	
+0	0	20	
+
+ECut		128	# energy cutoff for discretization in Hartrees
+MaxLevel	5	# number of different levels in the code, >=2
+Level0Factor	2	# factor by which node number increases from S to 0 level
+RiemannTensor	0	# (Use metric)
+PsiType		0	# 0 - doubly occupied, 1 - SpinUp,SpinDown
+MaxPsiDouble	10	# here: specifying both maximum number of SpinUp- and -Down-states
+PsiMaxNoUp	10	# here: specifying maximum number of SpinUp-states
+PsiMaxNoDown	10	# here: specifying maximum number of SpinDown-states
+AddPsis		0	# Additional unoccupied Psis for bandgap determination
+
+RCut		20	# R-cut for the ewald summation
+StructOpt	0	# Do structure optimization beforehand
+IsAngstroem	1	# 0 - Bohr, 1 - Angstroem
+RelativeCoord	0	# whether ion coordinates are relative (1) or absolute (0)
+MaxTypes	2	# maximum number of different ion types
+
+# Ion type data (PP = PseudoPotential, Z = atomic number)
+#Ion_TypeNr.	Amount	Z	RGauss	L_Max(PP)L_Loc(PP)IonMass	# chemical name, symbol
+Ion_Type1	8	1	1.0	3	3	1.00800000000	Hydrogen	H
+Ion_Type2	3	6	1.0	3	3	12.01100000000	Carbon	C
+#Ion_TypeNr._Nr.R[0]    R[1]    R[2]    MoveType (0 MoveIon, 1 FixedIon)
+Ion_Type1_1	9.782085945	2.645886050	2.645886050	0 # molecule nr 0
+Ion_Type1_2	9.782085945	2.645886050	4.425886024	0 # molecule nr 1
+Ion_Type1_3	10.672039608	3.904536878	3.535886037	0 # molecule nr 2
+Ion_Type1_4	8.532785963	4.787886018	2.645886050	0 # molecule nr 3
+Ion_Type1_5	8.532785963	4.787886018	4.425886024	0 # molecule nr 4
+Ion_Type1_6	6.393632318	3.904536877	3.535886037	0 # molecule nr 5
+Ion_Type1_7	7.283585982	2.645886050	2.645886050	0 # molecule nr 6
+Ion_Type1_8	7.283585982	2.645886050	4.425886024	0 # molecule nr 7
+Ion_Type2_1	9.782085945	3.275186040	3.535886037	0 # molecule nr 8
+Ion_Type2_2	8.532785963	4.158586027	3.535886037	0 # molecule nr 9
+Ion_Type2_3	7.283585982	3.275186040	3.535886037	0 # molecule nr 10
Index: tests/regression/Molecules/Translation/post/test2-undo.conf
===================================================================
--- tests/regression/Molecules/Translation/post/test2-undo.conf	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
+++ tests/regression/Molecules/Translation/post/test2-undo.conf	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -0,0 +1,83 @@
+# ParallelCarParinello - main configuration file - created with molecuilder
+
+mainname	pcp	# programm name (for runtime files)
+defaultpath	not specified	# where to put files during runtime
+pseudopotpath	not specified	# where to find pseudopotentials
+
+ProcPEGamma	8	# for parallel computing: share constants
+ProcPEPsi	1	# for parallel computing: share wave functions
+DoOutVis	0	# Output data for OpenDX
+DoOutMes	1	# Output data for measurements
+DoOutOrbitals	0	# Output all Orbitals
+DoOutCurr	0	# Ouput current density for OpenDx
+DoOutNICS	0	# Output Nucleus independent current shieldings
+DoPerturbation	0	# Do perturbation calculate and determine susceptibility and shielding
+DoFullCurrent	0	# Do full perturbation
+DoConstrainedMD	0	# Do perform a constrained (>0, relating to current MD step) instead of unconstrained (0) MD
+Thermostat	Berendsen	2.5	# Which Thermostat and its parameters to use in MD case.
+CommonWannier	0	# Put virtual centers at indivual orbits, all common, merged by variance, to grid point, to cell center
+SawtoothStart	0.01	# Absolute value for smooth transition at cell border 
+VectorPlane	0	# Cut plane axis (x, y or z: 0,1,2) for two-dim current vector plot
+VectorCut	0	# Cut plane axis value
+AddGramSch	1	# Additional GramSchmidtOrtogonalization to be safe
+Seed		1	# initial value for random seed for Psi coefficients
+
+MaxOuterStep	0	# number of MolecularDynamics/Structure optimization steps
+Deltat	0.01	# time per MD step
+OutVisStep	10	# Output visual data every ...th step
+OutSrcStep	5	# Output "restart" data every ..th step
+TargetTemp	0.000950045	# Target temperature
+MaxPsiStep	3	# number of Minimisation steps per state (0 - default)
+EpsWannier	1e-07	# tolerance value for spread minimisation of orbitals
+
+# Values specifying when to stop
+MaxMinStep	100	# Maximum number of steps
+RelEpsTotalE	1e-07	# relative change in total energy
+RelEpsKineticE	1e-05	# relative change in kinetic energy
+MaxMinStopStep	10	# check every ..th steps
+MaxMinGapStopStep	1	# check every ..th steps
+
+# Values specifying when to stop for INIT, otherwise same as above
+MaxInitMinStep	100	# Maximum number of steps
+InitRelEpsTotalE	1e-05	# relative change in total energy
+InitRelEpsKineticE	0.0001	# relative change in kinetic energy
+InitMaxMinStopStep	10	# check every ..th steps
+InitMaxMinGapStopStep	1	# check every ..th steps
+
+BoxLength			# (Length of a unit cell)
+20	
+0	20	
+0	0	20	
+
+ECut		128	# energy cutoff for discretization in Hartrees
+MaxLevel	5	# number of different levels in the code, >=2
+Level0Factor	2	# factor by which node number increases from S to 0 level
+RiemannTensor	0	# (Use metric)
+PsiType		0	# 0 - doubly occupied, 1 - SpinUp,SpinDown
+MaxPsiDouble	10	# here: specifying both maximum number of SpinUp- and -Down-states
+PsiMaxNoUp	10	# here: specifying maximum number of SpinUp-states
+PsiMaxNoDown	10	# here: specifying maximum number of SpinDown-states
+AddPsis		0	# Additional unoccupied Psis for bandgap determination
+
+RCut		20	# R-cut for the ewald summation
+StructOpt	0	# Do structure optimization beforehand
+IsAngstroem	1	# 0 - Bohr, 1 - Angstroem
+RelativeCoord	0	# whether ion coordinates are relative (1) or absolute (0)
+MaxTypes	2	# maximum number of different ion types
+
+# Ion type data (PP = PseudoPotential, Z = atomic number)
+#Ion_TypeNr.	Amount	Z	RGauss	L_Max(PP)L_Loc(PP)IonMass	# chemical name, symbol
+Ion_Type1	8	1	1.0	3	3	1.00800000000	Hydrogen	H
+Ion_Type2	3	6	1.0	3	3	12.01100000000	Carbon	C
+#Ion_TypeNr._Nr.R[0]    R[1]    R[2]    MoveType (0 MoveIon, 1 FixedIon)
+Ion_Type1_1	9.782085945	2.645886050	2.645886050	0 # molecule nr 0
+Ion_Type1_2	9.782085945	2.645886050	4.425886024	0 # molecule nr 1
+Ion_Type1_3	10.672039608	3.904536878	3.535886037	0 # molecule nr 2
+Ion_Type1_4	8.532785963	4.787886018	2.645886050	0 # molecule nr 3
+Ion_Type1_5	8.532785963	4.787886018	4.425886024	0 # molecule nr 4
+Ion_Type1_6	6.393632318	3.904536877	3.535886037	0 # molecule nr 5
+Ion_Type1_7	7.283585982	2.645886050	2.645886050	0 # molecule nr 6
+Ion_Type1_8	7.283585982	2.645886050	4.425886024	0 # molecule nr 7
+Ion_Type2_1	9.782085945	3.275186040	3.535886037	0 # molecule nr 8
+Ion_Type2_2	8.532785963	4.158586027	3.535886037	0 # molecule nr 9
+Ion_Type2_3	7.283585982	3.275186040	3.535886037	0 # molecule nr 10
Index: tests/regression/Molecules/Translation/testsuite-molecules-translation.at
===================================================================
--- tests/regression/Molecules/Translation/testsuite-molecules-translation.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/Translation/testsuite-molecules-translation.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -17,2 +17,38 @@
 
 AT_CLEANUP
+
+
+AT_SETUP([Molecules - Translation with Undo])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --select-molecules-atoms -t "1., 1., 1." --periodic 0 --undo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/post/test-undo.conf], 0, [ignore], [ignore])
+
+file=test2.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/pre/test2.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --select-molecules-atoms -t "-1., -1., -1." --periodic 0 --undo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/post/test2-undo.conf], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Translation with Redo])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/pre/test.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --select-molecules-atoms -t "1., 1., 1." --periodic 0 --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/post/test.conf], 0, [ignore], [ignore])
+
+file=test2.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/pre/test2.conf $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file --select-molecule-by-id 0 --select-molecules-atoms -t "-1., -1., -1." --periodic 0 --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/Translation/post/test2.conf], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/VerletIntegration/testsuite-molecules-verlet-integration.at
===================================================================
--- tests/regression/Molecules/VerletIntegration/testsuite-molecules-verlet-integration.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/VerletIntegration/testsuite-molecules-verlet-integration.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -12,2 +12,30 @@
 
 AT_CLEANUP
+
+
+AT_SETUP([Molecules - Verlet force integration with Undo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/VerletIntegration/pre/test.conf $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/VerletIntegration/pre/test.forces .], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms -P test.forces --MDSteps 1 --deltat 0.01 --keep-fixed-CenterOfMass 0 --undo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/VerletIntegration/post/test.conf], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Verlet force integration with Redo])
+AT_XFAIL_IF([/bin/true])
+AT_KEYWORDS([Molecules])
+
+file=test.conf
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/VerletIntegration/pre/test.conf $file], 0)
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/VerletIntegration/pre/test.forces .], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file  --select-all-atoms -P test.forces --MDSteps 1 --deltat 0.01 --keep-fixed-CenterOfMass 0 --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/VerletIntegration/post/test.conf], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/testsuite-molecules.at
===================================================================
--- tests/regression/Molecules/testsuite-molecules.at	(revision caeeb80840441e26c65bc21cf81c49717188c5b4)
+++ tests/regression/Molecules/testsuite-molecules.at	(revision e69c87634c601039ae61a1acb0b03fc6b7bddd17)
@@ -4,6 +4,9 @@
 m4_include([Molecules/SaveSelectedMolecules/testsuite-molecules-save-selected-molecules.at])
 
-# Bonds from file
-m4_include([Molecules/BondFile/testsuite-molecules-bond-file.at])
+# Bonds from tremolo dbond file
+m4_include([Molecules/BondFile/testsuite-molecules-tremolo-dbond-file.at])
+
+# Bonds from fragmentation bond file
+m4_include([Molecules/BondFile/testsuite-molecules-fragmentation-bond-file.at])
 
 # Storing adjacency info
