Index: src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp	(revision be945c354a323c7dfc428278d0959f40f791b566)
+++ src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp	(revision be945c354a323c7dfc428278d0959f40f791b566)
@@ -0,0 +1,88 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * DipoleAngularCorrelationAction.cpp
+ *
+ *  Created on: May 9, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "analysis_correlation.hpp"
+#include "boundary.hpp"
+#include "linkedcell.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "CodePatterns/Log.hpp"
+#include "element.hpp"
+#include "molecule.hpp"
+#include "periodentafel.hpp"
+#include "LinearAlgebra/Vector.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "Actions/AnalysisAction/DipoleAngularCorrelationAction.hpp"
+
+// and construct the stuff
+#include "DipoleAngularCorrelationAction.def"
+#include "Action_impl_pre.hpp"
+
+/** =========== define the function ====================== */
+Action::state_ptr AnalysisDipoleAngularCorrelationAction::performCall() {
+  //int ranges[3] = {1, 1, 1};
+  ofstream output;
+  ofstream binoutput;
+  string type;
+  BinPairMap *binmap = NULL;
+
+  // obtain information
+  getParametersfromValueStorage();
+
+  // execute action
+  output.open(params.outputname.string().c_str());
+  binoutput.open(params.binoutputname.string().c_str());
+  DipoleAngularCorrelationMap *correlationmap = NULL;
+  std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
+  DoLog(0) && (Log() << Verbose(0) << "There are " << molecules.size() << " selected molecules." << std::endl);
+  ASSERT(!params.periodic, "AnalysisDipoleAngularCorrelationAction() - periodic case not implemented.");
+  correlationmap = DipoleAngularCorrelation(molecules);
+  OutputDipoleAngularCorrelation(&output, correlationmap);
+  binmap = BinData( correlationmap, params.BinWidth, params.BinStart, params.BinEnd );
+  OutputCorrelation ( &binoutput, binmap );
+  delete(binmap);
+  delete(correlationmap);
+  output.close();
+  binoutput.close();
+  return Action::success;
+}
+
+Action::state_ptr AnalysisDipoleAngularCorrelationAction::performUndo(Action::state_ptr _state) {
+  return Action::success;
+}
+
+Action::state_ptr AnalysisDipoleAngularCorrelationAction::performRedo(Action::state_ptr _state){
+  return Action::success;
+}
+
+bool AnalysisDipoleAngularCorrelationAction::canUndo() {
+  return true;
+}
+
+bool AnalysisDipoleAngularCorrelationAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def
===================================================================
--- src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def	(revision be945c354a323c7dfc428278d0959f40f791b566)
+++ src/Actions/AnalysisAction/DipoleAngularCorrelationAction.def	(revision be945c354a323c7dfc428278d0959f40f791b566)
@@ -0,0 +1,30 @@
+/*
+ * DipoleAngularCorrelationAction.def
+ *
+ *  Created on: Aug 25, 2010
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include <string>
+#include <vector>
+
+// i.e. there is an integer with variable name Z that can be found in
+// 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")
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Analysis
+#define MENUNAME "analysis"
+#define MENUPOSITION 3
+#define ACTIONNAME DipoleAngularCorrelation
+#define TOKEN "dipole-correlation"
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "dipole angular correlation analysis between molecules"
+#undef SHORTFORM
Index: src/Actions/AnalysisAction/DipoleAngularCorrelationAction.hpp
===================================================================
--- src/Actions/AnalysisAction/DipoleAngularCorrelationAction.hpp	(revision be945c354a323c7dfc428278d0959f40f791b566)
+++ src/Actions/AnalysisAction/DipoleAngularCorrelationAction.hpp	(revision be945c354a323c7dfc428278d0959f40f791b566)
@@ -0,0 +1,21 @@
+/*
+ * DipoleAngularCorrelationAction.hpp
+ *
+ *  Created on: May 9, 2010
+ *      Author: heber
+ */
+
+#ifndef DIPOLEANGULARCORRELATIONACTION_HPP_
+#define DIPOLEANGULARCORRELATIONACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "Actions/Action.hpp"
+
+#include "DipoleAngularCorrelationAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* DIPOLEANGULARCORRELATIONACTION_HPP_ */
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision d6f8869464bd2208482a0f62cc438db4939fc16d)
+++ src/Actions/Makefile.am	(revision be945c354a323c7dfc428278d0959f40f791b566)
@@ -37,4 +37,5 @@
   
 ANALYSISACTIONSOURCE = \
+  AnalysisAction/DipoleAngularCorrelationAction.cpp \
   AnalysisAction/MolecularVolumeAction.cpp \
   AnalysisAction/PairCorrelationAction.cpp \
@@ -43,4 +44,5 @@
   AnalysisAction/SurfaceCorrelationAction.cpp
 ANALYSISACTIONHEADER = \
+  AnalysisAction/DipoleAngularCorrelationAction.hpp \
   AnalysisAction/MolecularVolumeAction.hpp \
   AnalysisAction/PairCorrelationAction.hpp \
