Index: src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp	(revision 99b87a1a736ed1a74a2c329e71072ba1de294522)
+++ src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp	(revision 870b4b91fe9f0b1046abb0bc933ec99ffab7aed1)
@@ -24,8 +24,10 @@
 #include "linkedcell.hpp"
 #include "CodePatterns/Log.hpp"
+#include "Descriptors/AtomOfMoleculeSelectionDescriptor.hpp"
+#include "Descriptors/MoleculeFormulaDescriptor.hpp"
 #include "Element/element.hpp"
-#include "molecule.hpp"
 #include "Element/periodentafel.hpp"
 #include "LinearAlgebra/Vector.hpp"
+#include "molecule.hpp"
 #include "World.hpp"
 #include "WorldTime.hpp"
@@ -53,20 +55,27 @@
 
   // get selected atoms
-  std::vector<atom*> atoms = World::getInstance().getSelectedAtoms();
-  ASSERT(atoms.size() != 0, "AnalysisDipoleAngularCorrelationAction() - not atoms selected.");
+  std::vector<atom*> old_atom_selection = World::getInstance().getSelectedAtoms();
+  std::vector<molecule*> old_molecule_selection = World::getInstance().getSelectedMolecules();
 
   // get current time step
   const unsigned int oldtime = WorldTime::getTime();
 
-  // obtain zero dipole orientation
+  // select atoms and obtain zero dipole orientation
+  Formula DipoleFormula(params.DipoleFormula);
   World::getInstance().setTime(0);
-  std::map<atomId_t, Vector> ZeroVector = CalculateZeroAngularDipole(atoms);
+  World::getInstance().clearMoleculeSelection(); // TODO: This should be done in setTime or where molecules are re-done
+  World::getInstance().selectAllMolecules(MoleculeByFormula(DipoleFormula));
+  std::vector<molecule *> molecules = World::getInstance().getSelectedMolecules();
+  std::map<atomId_t, Vector> ZeroVector = CalculateZeroAngularDipole(molecules);
 
   // go through each step of common trajectory of all atoms in set
+  World::getInstance().clearAtomSelection();
+  World::getInstance().selectAllAtoms(AtomsByMoleculeSelection());
+  std::vector<atom *> atoms = World::getInstance().getSelectedAtoms();
   range<size_t> timesteps = getMaximumTrajectoryBounds(atoms);
   for (size_t step = 0; step < timesteps.first; ++step) {
     // calculate dipoles relative to zero orientation
     DipoleAngularCorrelationMap *correlationmap = NULL;
-    correlationmap = DipoleAngularCorrelation(atoms, step, ZeroVector, DontResetTime);
+    correlationmap = DipoleAngularCorrelation(DipoleFormula, step, ZeroVector, DontResetTime);
 
     // prepare step string in filename
@@ -102,4 +111,14 @@
   World::getInstance().setTime(oldtime);
 
+  // reset to old selections
+  World::getInstance().clearAtomSelection();
+  BOOST_FOREACH(atom *_atom, old_atom_selection) {
+    World::getInstance().selectAtom(_atom);
+  }
+  World::getInstance().clearMoleculeSelection();
+  BOOST_FOREACH(molecule *_mol, old_molecule_selection) {
+    World::getInstance().selectMolecule(_mol);
+  }
+
   // exit
   return Action::success;
Index: src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def
===================================================================
--- src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def	(revision 99b87a1a736ed1a74a2c329e71072ba1de294522)
+++ src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def	(revision 870b4b91fe9f0b1046abb0bc933ec99ffab7aed1)
@@ -13,9 +13,9 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
-#define paramtypes (double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
-#define paramreferences (BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
-#define paramtokens ("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
-#define paramdescriptions ("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
-#define paramdefaults (NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
+#define paramtypes (std::string)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
+#define paramreferences (DipoleFormula)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
+#define paramtokens ("dipole-angular-correlation")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
+#define paramdescriptions ("formula of molecules to calculate dipole of")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
+#define paramdefaults (NODEFAULT)(NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
 
 // some defines for all the names, you may use ACTION, STATE and PARAMS
