Index: src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp	(revision 4fc828b58deb25fc433599e0a2567df1f7b71101)
+++ src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
@@ -56,8 +56,8 @@
   binoutput.open(params.binoutputname.string().c_str());
   DipoleAngularCorrelationMap *correlationmap = NULL;
-  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
-  LOG(0, "STATUS: There are " << molecules.size() << " selected molecules.");
+  std::vector<atom*> atoms = World::getInstance().getSelectedAtoms();
+  LOG(0, "STATUS: There are " << atoms.size() << " selected atoms.");
   ASSERT(!params.periodic, "AnalysisDipoleAngularCorrelationAction() - periodic case not implemented.");
-  correlationmap = DipoleAngularCorrelation(molecules);
+  correlationmap = DipoleAngularCorrelation(atoms);
   OutputCorrelationMap<DipoleAngularCorrelationMap>(&output, correlationmap, OutputDipoleAngularCorrelation_Header, OutputDipoleAngularCorrelation_Value);
   binmap = BinData( correlationmap, params.BinWidth, params.BinStart, params.BinEnd );
Index: src/Analysis/analysis_correlation.cpp
===================================================================
--- src/Analysis/analysis_correlation.cpp	(revision 4fc828b58deb25fc433599e0a2567df1f7b71101)
+++ src/Analysis/analysis_correlation.cpp	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
@@ -31,4 +31,5 @@
 #include "CodePatterns/Log.hpp"
 #include "CodePatterns/Verbose.hpp"
+#include "Descriptors/MoleculeOfAtomSelectionDescriptor.hpp"
 #include "Formula.hpp"
 #include "LinearAlgebra/Vector.hpp"
@@ -98,22 +99,20 @@
  * Note given element order is unimportant (i.e. g(Si, O) === g(O, Si))
  * Angles are given in degrees.
- * \param *molecules vector of molecules
+ * \param &atoms list of atoms of the molecules taking part (Note: molecules may
+ * change over time as bond structure is recalculated, hence we need the atoms)
  * \return Map of doubles with values the pair of the two atoms.
  */
-DipoleAngularCorrelationMap *DipoleAngularCorrelation(std::vector<molecule *> &molecules)
+DipoleAngularCorrelationMap *DipoleAngularCorrelation(std::vector<atom *> &atoms)
 {
   Info FunctionInfo(__func__);
   DipoleAngularCorrelationMap *outmap = new DipoleAngularCorrelationMap;
-//  double distance = 0.;
-//  Box &domain = World::getInstance().getDomain();
-//
-  if (molecules.empty()) {
-    DoeLog(1) && (eLog()<< Verbose(1) <<"No molecule given." << endl);
-    return outmap;
-  }
+  std::set<molecule *> molecules;
 
   // store original time step
   const unsigned int oldtime = WorldTime::getTime();
   World::getInstance().setTime(0);
+  // calculate molecules for this time step
+  BOOST_FOREACH(atom *_atom, atoms)
+    molecules.insert(_atom->getMolecule());
 
   BOOST_FOREACH(atom *_atom, World::getInstance().getAllAtoms())
@@ -155,4 +154,8 @@
   for (size_t step = 1; step < max_timesteps; ++step) {
     World::getInstance().setTime(step);
+    // recalculate molecules for this time step
+    molecules.clear();
+    BOOST_FOREACH(atom *_atom, atoms)
+      molecules.insert(_atom->getMolecule());
     size_t i=0;
     BOOST_FOREACH(molecule *_mol, molecules) {
@@ -161,5 +164,5 @@
       const double angle = Dipole.Angle(ZeroVector[i]) * (180./M_PI);
       LOG(1,"INFO: Resulting relative angle for molecule " << _mol->getId() << " is " << angle << ".");
-      outmap->insert ( make_pair (angle, _mol ) );
+      outmap->insert ( make_pair (angle, *_mol->begin() ) );
       ++i;
     }
@@ -591,5 +594,5 @@
 void OutputDipoleAngularCorrelation_Header( ofstream * const file )
 {
-  *file << "\tMolecule";
+  *file << "\tFirstAtomOfMolecule";
 };
 
@@ -601,5 +604,5 @@
 void OutputDipoleAngularCorrelation_Value( ofstream * const file, DipoleAngularCorrelationMap::const_iterator &runner )
 {
-  *file << runner->second->getId();
+  *file << runner->second->getName();
 };
 
Index: src/Analysis/analysis_correlation.hpp
===================================================================
--- src/Analysis/analysis_correlation.hpp	(revision 4fc828b58deb25fc433599e0a2567df1f7b71101)
+++ src/Analysis/analysis_correlation.hpp	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
@@ -46,5 +46,5 @@
 
 typedef multimap<double, pair<atom *, atom *> > PairCorrelationMap;
-typedef multimap<double, molecule * > DipoleAngularCorrelationMap;
+typedef multimap<double, atom * > DipoleAngularCorrelationMap;
 typedef multimap<double, pair<molecule *, molecule *> > DipoleCorrelationMap;
 typedef multimap<double, pair<atom *, const Vector *> > CorrelationToPointMap;
@@ -54,5 +54,5 @@
 /********************************************** declarations *******************************/
 
-DipoleAngularCorrelationMap *DipoleAngularCorrelation(std::vector<molecule *> &molecules);
+DipoleAngularCorrelationMap *DipoleAngularCorrelation(std::vector<atom *> &atoms);
 DipoleCorrelationMap *DipoleCorrelation(std::vector<molecule *> &molecules);
 PairCorrelationMap *PairCorrelation(std::vector<molecule *> &molecules, const std::vector<const element *> &elements);
Index: src/World.cpp
===================================================================
--- src/World.cpp	(revision 4fc828b58deb25fc433599e0a2567df1f7b71101)
+++ src/World.cpp	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
@@ -25,5 +25,4 @@
 
 #include "Actions/ActionTraits.hpp"
-//#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
 #include "Actions/ManipulateAtomsProcess.hpp"
 #include "atom.hpp"
@@ -37,4 +36,5 @@
 #include "Descriptors/MoleculeDescriptor_impl.hpp"
 #include "Descriptors/SelectiveIterator_impl.hpp"
+#include "Graph/DepthFirstSearchAnalysis.hpp"
 #include "Helpers/defs.hpp"
 #include "LinearAlgebra/RealSpaceMatrix.hpp"
@@ -137,6 +137,20 @@
     // set new time
     WorldTime::setTime(_step);
-    // re-instantiate bond structure
-    //FragmentationSubgraphDissection();
+    // TODO: removed when BondGraph creates the adjacency
+    // 1. remove all of World's molecules
+    for (MoleculeIterator iter = getMoleculeIter();
+        getMoleculeIter() != moleculeEnd();
+        iter = getMoleculeIter()) {
+      getMolecules()->erase(*iter);
+      destroyMolecule(*iter);
+    }
+    // 2. (re-)create bondgraph
+    AtomComposite Set = getAllAtoms();
+    BG->CreateAdjacency(Set);
+
+    // 3. scan for connected subgraphs => molecules
+    DepthFirstSearchAnalysis DFS;
+    DFS();
+    DFS.UpdateMoleculeStructure();
   }
 }
Index: tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_X.xyz
===================================================================
--- tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_X.xyz	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
+++ tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_X.xyz	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
@@ -0,0 +1,215 @@
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 0
+O	0	0	0
+H	0.759	0	0.504
+H	0.759	0	-0.504
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 1
+O	0	0	0
+H	0.759	0.088	0.496
+H	0.759	-0.088	-0.496
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 2
+O	0	0	0
+H	0.759	0.173	0.473
+H	0.759	-0.173	-0.473
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 3
+O	0	0	0
+H	0.759	0.253	0.436
+H	0.759	-0.253	-0.436
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 4
+O	0	0	0
+H	0.759	0.325	0.385
+H	0.759	-0.325	-0.385
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 5
+O	0	0	0
+H	0.759	0.387	0.323
+H	0.759	-0.387	-0.323
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 6
+O	0	0	0
+H	0.759	0.437	0.251
+H	0.759	-0.437	-0.251
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 7
+O	0	0	0
+H	0.759	0.474	0.171
+H	0.759	-0.474	-0.171
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 8
+O	0	0	0
+H	0.759	0.496	0.086
+H	0.759	-0.496	-0.086
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 9
+O	0	0	0
+H	0.759	0.503	-0.001
+H	0.759	-0.503	0.001
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 10
+O	0	0	0
+H	0.759	0.495	-0.088
+H	0.759	-0.495	0.088
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 11
+O	0	0	0
+H	0.759	0.472	-0.173
+H	0.759	-0.472	0.173
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 12
+O	0	0	0
+H	0.759	0.435	-0.252
+H	0.759	-0.435	0.252
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 13
+O	0	0	0
+H	0.759	0.385	-0.324
+H	0.759	-0.385	0.324
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 14
+O	0	0	0
+H	0.759	0.323	-0.386
+H	0.759	-0.323	0.386
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 15
+O	0	0	0
+H	0.759	0.251	-0.436
+H	0.759	-0.251	0.436
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 16
+O	0	0	0
+H	0.759	0.171	-0.473
+H	0.759	-0.171	0.473
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 17
+O	0	0	0
+H	0.759	0.086	-0.496
+H	0.759	-0.086	0.496
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 18
+O	0	0	0
+H	0.759	-0.001	-0.503
+H	0.759	0.001	0.503
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 19
+O	0	0	0
+H	0.759	-0.088	-0.495
+H	0.759	0.088	0.495
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 20
+O	0	0	0
+H	0.759	-0.173	-0.472
+H	0.759	0.173	0.472
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 21
+O	0	0	0
+H	0.759	-0.252	-0.435
+H	0.759	0.252	0.435
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 22
+O	0	0	0
+H	0.759	-0.324	-0.385
+H	0.759	0.324	0.385
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 23
+O	0	0	0
+H	0.759	-0.386	-0.323
+H	0.759	0.386	0.323
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 24
+O	0	0	0
+H	0.759	-0.436	-0.251
+H	0.759	0.436	0.251
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 25
+O	0	0	0
+H	0.759	-0.473	-0.171
+H	0.759	0.473	0.171
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 26
+O	0	0	0
+H	0.759	-0.496	-0.086
+H	0.759	0.496	0.086
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 27
+O	0	0	0
+H	0.759	-0.503	0.001
+H	0.759	0.503	-0.001
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 28
+O	0	0	0
+H	0.759	-0.495	0.088
+H	0.759	0.495	-0.088
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 29
+O	0	0	0
+H	0.759	-0.472	0.173
+H	0.759	0.472	-0.173
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 30
+O	0	0	0
+H	0.759	-0.435	0.252
+H	0.759	0.435	-0.252
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 31
+O	0	0	0
+H	0.759	-0.385	0.324
+H	0.759	0.385	-0.324
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 32
+O	0	0	0
+H	0.759	-0.323	0.386
+H	0.759	0.323	-0.386
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 33
+O	0	0	0
+H	0.759	-0.251	0.436
+H	0.759	0.251	-0.436
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 34
+O	0	0	0
+H	0.759	-0.171	0.473
+H	0.759	0.171	-0.473
+
+3
+	Created by molecuilder on Fri Feb 18 22:39:51 2011, time step 35
+O	0	0	0
+H	0.759	-0.086	0.496
+H	0.759	0.086	-0.496
Index: tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_Y.xyz
===================================================================
--- tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_Y.xyz	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
+++ tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_Y.xyz	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
@@ -0,0 +1,215 @@
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 0
+O	0	0	0
+H	0.759	0	0.504
+H	0.759	0	-0.504
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 1
+O	0.005	0	-0.029
+H	0.546	0	0.704
+H	0.89	0	-0.243
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 2
+O	0.011	0	-0.042
+H	0.417	0	0.773
+H	0.92	0	-0.099
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 3
+O	0.019	0	-0.054
+H	0.278	0	0.819
+H	0.925	0	0.048
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 4
+O	0.029	0	-0.064
+H	0.133	0	0.84
+H	0.904	0	0.193
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 5
+O	0.041	0	-0.073
+H	-0.013	0	0.836
+H	0.858	0	0.333
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 6
+O	0.054	0	-0.079
+H	-0.157	0	0.807
+H	0.789	0	0.462
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 7
+O	0.068	0	-0.083
+H	-0.293	0	0.753
+H	0.698	0	0.578
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 8
+O	0.083	0	-0.084
+H	-0.418	0	0.676
+H	0.588	0	0.676
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 9
+O	0.098	0	-0.083
+H	-0.528	0	0.579
+H	0.463	0	0.753
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 10
+O	0.112	0	-0.079
+H	-0.619	0	0.464
+H	0.327	0	0.807
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 11
+O	0.125	0	-0.073
+H	-0.689	0	0.335
+H	0.183	0	0.837
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 12
+O	0.137	0	-0.065
+H	-0.735	0	0.196
+H	0.036	0	0.842
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 13
+O	0.148	0	-0.055
+H	-0.757	0	0.051
+H	-0.109	0	0.821
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 14
+O	0.157	0	-0.043
+H	-0.753	0	-0.096
+H	-0.249	0	0.775
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 15
+O	0.163	0	-0.03
+H	-0.724	0	-0.24
+H	-0.379	0	0.706
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 16
+O	0.167	0	-0.016
+H	-0.67	0	-0.377
+H	-0.495	0	0.615
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 17
+O	0.168	0	-0.001
+H	-0.593	0	-0.502
+H	-0.593	0	0.505
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 18
+O	0.167	0	0.014
+H	-0.496	0	-0.612
+H	-0.671	0	0.38
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 19
+O	0.163	0	0.028
+H	-0.381	0	-0.703
+H	-0.726	0	0.243
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 20
+O	0.157	0	0.041
+H	-0.252	0	-0.773
+H	-0.756	0	0.099
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 21
+O	0.149	0	0.053
+H	-0.113	0	-0.819
+H	-0.761	0	-0.048
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 22
+O	0.139	0	0.064
+H	0.032	0	-0.841
+H	-0.74	0	-0.194
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 23
+O	0.127	0	0.073
+H	0.179	0	-0.837
+H	-0.694	0	-0.334
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 24
+O	0.114	0	0.079
+H	0.323	0	-0.808
+H	-0.624	0	-0.464
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 25
+O	0.1	0	0.083
+H	0.46	0	-0.754
+H	-0.533	0	-0.58
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 26
+O	0.085	0	0.084
+H	0.585	0	-0.677
+H	-0.423	0	-0.678
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 27
+O	0.07	0	0.083
+H	0.695	0	-0.58
+H	-0.298	0	-0.756
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 28
+O	0.056	0	0.079
+H	0.786	0	-0.465
+H	-0.161	0	-0.811
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 29
+O	0.043	0	0.073
+H	0.856	0	-0.336
+H	-0.017	0	-0.841
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 30
+O	0.031	0	0.065
+H	0.902	0	-0.197
+H	0.13	0	-0.846
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 31
+O	0.02	0	0.055
+H	0.924	0	-0.052
+H	0.276	0	-0.825
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 32
+O	0.011	0	0.043
+H	0.92	0	0.094
+H	0.416	0	-0.779
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 33
+O	0.005	0	0.03
+H	0.891	0	0.238
+H	0.546	0	-0.71
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 34
+O	0.001	0	0.016
+H	0.837	0	0.374
+H	0.662	0	-0.619
+
+3
+	Created by molecuilder on Fri Feb 18 22:40:11 2011, time step 35
+O	-0	0	0.001
+H	0.761	0	0.499
+H	0.761	0	-0.509
Index: tests/regression/Analysis/DipoleAngularCorrelation/testsuite-analysis-dipole-angular-correlation.at
===================================================================
--- tests/regression/Analysis/DipoleAngularCorrelation/testsuite-analysis-dipole-angular-correlation.at	(revision 4fc828b58deb25fc433599e0a2567df1f7b71101)
+++ tests/regression/Analysis/DipoleAngularCorrelation/testsuite-analysis-dipole-angular-correlation.at	(revision 4b8630316b58cd0e54f594244af59c4f9560b633)
@@ -4,9 +4,19 @@
 AT_KEYWORDS([analysis dipole correlation pdb dipole-angular-correlation])
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_X.pdb .], 0)
-AT_CHECK([../../molecuilder -v 4 -i watermulti_X.pdb -o pdb --select-molecules-by-formula H2O --dipole-angular-correlation --bin-start -5 --bin-width 10. --bin-end 184.5 --output-file water_values_X.dat --bin-output-file water_histogram_X.dat], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder -v 4 -i watermulti_X.pdb -o pdb --select-molecules-by-formula H2O --select-molecules-atoms --dipole-angular-correlation --bin-start -5 --bin-width 10. --bin-end 184.5 --output-file water_values_X.dat --bin-output-file water_histogram_X.dat], 0, [stdout], [stderr])
 AT_CHECK([file=water_histogram_X.dat; diff $file ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/post/$file], 0, [ignore], [ignore])
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_Y.pdb .], 0)
-AT_CHECK([../../molecuilder -v 4 -i watermulti_Y.pdb -o pdb --select-molecules-by-formula H2O --dipole-angular-correlation --bin-start -5 --bin-width 10. --bin-end 184.5 --output-file water_values_Y.dat --bin-output-file water_histogram_Y.dat], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder -v 4 -i watermulti_Y.pdb -o pdb --select-molecules-by-formula H2O --select-molecules-atoms --dipole-angular-correlation --bin-start -5 --bin-width 10. --bin-end 184.5 --output-file water_values_Y.dat --bin-output-file water_histogram_Y.dat], 0, [stdout], [stderr])
 AT_CHECK([file=water_histogram_Y.dat; diff $file ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/post/$file], 0, [ignore], [ignore])
 AT_CLEANUP
 
+AT_SETUP([Analysis - dipole angular correlation on XYZs])
+AT_KEYWORDS([analysis dipole correlation xyz dipole-angular-correlation])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_X.xyz .], 0)
+AT_CHECK([../../molecuilder -v 4 -i watermulti_X.xyz -o xyz -I --select-molecules-by-formula H2O --select-molecules-atoms --dipole-angular-correlation --bin-start -5 --bin-width 10. --bin-end 184.5 --output-file water_values_X.dat --bin-output-file water_histogram_X.dat], 0, [stdout], [stderr])
+AT_CHECK([file=water_histogram_X.dat; diff $file ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/post/$file], 0, [ignore], [ignore])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/pre/watermulti_Y.xyz .], 0)
+AT_CHECK([../../molecuilder -v 4 -i watermulti_Y.xyz -o xyz -I --select-molecules-by-formula H2O --select-molecules-atoms --dipole-angular-correlation --bin-start -5 --bin-width 10. --bin-end 184.5 --output-file water_values_Y.dat --bin-output-file water_histogram_Y.dat], 0, [stdout], [stderr])
+AT_CHECK([file=water_histogram_Y.dat; diff $file ${abs_top_srcdir}/tests/regression/Analysis/DipoleAngularCorrelation/post/$file], 0, [ignore], [ignore])
+AT_CLEANUP
+
