Index: tests/regression/Domain/RepeatBox/post/ec.data
===================================================================
--- tests/regression/Domain/RepeatBox/post/ec.data	(revision 9d613feab4e07d3a202706642be753fe3532e1b3)
+++ tests/regression/Domain/RepeatBox/post/ec.data	(revision 9d613feab4e07d3a202706642be753fe3532e1b3)
@@ -0,0 +1,81 @@
+# ATOMDATA	Id	type	x=3	u=3	neighbors=4
+1	O	7.36404	5	5.01	0	0	0	4	0	0	0	
+2	OS	5.50419	6.07129	5	0	0	0	4	5	0	0	
+3	OS	5.50419	3.92871	5.01	0	0	0	4	6	0	0	
+4	C	6.13037	5	5	0	0	0	1	2	3	0	
+5	CT	4.12159	5.74744	5.01	0	0	0	2	6	7	8	
+6	CT	4.12159	4.25256	5	0	0	0	3	5	9	10	
+7	H1	3.52075	6.15873	5.8045	0	0	0	5	0	0	0	
+8	H1	3.52075	6.15873	4.1955	0	0	0	5	0	0	0	
+9	H1	3.52075	3.84127	5.8045	0	0	0	6	0	0	0	
+10	H1	3.52075	3.84127	4.1955	0	0	0	6	0	0	0	
+11	O	7.36404	5	25.01	0	0	0	14	0	0	0	
+12	OS	5.50419	6.07129	25	0	0	0	14	15	0	0	
+13	OS	5.50419	3.92871	25.01	0	0	0	14	16	0	0	
+14	C	6.13037	5	25	0	0	0	11	12	13	0	
+15	CT	4.12159	5.74744	25.01	0	0	0	12	16	17	18	
+16	CT	4.12159	4.25256	25	0	0	0	13	15	19	20	
+17	H1	3.52075	6.15873	25.8045	0	0	0	15	0	0	0	
+18	H1	3.52075	6.15873	24.1955	0	0	0	15	0	0	0	
+19	H1	3.52075	3.84127	25.8045	0	0	0	16	0	0	0	
+20	H1	3.52075	3.84127	24.1955	0	0	0	16	0	0	0	
+21	O	7.36404	25	5.01	0	0	0	24	0	0	0	
+22	OS	5.50419	26.0713	5	0	0	0	24	25	0	0	
+23	OS	5.50419	23.9287	5.01	0	0	0	24	26	0	0	
+24	C	6.13037	25	5	0	0	0	21	22	23	0	
+25	CT	4.12159	25.7474	5.01	0	0	0	22	26	27	28	
+26	CT	4.12159	24.2526	5	0	0	0	23	25	29	30	
+27	H1	3.52075	26.1587	5.8045	0	0	0	25	0	0	0	
+28	H1	3.52075	26.1587	4.1955	0	0	0	25	0	0	0	
+29	H1	3.52075	23.8413	5.8045	0	0	0	26	0	0	0	
+30	H1	3.52075	23.8413	4.1955	0	0	0	26	0	0	0	
+31	O	7.36404	25	25.01	0	0	0	34	0	0	0	
+32	OS	5.50419	26.0713	25	0	0	0	34	35	0	0	
+33	OS	5.50419	23.9287	25.01	0	0	0	34	36	0	0	
+34	C	6.13037	25	25	0	0	0	31	32	33	0	
+35	CT	4.12159	25.7474	25.01	0	0	0	32	36	37	38	
+36	CT	4.12159	24.2526	25	0	0	0	33	35	39	40	
+37	H1	3.52075	26.1587	25.8045	0	0	0	35	0	0	0	
+38	H1	3.52075	26.1587	24.1955	0	0	0	35	0	0	0	
+39	H1	3.52075	23.8413	25.8045	0	0	0	36	0	0	0	
+40	H1	3.52075	23.8413	24.1955	0	0	0	36	0	0	0	
+41	O	27.364	5	5.01	0	0	0	44	0	0	0	
+42	OS	25.5042	6.07129	5	0	0	0	44	45	0	0	
+43	OS	25.5042	3.92871	5.01	0	0	0	44	46	0	0	
+44	C	26.1304	5	5	0	0	0	41	42	43	0	
+45	CT	24.1216	5.74744	5.01	0	0	0	42	46	47	48	
+46	CT	24.1216	4.25256	5	0	0	0	43	45	49	50	
+47	H1	23.5207	6.15873	5.8045	0	0	0	45	0	0	0	
+48	H1	23.5207	6.15873	4.1955	0	0	0	45	0	0	0	
+49	H1	23.5207	3.84127	5.8045	0	0	0	46	0	0	0	
+50	H1	23.5207	3.84127	4.1955	0	0	0	46	0	0	0	
+51	O	27.364	5	25.01	0	0	0	54	0	0	0	
+52	OS	25.5042	6.07129	25	0	0	0	54	55	0	0	
+53	OS	25.5042	3.92871	25.01	0	0	0	54	56	0	0	
+54	C	26.1304	5	25	0	0	0	51	52	53	0	
+55	CT	24.1216	5.74744	25.01	0	0	0	52	56	57	58	
+56	CT	24.1216	4.25256	25	0	0	0	53	55	59	60	
+57	H1	23.5207	6.15873	25.8045	0	0	0	55	0	0	0	
+58	H1	23.5207	6.15873	24.1955	0	0	0	55	0	0	0	
+59	H1	23.5207	3.84127	25.8045	0	0	0	56	0	0	0	
+60	H1	23.5207	3.84127	24.1955	0	0	0	56	0	0	0	
+61	O	27.364	25	5.01	0	0	0	64	0	0	0	
+62	OS	25.5042	26.0713	5	0	0	0	64	65	0	0	
+63	OS	25.5042	23.9287	5.01	0	0	0	64	66	0	0	
+64	C	26.1304	25	5	0	0	0	61	62	63	0	
+65	CT	24.1216	25.7474	5.01	0	0	0	62	66	67	68	
+66	CT	24.1216	24.2526	5	0	0	0	63	65	69	70	
+67	H1	23.5207	26.1587	5.8045	0	0	0	65	0	0	0	
+68	H1	23.5207	26.1587	4.1955	0	0	0	65	0	0	0	
+69	H1	23.5207	23.8413	5.8045	0	0	0	66	0	0	0	
+70	H1	23.5207	23.8413	4.1955	0	0	0	66	0	0	0	
+71	O	27.364	25	25.01	0	0	0	74	0	0	0	
+72	OS	25.5042	26.0713	25	0	0	0	74	75	0	0	
+73	OS	25.5042	23.9287	25.01	0	0	0	74	76	0	0	
+74	C	26.1304	25	25	0	0	0	71	72	73	0	
+75	CT	24.1216	25.7474	25.01	0	0	0	72	76	77	78	
+76	CT	24.1216	24.2526	25	0	0	0	73	75	79	80	
+77	H1	23.5207	26.1587	25.8045	0	0	0	75	0	0	0	
+78	H1	23.5207	26.1587	24.1955	0	0	0	75	0	0	0	
+79	H1	23.5207	23.8413	25.8045	0	0	0	76	0	0	0	
+80	H1	23.5207	23.8413	24.1955	0	0	0	76	0	0	0	
Index: tests/regression/Domain/RepeatBox/pre/ec.data
===================================================================
--- tests/regression/Domain/RepeatBox/pre/ec.data	(revision 9d613feab4e07d3a202706642be753fe3532e1b3)
+++ tests/regression/Domain/RepeatBox/pre/ec.data	(revision 9d613feab4e07d3a202706642be753fe3532e1b3)
@@ -0,0 +1,11 @@
+# ATOMDATA	Id	type	x=3	u=3	neighbors=4
+1	O	7.36404	5	5.01	0	0	0	4	0	0	0	
+2	OS	5.50419	6.07129	5	0	0	0	4	5	0	0	
+3	OS	5.50419	3.92871	5.01	0	0	0	4	6	0	0	
+4	C	6.13037	5	5	0	0	0	1	2	3	0	
+5	CT	4.12159	5.74744	5.01	0	0	0	2	6	7	8	
+6	CT	4.12159	4.25256	5	0	0	0	3	5	9	10	
+7	H1	3.52075	6.15873	5.8045	0	0	0	5	0	0	0	
+8	H1	3.52075	6.15873	4.1955	0	0	0	5	0	0	0	
+9	H1	3.52075	3.84127	5.8045	0	0	0	6	0	0	0	
+10	H1	3.52075	3.84127	4.1955	0	0	0	6	0	0	0	
Index: tests/regression/Domain/RepeatBox/pre/ec.potentials
===================================================================
--- tests/regression/Domain/RepeatBox/pre/ec.potentials	(revision 9d613feab4e07d3a202706642be753fe3532e1b3)
+++ tests/regression/Domain/RepeatBox/pre/ec.potentials	(revision 9d613feab4e07d3a202706642be753fe3532e1b3)
@@ -0,0 +1,89 @@
+particles	{
+	particle:	particle_type=O,	element_name=O,	sigma=2.96,	epsilon=0.21,	sigma14=2.96,	epsilon14=0.21,	mass=15.9994,	free=3,	charge=-0.6452;
+	particle:	particle_type=OS,	element_name=O,	sigma=3,	epsilon=0.17,	sigma14=3,	epsilon14=0.17,	mass=15.9994,	free=3,	charge=-0.4684;
+	particle:	particle_type=C,	element_name=C,	sigma=3.75,	epsilon=0.105,	sigma14=3.75,	epsilon14=0.105,	mass=12.0107,	free=3,	charge=1.0996;
+	particle:	particle_type=CT,	element_name=C,	sigma=3.5,	epsilon=0.066,	sigma14=3.5,	epsilon14=0.066,	mass=12.0107,	free=3,	charge=0.033;
+	particle:	particle_type=H1,	element_name=H,	sigma=2.5,	epsilon=0.03,	sigma14=2.5,	epsilon14=0.03,	mass=1.00794,	free=3,	charge=0.1041;
+	particle:	particle_type=Li,	element_name=Li,	sigma=1.46,	epsilon=0.191,	sigma14=1.46,	epsilon14=0.191,	mass=6.941,	free=3,	charge=1;
+	particle:	particle_type=B,	element_name=B,	sigma=3.581,	epsilon=0.0949,	sigma14=3.581,	epsilon14=0.0949,	mass=10.811,	free=3,	charge=0.9756;
+	particle:	particle_type=F,	element_name=F,	sigma=3,	epsilon=0.068,	sigma14=3,	epsilon14=0.068,	mass=18.9984,	free=3,	charge=-0.4939;
+	};
+bonds	{
+	bond:	particle_type1=C,	particle_type2=O,	bond_type=harmonic,	k_b=570,	r_0=1.229,	k=0,	e_0=0;
+	bond:	particle_type1=C,	particle_type2=OS,	bond_type=harmonic,	k_b=320,	r_0=1.41,	k=0,	e_0=0;
+	bond:	particle_type1=OS,	particle_type2=CT,	bond_type=harmonic,	k_b=320,	r_0=1.41,	k=0,	e_0=0;
+	bond:	particle_type1=CT,	particle_type2=H1,	bond_type=harmonic,	k_b=340,	r_0=1.09,	k=0,	e_0=0;
+	bond:	particle_type1=CT,	particle_type2=CT,	bond_type=harmonic,	k_b=310,	r_0=1.526,	k=0,	e_0=0;
+	bond:	particle_type1=B,	particle_type2=F,	bond_type=harmonic,	k_b=289.72,	r_0=1.39,	k=0,	e_0=0;
+	};
+angles	{
+	angle:	particle_type1=O,	particle_type2=C,	particle_type3=OS,	angle_type=harmonic,	k_th=80,	theta_0=126,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	angle:	particle_type1=CT,	particle_type2=OS,	particle_type3=C,	angle_type=harmonic,	k_th=60,	theta_0=109.5,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	angle:	particle_type1=CT,	particle_type2=CT,	particle_type3=H1,	angle_type=harmonic,	k_th=50,	theta_0=109.5,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	angle:	particle_type1=H1,	particle_type2=CT,	particle_type3=OS,	angle_type=harmonic,	k_th=50,	theta_0=109.5,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	angle:	particle_type1=CT,	particle_type2=CT,	particle_type3=OS,	angle_type=harmonic,	k_th=50,	theta_0=109.5,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	angle:	particle_type1=OS,	particle_type2=C,	particle_type3=OS,	angle_type=harmonic,	k_th=80,	theta_0=126,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	angle:	particle_type1=H1,	particle_type2=CT,	particle_type3=H1,	angle_type=harmonic,	k_th=35,	theta_0=109.5,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	angle:	particle_type1=F,	particle_type2=B,	particle_type3=F,	angle_type=harmonic,	k_th=50,	theta_0=109.5,	k_1=39.369026,	k_2=21.653705,	k=0,	cos_theta_0=0,	k_ub=16.052141,	S_0=2.561;
+	};
+torsions	{
+	torsion:	particle_type1=OS,	particle_type2=CT,	particle_type3=CT,	particle_type4=OS,	torsion_type=cosine,	k=0,	a0=0,	a1=0,	a2=0,	a3=0,	a4=0,	a5=0,	mult=1,	k_1=1.4,	n_1=3,	delta_1=0;
+	torsion:	particle_type1=OS,	particle_type2=CT,	particle_type3=CT,	particle_type4=H1,	torsion_type=cosine,	k=0,	a0=0,	a1=0,	a2=0,	a3=0,	a4=0,	a5=0,	mult=1,	k_1=1.4,	n_1=3,	delta_1=0;
+	torsion:	particle_type1=H1,	particle_type2=CT,	particle_type3=CT,	particle_type4=H1,	torsion_type=cosine,	k=0,	a0=0,	a1=0,	a2=0,	a3=0,	a4=0,	a5=0,	mult=1,	k_1=1.4,	n_1=3,	delta_1=0;
+	torsion:	particle_type1=CT,	particle_type2=CT,	particle_type3=OS,	particle_type4=C,	torsion_type=cosine,	k=0,	a0=0,	a1=0,	a2=0,	a3=0,	a4=0,	a5=0,	mult=1,	k_1=1.15,	n_1=3,	delta_1=0;
+	torsion:	particle_type1=H1,	particle_type2=CT,	particle_type3=OS,	particle_type4=C,	torsion_type=cosine,	k=0,	a0=0,	a1=0,	a2=0,	a3=0,	a4=0,	a5=0,	mult=1,	k_1=1.15,	n_1=3,	delta_1=0;
+	torsion:	particle_type1=O,	particle_type2=C,	particle_type3=OS,	particle_type4=CT,	torsion_type=cosine,	k=0,	a0=0,	a1=0,	a2=0,	a3=0,	a4=0,	a5=0,	mult=1,	k_1=10.5,	n_1=2,	delta_1=180;
+	};
+nonbonded_2body_potentials	{
+	lennardjones:	particle_type1=O,	particle_type2=O,	r_cut=12.5;
+	lennardjones:	particle_type1=O,	particle_type2=OS,	r_cut=12.5;
+	lennardjones:	particle_type1=O,	particle_type2=C,	r_cut=12.5;
+	lennardjones:	particle_type1=O,	particle_type2=CT,	r_cut=12.5;
+	lennardjones:	particle_type1=O,	particle_type2=H1,	r_cut=12.5;
+	lennardjones:	particle_type1=OS,	particle_type2=OS,	r_cut=12.5;
+	lennardjones:	particle_type1=OS,	particle_type2=C,	r_cut=12.5;
+	lennardjones:	particle_type1=OS,	particle_type2=CT,	r_cut=12.5;
+	lennardjones:	particle_type1=OS,	particle_type2=H1,	r_cut=12.5;
+	lennardjones:	particle_type1=C,	particle_type2=C,	r_cut=12.5;
+	lennardjones:	particle_type1=C,	particle_type2=CT,	r_cut=12.5;
+	lennardjones:	particle_type1=C,	particle_type2=H1,	r_cut=12.5;
+	lennardjones:	particle_type1=CT,	particle_type2=CT,	r_cut=12.5;
+	lennardjones:	particle_type1=CT,	particle_type2=H1,	r_cut=12.5;
+	lennardjones:	particle_type1=H1,	particle_type2=H1,	r_cut=12.5;
+	ljspline:	particle_type1=O,	particle_type2=O,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=O,	particle_type2=OS,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=O,	particle_type2=C,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=O,	particle_type2=CT,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=O,	particle_type2=H1,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=OS,	particle_type2=OS,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=OS,	particle_type2=C,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=OS,	particle_type2=CT,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=OS,	particle_type2=H1,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=C,	particle_type2=C,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=C,	particle_type2=CT,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=C,	particle_type2=H1,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=CT,	particle_type2=CT,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=CT,	particle_type2=H1,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=H1,	particle_type2=H1,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=O,	particle_type2=Li,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=O,	particle_type2=B,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=O,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=OS,	particle_type2=Li,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=OS,	particle_type2=B,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=OS,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=C,	particle_type2=Li,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=C,	particle_type2=B,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=C,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=CT,	particle_type2=Li,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=CT,	particle_type2=B,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=CT,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=H1,	particle_type2=Li,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=H1,	particle_type2=B,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=H1,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=Li,	particle_type2=Li,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=Li,	particle_type2=B,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=Li,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=B,	particle_type2=B,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=B,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	ljspline:	particle_type1=F,	particle_type2=F,	r_cut=12.5,	r_l=11;
+	};
Index: tests/regression/Domain/RepeatBox/testsuite-domain-repeat-box.at
===================================================================
--- tests/regression/Domain/RepeatBox/testsuite-domain-repeat-box.at	(revision 45f835e8c203e278cf19fe6699144297ddcc29a7)
+++ tests/regression/Domain/RepeatBox/testsuite-domain-repeat-box.at	(revision 9d613feab4e07d3a202706642be753fe3532e1b3)
@@ -39,4 +39,10 @@
 AT_CHECK([file=test-z.xyz;sort -n ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/post/test-z.xyz  | grep -v "Created by" >$file-sorted2], 0, [ignore], [ignore])
 AT_CHECK([file=test-z.xyz; diff $file-sorted $file-sorted2], 0, [ignore], [ignore])
+
+file=ec.data
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0)
+AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file  -o tremolo -d "2, 2, 2"], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
+AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/post/$file], 0, [ignore], [ignore])
 
 AT_CLEANUP
@@ -82,4 +88,10 @@
 AT_CHECK([file=test-z.xyz; diff $file-sorted $file-sorted2], 0, [ignore], [ignore])
 
+file=ec.data
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0)
+AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials  -i $file  -o tremolo -d "2, 2, 2" --undo], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
+AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/$file], 0, [ignore], [ignore])
+
 AT_CLEANUP
 
@@ -124,3 +136,9 @@
 AT_CHECK([file=test-z.xyz; diff $file-sorted $file-sorted2], 0, [ignore], [ignore])
 
+file=ec.data
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/pre/ec.* .], 0)
+AT_CHECK([../../molecuilder --parse-tremolo-potentials ec.potentials -i $file  -o tremolo -d "2, 2, 2" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Box domain is now" stdout], 0, [ignore], [ignore])
+AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Domain/RepeatBox/post/$file], 0, [ignore], [ignore])
+
 AT_CLEANUP
