Index: tests/regression/Analysis/5/pre/test.conf
===================================================================
--- tests/regression/Analysis/5/pre/test.conf	(revision 9df680e1ca4592968b96c9d82a4e85fee43ab4c5)
+++ 	(revision )
@@ -1,83 +1,0 @@
-# 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	0	# 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	0	# check every ..th steps
-MaxMinGapStopStep	0	# 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	0	# check every ..th steps
-InitMaxMinGapStopStep	0	# 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	0	# here: specifying both maximum number of SpinUp- and -Down-states
-PsiMaxNoUp	0	# here: specifying maximum number of SpinUp-states
-PsiMaxNoDown	0	# 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_Type2_1	9.782085945	3.275186040	3.535886037	0 # molecule nr 0
-Ion_Type2_2	8.532785963	4.158586027	3.535886037	0 # molecule nr 1
-Ion_Type2_3	7.283585982	3.275186040	3.535886037	0 # molecule nr 2
-Ion_Type1_1	9.782085945	2.645886050	2.645886050	0 # molecule nr 3
-Ion_Type1_2	9.782085945	2.645886050	4.425886024	0 # molecule nr 4
-Ion_Type1_3	10.672039608	3.904536878	3.535886037	0 # molecule nr 5
-Ion_Type1_4	8.532785963	4.787886018	2.645886050	0 # molecule nr 6
-Ion_Type1_5	8.532785963	4.787886018	4.425886024	0 # molecule nr 7
-Ion_Type1_6	6.393632318	3.904536877	3.535886037	0 # molecule nr 8
-Ion_Type1_7	7.283585982	2.645886050	2.645886050	0 # molecule nr 9
-Ion_Type1_8	7.283585982	2.645886050	4.425886024	0 # molecule nr 10
Index: tests/regression/Analysis/5/pre/water.xyz
===================================================================
--- tests/regression/Analysis/5/pre/water.xyz	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/5/pre/water.xyz	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,5 @@
+3
+	Created by molecuilder on Thu Dec 30 10:10:30 2010
+O	0	0	0
+H	0.758602	0	0.504284
+H	0.758602	0	-0.504284
Index: tests/regression/Analysis/6/post/emptybox_histogram.dat
===================================================================
--- tests/regression/Analysis/6/post/emptybox_histogram.dat	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/6/post/emptybox_histogram.dat	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,361 @@
+BinStart	Count
+0	0
+1	0
+2	0
+3	0
+4	0
+5	0
+6	0
+7	0
+8	0
+9	0
+10	0
+11	0
+12	0
+13	0
+14	0
+15	0
+16	0
+17	0
+18	0
+19	0
+20	0
+21	0
+22	0
+23	0
+24	0
+25	0
+26	0
+27	0
+28	0
+29	0
+30	0
+31	0
+32	0
+33	0
+34	0
+35	0
+36	0
+37	0
+38	0
+39	0
+40	0
+41	0
+42	0
+43	0
+44	0
+45	0
+46	0
+47	0
+48	0
+49	0
+50	0
+51	0
+52	0
+53	0
+54	0
+55	0
+56	0
+57	0
+58	0
+59	0
+60	0
+61	0
+62	0
+63	0
+64	0
+65	0
+66	0
+67	0
+68	0
+69	0
+70	0
+71	0
+72	0
+73	0
+74	0
+75	0
+76	0
+77	0
+78	0
+79	0
+80	0
+81	0
+82	0
+83	0
+84	0
+85	0
+86	0
+87	0
+88	0
+89	0
+90	0
+91	0
+92	0
+93	0
+94	0
+95	0
+96	0
+97	0
+98	0
+99	0
+100	0
+101	0
+102	0
+103	0
+104	0
+105	0
+106	0
+107	0
+108	0
+109	0
+110	0
+111	0
+112	0
+113	0
+114	0
+115	0
+116	0
+117	0
+118	0
+119	0
+120	0
+121	0
+122	0
+123	0
+124	0
+125	0
+126	0
+127	0
+128	0
+129	0
+130	0
+131	0
+132	0
+133	0
+134	0
+135	0
+136	0
+137	0
+138	0
+139	0
+140	0
+141	0
+142	0
+143	0
+144	0
+145	0
+146	0
+147	0
+148	0
+149	0
+150	0
+151	0
+152	0
+153	0
+154	0
+155	0
+156	0
+157	0
+158	0
+159	0
+160	0
+161	0
+162	0
+163	0
+164	0
+165	0
+166	0
+167	0
+168	0
+169	0
+170	0
+171	0
+172	0
+173	0
+174	0
+175	0
+176	0
+177	0
+178	0
+179	0
+180	0
+181	0
+182	0
+183	0
+184	0
+185	0
+186	0
+187	0
+188	0
+189	0
+190	0
+191	0
+192	0
+193	0
+194	0
+195	0
+196	0
+197	0
+198	0
+199	0
+200	0
+201	0
+202	0
+203	0
+204	0
+205	0
+206	0
+207	0
+208	0
+209	0
+210	0
+211	0
+212	0
+213	0
+214	0
+215	0
+216	0
+217	0
+218	0
+219	0
+220	0
+221	0
+222	0
+223	0
+224	0
+225	0
+226	0
+227	0
+228	0
+229	0
+230	0
+231	0
+232	0
+233	0
+234	0
+235	0
+236	0
+237	0
+238	0
+239	0
+240	0
+241	0
+242	0
+243	0
+244	0
+245	0
+246	0
+247	0
+248	0
+249	0
+250	0
+251	0
+252	0
+253	0
+254	0
+255	0
+256	0
+257	0
+258	0
+259	0
+260	0
+261	0
+262	0
+263	0
+264	0
+265	0
+266	0
+267	0
+268	0
+269	0
+270	0
+271	0
+272	0
+273	0
+274	0
+275	0
+276	0
+277	0
+278	0
+279	0
+280	0
+281	0
+282	0
+283	0
+284	0
+285	0
+286	0
+287	0
+288	0
+289	0
+290	0
+291	0
+292	0
+293	0
+294	0
+295	0
+296	0
+297	0
+298	0
+299	0
+300	0
+301	0
+302	0
+303	0
+304	0
+305	0
+306	0
+307	0
+308	0
+309	0
+310	0
+311	0
+312	0
+313	0
+314	0
+315	0
+316	0
+317	0
+318	0
+319	0
+320	0
+321	0
+322	0
+323	0
+324	0
+325	0
+326	0
+327	0
+328	0
+329	0
+330	0
+331	0
+332	0
+333	0
+334	0
+335	0
+336	0
+337	0
+338	0
+339	0
+340	0
+341	0
+342	0
+343	0
+344	0
+345	0
+346	0
+347	0
+348	0
+349	0
+350	0
+351	0
+352	0
+353	0
+354	0
+355	0
+356	0
+357	0
+358	0
+359	0
Index: tests/regression/Analysis/6/post/hydrogenbox_histogram.dat
===================================================================
--- tests/regression/Analysis/6/post/hydrogenbox_histogram.dat	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/6/post/hydrogenbox_histogram.dat	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,361 @@
+BinStart	Count
+0	0
+1	0
+2	0
+3	0
+4	0
+5	0
+6	0
+7	0
+8	0
+9	0
+10	0
+11	0
+12	0
+13	0
+14	0
+15	0
+16	0
+17	0
+18	0
+19	0
+20	0
+21	0
+22	0
+23	0
+24	0
+25	0
+26	0
+27	0
+28	0
+29	0
+30	0
+31	0
+32	0
+33	0
+34	0
+35	0
+36	0
+37	0
+38	0
+39	0
+40	0
+41	0
+42	0
+43	0
+44	0
+45	0
+46	0
+47	0
+48	0
+49	0
+50	0
+51	0
+52	0
+53	0
+54	0
+55	0
+56	0
+57	0
+58	0
+59	0
+60	0
+61	0
+62	0
+63	0
+64	0
+65	0
+66	0
+67	0
+68	0
+69	0
+70	0
+71	0
+72	0
+73	0
+74	0
+75	0
+76	0
+77	0
+78	0
+79	0
+80	0
+81	0
+82	0
+83	0
+84	0
+85	0
+86	0
+87	0
+88	0
+89	0
+90	0
+91	0
+92	0
+93	0
+94	0
+95	0
+96	0
+97	0
+98	0
+99	0
+100	0
+101	0
+102	0
+103	0
+104	0
+105	0
+106	0
+107	0
+108	0
+109	0
+110	0
+111	0
+112	0
+113	0
+114	0
+115	0
+116	0
+117	0
+118	0
+119	0
+120	0
+121	0
+122	0
+123	0
+124	0
+125	0
+126	0
+127	0
+128	0
+129	0
+130	0
+131	0
+132	0
+133	0
+134	0
+135	0
+136	0
+137	0
+138	0
+139	0
+140	0
+141	0
+142	0
+143	0
+144	0
+145	0
+146	0
+147	0
+148	0
+149	0
+150	0
+151	0
+152	0
+153	0
+154	0
+155	0
+156	0
+157	0
+158	0
+159	0
+160	0
+161	0
+162	0
+163	0
+164	0
+165	0
+166	0
+167	0
+168	0
+169	0
+170	0
+171	0
+172	0
+173	0
+174	0
+175	0
+176	0
+177	0
+178	0
+179	0
+180	0
+181	0
+182	0
+183	0
+184	0
+185	0
+186	0
+187	0
+188	0
+189	0
+190	0
+191	0
+192	0
+193	0
+194	0
+195	0
+196	0
+197	0
+198	0
+199	0
+200	0
+201	0
+202	0
+203	0
+204	0
+205	0
+206	0
+207	0
+208	0
+209	0
+210	0
+211	0
+212	0
+213	0
+214	0
+215	0
+216	0
+217	0
+218	0
+219	0
+220	0
+221	0
+222	0
+223	0
+224	0
+225	0
+226	0
+227	0
+228	0
+229	0
+230	0
+231	0
+232	0
+233	0
+234	0
+235	0
+236	0
+237	0
+238	0
+239	0
+240	0
+241	0
+242	0
+243	0
+244	0
+245	0
+246	0
+247	0
+248	0
+249	0
+250	0
+251	0
+252	0
+253	0
+254	0
+255	0
+256	0
+257	0
+258	0
+259	0
+260	0
+261	0
+262	0
+263	0
+264	0
+265	0
+266	0
+267	0
+268	0
+269	0
+270	0
+271	0
+272	0
+273	0
+274	0
+275	0
+276	0
+277	0
+278	0
+279	0
+280	0
+281	0
+282	0
+283	0
+284	0
+285	0
+286	0
+287	0
+288	0
+289	0
+290	0
+291	0
+292	0
+293	0
+294	0
+295	0
+296	0
+297	0
+298	0
+299	0
+300	0
+301	0
+302	0
+303	0
+304	0
+305	0
+306	0
+307	0
+308	0
+309	0
+310	0
+311	0
+312	0
+313	0
+314	0
+315	0
+316	0
+317	0
+318	0
+319	0
+320	0
+321	0
+322	0
+323	0
+324	0
+325	0
+326	0
+327	0
+328	0
+329	0
+330	0
+331	0
+332	0
+333	0
+334	0
+335	0
+336	0
+337	0
+338	0
+339	0
+340	0
+341	0
+342	0
+343	0
+344	0
+345	0
+346	0
+347	0
+348	0
+349	0
+350	0
+351	0
+352	0
+353	0
+354	0
+355	0
+356	0
+357	0
+358	0
+359	0
Index: tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-discrete-angles.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-discrete-angles.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-discrete-angles.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,17 @@
+### 7. angular dipole correlation - discrete angles
+
+AT_SETUP([Analysis - Angular dipole correlation - same aligned])
+AT_KEYWORDS([analysis,correlation])
+AT_SKIP_IF([/bin/true])
+#AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/water.xyz .], 0)
+#AT_CHECK([../../molecuilder -i water.xyz -v 3 --select-all-molecules --principal-axis-system], 0, [stdout], [stderr])
+#AT_CHECK([fgrep "0.512674; 0; 0" stdout], 0, [ignore], [ignore])
+AT_CLEANUP
+
+AT_SETUP([Analysis - Angular dipole correlation - same aligned but one])
+AT_KEYWORDS([analysis,correlation])
+AT_SKIP_IF([/bin/true])
+#AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/water.xyz .], 0)
+#AT_CHECK([../../molecuilder -i water.xyz -v 3 --select-all-molecules --principal-axis-system], 0, [stdout], [stderr])
+#AT_CHECK([fgrep "0.512674; 0; 0" stdout], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-empty.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-empty.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-empty.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,15 @@
+### 6. angular dipole correlation - empty
+
+AT_SETUP([Analysis - Angular dipole correlation - Empty domain])
+AT_KEYWORDS([analysis,correlation])
+AT_CHECK([../../molecuilder -i emptybox.xyz -o xyz --select-molecule-by-formula H2O --dipole-correlation --bin-start 0 --bin-width 1. --bin-end 359 --output-file emptybox_values.dat --bin-output-file emptybox_histogram.dat], 0, [ignore], [ignore])
+AT_CHECK([file=emptybox_histogram.dat; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/6/post/$file], 0, [ignore], [ignore])
+AT_CLEANUP
+
+AT_SETUP([Analysis - Angular dipole correlation - Domain filled with hydrogen])
+AT_KEYWORDS([analysis,correlation])
+AT_CHECK([../../molecuilder -i hydrogen.xyz -o xyz --add-atom 1 --domain-position "0,0,0"], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder -i hydrogenbox.xyz -o xyz --fill-void hydrogen.xyz --distances "3.1,3.1,3.1" --DoRotate 0], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder -i hydrogenbox.xyz -o xyz --select-molecule-by-formula H2O --dipole-correlation --bin-start 0 --bin-width 1. --bin-end 359 --output-file hydrogenbox_values.dat --bin-output-file hydrogenbox_histogram.dat], 0, [stdout], [stderr])
+AT_CHECK([file=hydrogenbox_histogram.dat; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/6/post/$file], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-random-distribution.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-random-distribution.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis-angular-dipole-correlation-random-distribution.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,17 @@
+### 8. angular dipole correlation - random distribution
+
+AT_SETUP([Analysis - Angular dipole correlation - Uniform distribution])
+AT_KEYWORDS([analysis,correlation])
+AT_SKIP_IF([/bin/true])
+#AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/water.xyz .], 0)
+#AT_CHECK([../../molecuilder -i water.xyz -v 3 --select-all-molecules --principal-axis-system], 0, [stdout], [stderr])
+#AT_CHECK([fgrep "0.512674; 0; 0" stdout], 0, [ignore], [ignore])
+AT_CLEANUP
+
+AT_SETUP([Analysis - Angular dipole correlation - Gaussian distribution])
+AT_KEYWORDS([analysis,correlation])
+AT_SKIP_IF([/bin/true])
+#AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/water.xyz .], 0)
+#AT_CHECK([../../molecuilder -i water.xyz -v 3 --select-all-molecules --principal-axis-system], 0, [stdout], [stderr])
+#AT_CHECK([fgrep "0.512674; 0; 0" stdout], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Analysis/testsuite-analysis-pair-correlation.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis-pair-correlation.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis-pair-correlation.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,26 @@
+### 1. pair correlation analysis
+
+# 1. normal test
+AT_SETUP([Analysis - pair correlation])
+AT_KEYWORDS([analysis,correlation])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/pre/test.conf .], 0)
+AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Begin of PairCorrelation" stdout], 0, [ignore], [ignore])
+#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/post/$file], 0, [ignore], [ignore])
+AT_CHECK([file=bin_output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/post/$file], 0, [ignore], [ignore])
+AT_CLEANUP
+
+# 2. range test
+AT_SETUP([Analysis - pair correlation range test])
+AT_KEYWORDS([analysis,correlation])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/pre/test.conf .], 0)
+AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output-5.csv --bin-output-file bin_output-5.csv --bin-start 0 --bin-end 5], 0, [stdout], [stderr])
+#AT_CHECK([file=output-5.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
+AT_CHECK([file=bin_output-5.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output-10.csv --bin-output-file bin_output-10.csv --bin-start 5 --bin-end 10], 0, [stdout], [stderr])
+#AT_CHECK([file=output-10.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
+AT_CHECK([file=bin_output-10.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
+AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output-20.csv --bin-output-file bin_output-20.csv --bin-start 10 --bin-end 20], 0, [stdout], [stderr])
+#AT_CHECK([file=output-20.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
+AT_CHECK([file=bin_output-20.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Analysis/testsuite-analysis-point-correlation.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis-point-correlation.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis-point-correlation.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,10 @@
+### 3. pair correlation analysis to point
+
+AT_SETUP([Analysis - point correlation])
+AT_KEYWORDS([analysis,correlation])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/pre/test.conf .], 0)
+AT_CHECK([../../molecuilder -i test.conf  -v 7 --select-all-molecules --point-correlation --elements 1 --position "10., 10., 10." --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Begin of CorrelationToPoint" stdout], 0, [ignore], [ignore])
+#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/post/$file], 0, [ignore], [ignore])
+AT_CHECK([file=bin_output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/post/$file], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Analysis/testsuite-analysis-principal-axis-system.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis-principal-axis-system.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis-principal-axis-system.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,10 @@
+### 5. principal axis system
+
+AT_SETUP([Analysis - Principal Axis System])
+AT_KEYWORDS([analysis,correlation])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/water.xyz .], 0)
+AT_CHECK([../../molecuilder -i water.xyz -v 3 --select-all-molecules --principal-axis-system], 0, [stdout], [stderr])
+AT_CHECK([fgrep "0.512674; 0; 0" stdout], 0, [ignore], [ignore])
+AT_CHECK([fgrep "0; 1.54301; 0" stdout], 0, [ignore], [ignore])
+AT_CHECK([fgrep "0; 0; 1.03033" stdout], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Analysis/testsuite-analysis-surface-correlation.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis-surface-correlation.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis-surface-correlation.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,10 @@
+### 4. pair correlation analysis to surface
+
+AT_SETUP([Analysis - surface correlation])
+AT_KEYWORDS([analysis,correlation])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/pre/test.conf .], 0)
+AT_CHECK([../../molecuilder -i test.conf  -v 3 -I --select-all-molecules --unselect-molecule-by-formula C3H8 --surface-correlation --elements 1 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-width 1. --bin-end 20 --molecule-by-id 1], 0, [stdout], [stderr])
+AT_CHECK([fgrep "Begin of CorrelationToSurface" stdout], 0, [ignore], [ignore])
+#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/post/$file], 0, [ignore], [ignore])
+AT_CHECK([file=bin_output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/post/$file], 0, [ignore], [ignore])
+AT_CLEANUP
Index: tests/regression/Analysis/testsuite-analysis.at
===================================================================
--- tests/regression/Analysis/testsuite-analysis.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
+++ tests/regression/Analysis/testsuite-analysis.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -0,0 +1,22 @@
+AT_BANNER([MoleCuilder - Analysis])
+
+# 1. & 2. pair correlation analysis
+m4_include(Analysis/testsuite-analysis-pair-correlation.at)
+
+# 3. pair correlation analysis to point
+m4_include(Analysis/testsuite-analysis-point-correlation.at)
+
+# 4. pair correlation analysis to surface
+m4_include(Analysis/testsuite-analysis-surface-correlation.at)
+
+# 5. principal axis system
+m4_include(Analysis/testsuite-analysis-principal-axis-system.at)
+
+# 6. angular dipole correlation - empty
+m4_include(Analysis/testsuite-analysis-angular-dipole-correlation-empty.at)
+
+# 7. angular dipole correlation - discrete angles
+m4_include(Analysis/testsuite-analysis-angular-dipole-correlation-discrete-angles.at)
+
+# 8. angular dipole correlation - random distribution
+m4_include(Analysis/testsuite-analysis-angular-dipole-correlation-random-distribution.at)
Index: tests/regression/Makefile.am
===================================================================
--- tests/regression/Makefile.am	(revision 9df680e1ca4592968b96c9d82a4e85fee43ab4c5)
+++ tests/regression/Makefile.am	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -17,5 +17,12 @@
 
 TESTSCRIPTS = \
-	$(srcdir)/testsuite-analysis.at \
+	$(srcdir)/Analysis/testsuite-analysis.at \
+	$(srcdir)/Analysis/testsuite-analysis-pair-correlation.at \
+	$(srcdir)/Analysis/testsuite-analysis-point-correlation.at \
+	$(srcdir)/Analysis/testsuite-analysis-surface-correlation.at \
+	$(srcdir)/Analysis/testsuite-analysis-principal-axis-system.at \
+	$(srcdir)/Analysis/testsuite-analysis-angular-dipole-correlation-empty.at \
+	$(srcdir)/Analysis/testsuite-analysis-angular-dipole-correlation-discrete-angles.at \
+	$(srcdir)/Analysis/testsuite-analysis-angular-dipole-correlation-random-distribution.at \
 	$(srcdir)/testsuite-domain.at \
 	$(srcdir)/Filling/testsuite-filling.at \
Index: tests/regression/testsuite-analysis.at
===================================================================
--- tests/regression/testsuite-analysis.at	(revision 9df680e1ca4592968b96c9d82a4e85fee43ab4c5)
+++ 	(revision )
@@ -1,55 +1,0 @@
-AT_BANNER([MoleCuilder - Analysis])
-# 1. pair correlation analysis
-AT_SETUP([Analysis - pair correlation])
-AT_KEYWORDS([analysis])
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/pre/test.conf .], 0)
-AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
-AT_CHECK([fgrep "Begin of PairCorrelation" stdout], 0, [ignore], [ignore])
-#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/post/$file], 0, [ignore], [ignore])
-AT_CHECK([file=bin_output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/1/post/$file], 0, [ignore], [ignore])
-AT_CLEANUP
-
-# 2. pair correlation analysis - range test
-AT_SETUP([Analysis - pair correlation range test])
-AT_KEYWORDS([analysis])
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/pre/test.conf .], 0)
-AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output-5.csv --bin-output-file bin_output-5.csv --bin-start 0 --bin-end 5], 0, [stdout], [stderr])
-#AT_CHECK([file=output-5.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
-AT_CHECK([file=bin_output-5.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
-AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output-10.csv --bin-output-file bin_output-10.csv --bin-start 5 --bin-end 10], 0, [stdout], [stderr])
-#AT_CHECK([file=output-10.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
-AT_CHECK([file=bin_output-10.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
-AT_CHECK([../../molecuilder -i test.conf  -v 3 --select-all-molecules --pair-correlation --elements 1 8 --output-file output-20.csv --bin-output-file bin_output-20.csv --bin-start 10 --bin-end 20], 0, [stdout], [stderr])
-#AT_CHECK([file=output-20.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
-AT_CHECK([file=bin_output-20.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/2/post/$file], 0, [ignore], [ignore])
-AT_CLEANUP
-
-# 3. pair correlation analysis to point
-AT_SETUP([Analysis - point correlation])
-AT_KEYWORDS([analysis])
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/pre/test.conf .], 0)
-AT_CHECK([../../molecuilder -i test.conf  -v 7 --select-all-molecules --point-correlation --elements 1 --position "10., 10., 10." --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-end 20], 0, [stdout], [stderr])
-AT_CHECK([fgrep "Begin of CorrelationToPoint" stdout], 0, [ignore], [ignore])
-#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/post/$file], 0, [ignore], [ignore])
-AT_CHECK([file=bin_output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/3/post/$file], 0, [ignore], [ignore])
-AT_CLEANUP
-
-# 4. pair correlation analysis to surface
-AT_SETUP([Analysis - surface correlation])
-AT_KEYWORDS([analysis])
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/pre/test.conf .], 0)
-AT_CHECK([../../molecuilder -i test.conf  -v 3 -I --select-all-molecules --unselect-molecule-by-formula C3H8 --surface-correlation --elements 1 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-width 1. --bin-end 20 --molecule-by-id 1], 0, [stdout], [stderr])
-AT_CHECK([fgrep "Begin of CorrelationToSurface" stdout], 0, [ignore], [ignore])
-#AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/post/$file], 0, [ignore], [ignore])
-AT_CHECK([file=bin_output.csv; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/4/post/$file], 0, [ignore], [ignore])
-AT_CLEANUP
-
-# 5. principal axis system
-#AT_SETUP([Analysis - principal axis system])
-#AT_KEYWORDS([analysis])
-#AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Analysis/5/pre/test.conf .], 0)
-#AT_CHECK([../../molecuilder -i test.conf  -v 3 -m 0], 0, [stdout], [stderr])
-#AT_CHECK([fgrep "eigenvalue = 4382.53," stdout], 0, [ignore], [ignore])
-#AT_CHECK([fgrep "eigenvalue = 4369.24," stdout], 0, [ignore], [ignore])
-#AT_CHECK([fgrep "eigenvalue = 28.9359," stdout], 0, [ignore], [ignore])
-#AT_CLEANUP
Index: tests/regression/testsuite.at
===================================================================
--- tests/regression/testsuite.at	(revision 9df680e1ca4592968b96c9d82a4e85fee43ab4c5)
+++ tests/regression/testsuite.at	(revision cd7a874697981628f16debf304ae5c1ff4d0f0ce)
@@ -30,3 +30,3 @@
 m4_include(Filling/testsuite-filling.at)
 
-m4_include(testsuite-analysis.at)
+m4_include(Analysis/testsuite-analysis.at)
