Index: src/Actions/AnalysisAction/CalculateBoundingBoxAction.cpp
===================================================================
--- src/Actions/AnalysisAction/CalculateBoundingBoxAction.cpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * 
- *
- *   This file is part of MoleCuilder.
- *
- *    MoleCuilder is free software: you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation, either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    MoleCuilder is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * CalculateBoundingBoxAction.cpp
- *
- *  Created on: Nov 02, 2011
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Log.hpp"
-
-#include "Box.hpp"
-#include "CodePatterns/Assert.hpp"
-#include "LinearAlgebra/Plane.hpp"
-#include <vector>
-#include <utility>
-#include "World.hpp"
-
-#include <iostream>
-#include <string>
-
-#include "CalculateBoundingBoxAction.hpp"
-
-using namespace MoleCuilder;
-
-// and construct the stuff
-#include "CalculateBoundingBoxAction.def"
-#include "Reaction_impl_pre.hpp"
-
-#include "Reaction_impl.hpp"
-
-/** =========== define the function ====================== */
-doubleVec * AnalysisCalculateBoundingBoxAction::doCalc() {
-  typedef std::pair<Plane,Plane> PairOfPlanes;
-  typedef std::vector<PairOfPlanes> PairOfPlanesVector;
-  const PairOfPlanesVector planes = World::getInstance().getDomain().getBoundingPlanes();
-  doubleVec returnvalues;
-  for (PairOfPlanesVector::const_iterator iter = planes.begin();
-    iter != planes.end(); ++iter) {
-    returnvalues.push_back(fabs(iter->first.getOffset()));
-    returnvalues.push_back(fabs(iter->second.getOffset()));
-  }
-  ASSERT( returnvalues.size() == (size_t)6,
-      "AnalysisCalculateBoundingBoxAction::doCalc() - returnvalues should be of length 6 but is "
-      +toString(returnvalues.size())+".");
-
-  LOG(0, "RESULT: The current bounding box is " << returnvalues << ".");
-
-  return (new doubleVec(returnvalues));
-}
-/** =========== end of function ====================== */
Index: src/Actions/AnalysisAction/CalculateBoundingBoxAction.def
===================================================================
--- src/Actions/AnalysisAction/CalculateBoundingBoxAction.def	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*
- * CalculateBoundingBoxAction.def
- *
- *  Created on: Nov 02, 2011
- *      Author: heber
- */
-
-// all includes and forward declarations necessary for non-integral types below
-#include <vector>
-typedef std::vector<double> doubleVec;
-
-#include "Parameters/Validators/DummyValidator.hpp"
-
-// 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 (NOPARAM_DEFAULT) for each (undefined) default value
-#undef paramtypes
-#undef paramreferences
-#undef paramtokens
-#undef paramdescriptions
-#undef paramdefaults
-#undef paramvalids
-
-// Reaction cannot be undone, hence no state
-
-#define returntype doubleVec
-
-// some defines for all the names, you may use REACTION and PARAMS
-#define CATEGORY Analysis
-#define MENUNAME "analysis"
-#define MENUPOSITION 3
-#define ACTIONNAME CalculateBoundingBox
-#define TOKEN "calculate-bounding-box"
-
-// finally the information stored in the ActionTrait specialization
-#define DESCRIPTION "Calculates the cuboid bounding box of the current domain"
-#undef SHORTFORM
Index: src/Actions/AnalysisAction/CalculateBoundingBoxAction.hpp
===================================================================
--- src/Actions/AnalysisAction/CalculateBoundingBoxAction.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * CalculateBoundingBoxAction.hpp
- *
- *  Created on: Nov 02, 2011
- *      Author: heber
- */
-
-#ifndef CALCULATEBOUNDINGBOXACTION_HPP_
-#define CALCULATEBOUNDINGBOXACTION_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "Actions/Reaction.hpp"
-
-#include "CalculateBoundingBoxAction.def"
-#include "Reaction_impl_header.hpp"
-
-#endif /* CALCULATEBOUNDINGBOXACTION_HPP_ */
Index: src/Actions/AnalysisAction/CalculateCellVolumeAction.cpp
===================================================================
--- src/Actions/AnalysisAction/CalculateCellVolumeAction.cpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * 
- *
- *   This file is part of MoleCuilder.
- *
- *    MoleCuilder is free software: you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation, either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    MoleCuilder is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * CalculateCellVolumeAction.cpp
- *
- *  Created on: Oct 12, 2011
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Log.hpp"
-
-#include "Box.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "World.hpp"
-
-#include <iostream>
-#include <string>
-
-#include "CalculateCellVolumeAction.hpp"
-
-using namespace MoleCuilder;
-
-// and construct the stuff
-#include "CalculateCellVolumeAction.def"
-#include "Reaction_impl_pre.hpp"
-
-#include "Reaction_impl.hpp"
-
-/** =========== define the function ====================== */
-double * AnalysisCalculateCellVolumeAction::doCalc() {
-  // calculate volume from Box
-  Box &B = World::getInstance().getDomain();
-  const RealSpaceMatrix &M = B.getM();
-  const double volume = M.determinant();
-
-  LOG(0, "RESULT: The current box volume is " << volume << ".");
-
-  return (new double(volume));
-}
-/** =========== end of function ====================== */
Index: src/Actions/AnalysisAction/CalculateCellVolumeAction.def
===================================================================
--- src/Actions/AnalysisAction/CalculateCellVolumeAction.def	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/*
- * CalculateCellVolumeAction.def
- *
- *  Created on: Oct 12, 2011
- *      Author: heber
- */
-
-// all includes and forward declarations necessary for non-integral types below
-
-#include "Parameters/Validators/DummyValidator.hpp"
-
-// 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 (NOPARAM_DEFAULT) for each (undefined) default value
-#undef paramtypes
-#undef paramreferences
-#undef paramtokens
-#undef paramdescriptions
-#undef paramdefaults
-#undef paramvalids
-
-// Reaction cannot be undone, hence no state
-
-#define returntype double
-
-// some defines for all the names, you may use REACTION and PARAMS
-#define CATEGORY Analysis
-#define MENUNAME "analysis"
-#define MENUPOSITION 3
-#define ACTIONNAME CalculateCellVolume
-#define TOKEN "calculate-cell-volume"
-
-// finally the information stored in the ActionTrait specialization
-#define DESCRIPTION "Calculates the volume of the simulation domain"
-#undef SHORTFORM
Index: src/Actions/AnalysisAction/CalculateCellVolumeAction.hpp
===================================================================
--- src/Actions/AnalysisAction/CalculateCellVolumeAction.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * CalculateCellVolumeAction.hpp
- *
- *  Created on: Oct 12, 2011
- *      Author: heber
- */
-
-#ifndef CALCULATECELLVOLUMEACTION_HPP_
-#define CALCULATECELLVOLUMEACTION_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "Actions/Reaction.hpp"
-
-#include "CalculateCellVolumeAction.def"
-#include "Reaction_impl_header.hpp"
-
-#endif /* CALCULATECELLVOLUMEACTION_HPP_ */
Index: src/Actions/AnalysisAction/CalculateMolarMassAction.cpp
===================================================================
--- src/Actions/AnalysisAction/CalculateMolarMassAction.cpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * 
- *
- *   This file is part of MoleCuilder.
- *
- *    MoleCuilder is free software: you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation, either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    MoleCuilder is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * CalculateMolarMassAction.cpp
- *
- *  Created on: Nov 02, 2011
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Log.hpp"
-
-#include "Atom/atom.hpp"
-#include "Element/element.hpp"
-#include "World.hpp"
-
-#include <iostream>
-#include <string>
-
-#include "CalculateMolarMassAction.hpp"
-
-using namespace MoleCuilder;
-
-// and construct the stuff
-#include "CalculateMolarMassAction.def"
-#include "Reaction_impl_pre.hpp"
-
-#include "Reaction_impl.hpp"
-
-/** =========== define the function ====================== */
-double * AnalysisCalculateMolarMassAction::doCalc() {
-  double mass = 0.;
-  size_t totalnumber = 0;
-  // calculate volume from Box
-  for(World::AtomSelectionConstIterator iter = World::getInstance().beginAtomSelection();
-      iter != World::getInstance().endAtomSelection();
-      ++iter) {
-    mass += iter->second->getType()->getMass();
-    ++totalnumber;
-  }
-  LOG(0, "RESULT: The mass of " << totalnumber << " selected atoms is " << mass << " atomicmassunit.");
-
-  return (new double(mass));
-}
-/** =========== end of function ====================== */
Index: src/Actions/AnalysisAction/CalculateMolarMassAction.def
===================================================================
--- src/Actions/AnalysisAction/CalculateMolarMassAction.def	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/*
- * CalculateMolarMassAction.def
- *
- *  Created on: Nov 02, 2011
- *      Author: heber
- */
-
-// all includes and forward declarations necessary for non-integral types below
-
-#include "Parameters/Validators/DummyValidator.hpp"
-
-// 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 (NOPARAM_DEFAULT) for each (undefined) default value
-#undef paramtypes
-#undef paramreferences
-#undef paramtokens
-#undef paramdescriptions
-#undef paramdefaults
-#undef paramvalids
-
-// Reaction cannot be undone, hence no state
-
-#define returntype double
-
-// some defines for all the names, you may use REACTION and PARAMS
-#define CATEGORY Analysis
-#define MENUNAME "analysis"
-#define MENUPOSITION 3
-#define ACTIONNAME CalculateMolarMass
-#define TOKEN "calculate-molar-mass"
-
-// finally the information stored in the ActionTrait specialization
-#define DESCRIPTION "Calculates the molar mass of all selected atoms"
-#undef SHORTFORM
Index: src/Actions/AnalysisAction/CalculateMolarMassAction.hpp
===================================================================
--- src/Actions/AnalysisAction/CalculateMolarMassAction.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,22 +1,0 @@
-/*
- * CalculateMolarMassAction.hpp
- *
- *  Created on: Nov 02, 2011
- *      Author: heber
- */
-
-#ifndef CALCULATEMOLARMASSACTION_HPP_
-#define CALCULATEMOLARMASSACTION_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "Actions/Reaction.hpp"
-
-#include "CalculateMolarMassAction.def"
-#include "Reaction_impl_header.hpp"
-
-#endif /* CALCULATEMOLARMASSACTION_HPP_ */
Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ src/Actions/GlobalListOfActions.hpp	(revision cc6e5c6fa2abf74b6087c374278e2a20dc23706e)
@@ -59,7 +59,4 @@
   (ParserSetParserParameters) \
   (ParserSetOutputFormats) \
-  (AnalysisCalculateBoundingBox) \
-  (AnalysisCalculateCellVolume) \
-  (AnalysisCalculateMolarMass) \
   (AnalysisDipoleAngularCorrelation) \
   (AnalysisDipoleCorrelation) \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ src/Actions/Makefile.am	(revision cc6e5c6fa2abf74b6087c374278e2a20dc23706e)
@@ -49,8 +49,4 @@
   Actions/OptionTrait.hpp \
   Actions/Process.hpp \
-  Actions/Reaction.hpp \
-  Actions/Reaction_impl.hpp \
-  Actions/Reaction_impl_header.hpp \
-  Actions/Reaction_impl_pre.hpp \
   Actions/toCLIString.hpp \
   Actions/toPythonString.hpp \
@@ -119,7 +115,4 @@
 
 ANALYSISACTIONSOURCE = \
-  Actions/AnalysisAction/CalculateBoundingBoxAction.cpp \
-  Actions/AnalysisAction/CalculateCellVolumeAction.cpp \
-  Actions/AnalysisAction/CalculateMolarMassAction.cpp \
   Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp \
   Actions/AnalysisAction/DipoleCorrelationAction.cpp \
@@ -130,7 +123,4 @@
   Actions/AnalysisAction/SurfaceCorrelationAction.cpp
 ANALYSISACTIONHEADER = \
-  Actions/AnalysisAction/CalculateBoundingBoxAction.hpp \
-  Actions/AnalysisAction/CalculateCellVolumeAction.hpp \
-  Actions/AnalysisAction/CalculateMolarMassAction.hpp \
   Actions/AnalysisAction/DipoleAngularCorrelationAction.hpp \
   Actions/AnalysisAction/DipoleCorrelationAction.hpp \
@@ -141,7 +131,4 @@
   Actions/AnalysisAction/SurfaceCorrelationAction.hpp
 ANALYSISACTIONDEFS = \
-  Actions/AnalysisAction/CalculateBoundingBoxAction.def \
-  Actions/AnalysisAction/CalculateCellVolumeAction.def \
-  Actions/AnalysisAction/CalculateMolarMassAction.def \
   Actions/AnalysisAction/DipoleAngularCorrelationAction.def \
   Actions/AnalysisAction/DipoleCorrelationAction.def \
Index: src/Actions/Reaction.hpp
===================================================================
--- src/Actions/Reaction.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,93 +1,0 @@
-/*
- * Reaction.hpp
- *
- *  Created on: Oct 13, 2011
- *      Author: heber
- */
-
-#ifndef REACTION_HPP_
-#define REACTION_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "Actions/Action.hpp"
-
-namespace MoleCuilder {
-
-/**
- * A Reaction is an Action with a return value that is set during the call and may be
- * inspected afterwards.
- *
- * This class can be used in the same way as any other Action, but has some special methods
- * for inspecting the result of the calculation.
- */
-template<typename T>
-class Reaction : public Action
-{
-public:
-  Reaction(const ActionTrait &_trait);
-  virtual ~Reaction();
-
-  /**
-   * Reimplemented call method for Action Base class.
-   * Resets the result and then redoes the calculation. Can be used to retrigger calculations
-   * from menu Items or other places.
-   */
-  virtual bool canUndo();
-  virtual bool shouldUndo();
-
-  virtual Action* clone(enum QueryOptions flag = Interactive) const=0;
-
-  virtual void outputAsCLI(std::ostream &ost) const;
-  virtual void outputAsPython(std::ostream &ost, const std::string &prefix) const;
-
-  /**
-   * Does the actual calculation and returns the result.
-   * When the calculation has been done before it is not redone, but the previous cached result is returned.
-   * Call reset to delete the cached value.
-   */
-  virtual T operator()();
-
-  /**
-   * Check if a cached result is available.
-   */
-  virtual bool hasResult() const;
-
-  /**
-   * Get the cached result.
-   * Fails if there is no cached result.
-   */
-  virtual T getResult() const;
-
-  /**
-   * Delete a previously calculated result from the cache.
-   */
-  virtual void reset();
-
-protected:
-  virtual Dialog *fillDialog(Dialog *dialog)=0;
-
-protected:
-  //!> result of the calculation
-  T* result;
-
-  /**
-   * Pure virtual method for implementation of the actual calculation procedure.
-   */
-  virtual T* doCalc()=0;
-private:
-  virtual ActionState::ptr performCall();
-  virtual ActionState::ptr performUndo(ActionState::ptr);
-  virtual ActionState::ptr performRedo(ActionState::ptr);
-
-  //!> states whether result is done or not (i.e. \a result contains valid result
-  bool done;
-};
-
-}
-
-#endif /* REACTION_HPP_ */
Index: src/Actions/Reaction_impl.hpp
===================================================================
--- src/Actions/Reaction_impl.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,104 +1,0 @@
-/*
- * Reaction_impl.hpp
- *
- *  Created on: Oct 13, 2011
- *      Author: heber
- */
-
-#ifndef REACTION_IMPL_HPP_
-#define REACTION_IMPL_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/Assert.hpp"
-
-#include "Actions/Action.hpp"
-
-#include <cassert>
-
-using namespace MoleCuilder;
-
-template<typename T>
-Reaction<T>::Reaction(const ActionTrait &_trait) :
-  Action(_trait),
-  result(0),
-  done(false)
-{}
-
-template<typename T>
-Reaction<T>::~Reaction()
-{
-  delete result;
-}
-
-template<typename T>
-ActionState::ptr Reaction<T>::performCall(){
-  reset();
-  (*this)();
-  return Action::success;
-}
-
-template<typename T>
-ActionState::ptr Reaction<T>::performUndo(ActionState::ptr){
-  ASSERT(0,"Cannot undo a calculation");
-  return Action::success;
-}
-template<typename T>
-ActionState::ptr Reaction<T>::performRedo(ActionState::ptr){
-  ASSERT(0,"Cannot redo a calculation");
-  return Action::success;
-}
-
-template<typename T>
-bool Reaction<T>::canUndo()
-{
-  return false;
-}
-
-template<typename T>
-bool Reaction<T>::shouldUndo()
-{
-  return false;
-}
-
-template<typename T>
-void Reaction<T>::outputAsCLI(std::ostream &ost) const
-{}
-
-template<typename T>
-void Reaction<T>::outputAsPython(std::ostream &ost, const std::string &prefix) const
-{}
-
-// methods for calculation infrastructure
-
-template<typename T>
-T Reaction<T>::operator()(){
-  if(!done){
-    result = doCalc();
-    done = true;
-  }
-  return *result;
-}
-
-template<typename T>
-bool Reaction<T>::hasResult() const {
-  return done;
-}
-
-template<typename T>
-T Reaction<T>::getResult() const {
-  ASSERT(done, "Reaction<T>::getResult() - No result calculated yet.");
-  return *result;
-}
-
-template<typename T>
-void Reaction<T>::reset(){
-  done = false;
-  delete result;
-  result = NULL;
-}
-
-#endif /* REACTION_IMPL_HPP_ */
Index: src/Actions/Reaction_impl_header.hpp
===================================================================
--- src/Actions/Reaction_impl_header.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,255 +1,0 @@
-/*
- * Reaction_impl_header.hpp
- *
- *  Created on: Oct 13, 2011
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/comparison/equal.hpp>
-#include <boost/preprocessor/comparison/not_equal.hpp>
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/debug/assert.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/seq/elem.hpp>
-#include <boost/preprocessor/seq/push_back.hpp>
-#include <boost/preprocessor/seq/seq.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/seq/transform.hpp>
-
-#include <iostream>
-#include <typeinfo>
-
-#include "Actions/ActionTraits.hpp"
-
-// some derived names: if CATEGORY is not given, we don't prefix with it
-#ifdef CATEGORY
-#define REACTION BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Action))
-#define COMMAND BOOST_PP_CAT(CATEGORY, ACTIONNAME)
-#define PARAMS BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Parameters))
-#else
-#define REACTION BOOST_PP_CAT(ACTIONNAME, Action)
-#define COMMAND ACTIONNAME
-#define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters)
-#endif
-// check if no lists given
-#ifndef paramtypes
-#define MAXPARAMTYPES 0
-#else
-#define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes)
-#endif
-
-// check user has given name and category
-#ifndef ACTIONNAME
-ERROR: No "ACTIONNAME" defined in: __FILE__
-#endif
-
-// calculate numbers and check whether all have same size
-#ifdef paramtokens
-BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramtokens)),\
-  ERROR: There are not the same number of "paramtokens" and "paramtypes" in: __FILE__ \
-)
-#endif
-#ifdef paramreferences
-BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramreferences)),\
-  ERROR: There are not the same number of "paramtokens" and "paramreferences" in: __FILE__ \
-)
-#endif
-#ifdef paramdescriptions
-BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramdescriptions)),\
-  ERROR: There are not the same number of "paramtokens" and "paramdescriptions" in: __FILE__ \
-)
-#endif
-
-// check for mandatory defines
-#ifndef DESCRIPTION
-BOOST_PP_ASSERT_MSG(0, \
-    "ERROR: Description is mandatory for Actions, here for REACTION " \
-)
-#endif
-
-// check if paramdefaults is given, otherwise fill list with NODEFAULT
-// this does not work: paramdefaults has to be completely defined before
-// being used within option_print (used as an array there and not as
-// some function call still to be expanded)
-//#define paramdefaults (NODEFAULT)
-//#define tempvalue(z,n,value)
-//  BOOST_PP_CAT(value,(NODEFAULT))
-//BOOST_PP_REPEAT(tempvalue, MAXPARAMTYPES, paramdefaults)
-//#undef tempvalue
-//#else
-
-// if present, check if correct number of arguments
-#ifdef paramdefaults
-BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramdefaults)),\
-  ERROR: There are not the same number of "paramtokens" and "paramdefaults" in: __FILE__ \
-)
-#endif
-
-// print a list of type ref followed by a separator, i.e. "int i;"
-#define type_print(z,n,TYPELIST, VARLIST, separator) \
-  BOOST_PP_SEQ_ELEM(n, TYPELIST) \
-  BOOST_PP_SEQ_ELEM(n, VARLIST)\
-  separator
-
-// print a list of type ref followed, i.e. "int i, double position"
-#define type_list(z,n,TYPELIST, VARLIST) \
-  BOOST_PP_COMMA_IF(n)\
-  BOOST_PP_SEQ_ELEM(n, TYPELIST) \
-  BOOST_PP_SEQ_ELEM(n, VARLIST)
-
-// prints Options.insert
-#ifdef paramdefaults
-#define option_print(z,n,unused, unused2) \
-  tester = Options. insert (\
-      std::pair< std::string, OptionTrait *> ( \
-      BOOST_PP_SEQ_ELEM(n, paramtokens), \
-      new OptionTrait(\
-          BOOST_PP_SEQ_ELEM(n, paramtokens), \
-          &typeid( BOOST_PP_SEQ_ELEM(n, paramtypes) ), \
-          BOOST_PP_SEQ_ELEM(n, paramdescriptions), \
-          std::string( BOOST_PP_SEQ_ELEM(n, paramdefaults) ) )\
-      )\
-  ); \
-  ASSERT(tester.second, "ActionTrait<REACTION>::ActionTrait<REACTION>() option token present twice!");
-#else
-#define option_print(z,n,unused, unused2) \
-  tester = Options. insert (\
-      std::pair< std::string, OptionTrait *> ( \
-      BOOST_PP_SEQ_ELEM(n, paramtokens), \
-      new OptionTrait(\
-          BOOST_PP_SEQ_ELEM(n, paramtokens), \
-          &typeid( BOOST_PP_SEQ_ELEM(n, paramtypes) ), \
-          BOOST_PP_SEQ_ELEM(n, paramdescriptions), \
-          NODEFAULT )\
-      )\
-  ); \
-  ASSERT(tester.second, "ActionTrait<REACTION>::ActionTrait<REACTION>() option token present twice!");
-#endif
-
-namespace MoleCuilder {
-
-#ifndef returntype
-BOOST_PP_ASSERT_MSG(0,\
-  ERROR: No returntype is defined in __FILE__ \
-)
-#endif
-#define RETURNTYPE returntype
-
-// set the return type
-RETURNTYPE COMMAND(
-#if defined paramtypes && defined paramreferences
-#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-    );
-
-class REACTION;
-
-template <>
-class ActionTraits<REACTION> : public ActionTrait {
-public:
-  ActionTraits() :
-#ifndef SHORTFORM
-    ActionTrait(OptionTrait(TOKEN, &typeid(void), DESCRIPTION, std::string()))
-#else
-    ActionTrait(OptionTrait(TOKEN, &typeid(void), DESCRIPTION, std::string(), SHORTFORM))
-#endif /* SHORTFORM */
-  {
-  // initialize remainder of action info
-#ifdef MENUNAME
-    MenuTitle = MENUNAME;
-#endif
-#ifdef MENUPOSITION
-    MenuPosition = MENUPOSITION;
-#endif
-
-    // initialize action's options
-    std::pair< ActionTrait::options_iterator, bool > tester;
-#ifdef paramtokens
-#define BOOST_PP_LOCAL_MACRO(n) option_print(~, n, ~, )
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-    // associate action's short form also with option
-#ifdef SHORTFORM
-    if (Options.find(TOKEN) != Options.end())
-      Options[TOKEN]->setShortForm(std::string(SHORTFORM));
-#endif /* SHORTFORM */
-    //std::cout << "ActionTraits<" << BOOST_PP_STRINGIZE(REACTION) << ">::ActionTraits() on instance " << this << " with " << getName() << ", type " << getTypeName() << " and description " << getDescription() << std::endl;
-  }
-
-  virtual ~ActionTraits() {
-    //std::cout << "ActionTraits<" << BOOST_PP_STRINGIZE(REACTION) << ">::~ActionTraits() on instance " << this << " with name " << getName() << " called." << std::endl;
-  }
-};
-
-class REACTION : public Reaction< RETURNTYPE > {
-  friend RETURNTYPE COMMAND(
-  #if defined paramtypes && defined paramreferences
-  #define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
-  #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-  #include BOOST_PP_LOCAL_ITERATE()
-  #endif
-  );
-
-public:
-  REACTION();
-  virtual ~REACTION();
-
-  Action* clone(enum QueryOptions flag = Interactive) const;
-
-  void outputAsCLI(std::ostream &ost) const;
-  void outputAsPython(std::ostream &ost, const std::string &prefix) const;
-
-  virtual RETURNTYPE * doCalc();
-
-  struct PARAMS : ActionParameters {
-  #if defined paramtypes && defined paramreferences
-  #define BOOST_PP_LOCAL_MACRO(n) type_print(~, n, paramtypes, paramreferences, ;)
-  #define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-  #include BOOST_PP_LOCAL_ITERATE()
-  #endif
-  } params;
-
-protected:
-  virtual Dialog * fillDialog(Dialog*);
-};
-
-}
-
-#undef paramtypes
-#undef paramtokens
-#undef paramreferences
-#undef paramdescriptions
-#undef paramdefaults
-#undef MAXPARAMTYPES
-
-#undef returntype
-#undef RETURNTYPE
-
-#undef option_print
-#undef type_print
-#undef type_list
-
-#undef REACTION
-#undef COMMAND
-#undef COMMANDFULL
-#undef PARAMS
-
-#undef ACTIONNAME
-#undef CATEGORY
-#undef MENUNAME
-#undef MENUPOSITION
-#undef TOKEN
-
-#undef DESCRIPTION
-#undef SHORTFORM
Index: src/Actions/Reaction_impl_pre.hpp
===================================================================
--- src/Actions/Reaction_impl_pre.hpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,342 +1,0 @@
-/*
- * Reaction_impl.hpp
- *
- *  Created on: Oct 13, 2011
- *      Author: heber
- */
-
-/** These macros define the following functions, necessary but repetitive for
- * every Action:
- *  -# Dialog* fillDialog()
- *  -# action command (e.g. AnalysisMolecularVolume() )
- *  -# void getParametersfromValuStorage()
- *  -# struct Action...Parameters
- *
- *  For this, the user has the define the following values, each with
- *  parenthesis, for the values/parameters the action needs
- *  -# paramtypes, e.g. (int)(double)
- *  -# paramtokens, e.g. ("Z")("length")
- *  -# paramreferences, e.g. (Z)(length)
- *  and for additional values/parameters to save in the state
- *  -# statetypes, e.g. (int)(double)
- *  -# statereferences, e.g. (Z)(length)
- *  and the name and category of the action
- *  -# CATEGORY, e.g. Analysis
- *  -# ACTIONNAME, e.g. MolecularVolume
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/comparison/equal.hpp>
-#include <boost/preprocessor/comparison/not_equal.hpp>
-#include <boost/preprocessor/debug/assert.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/seq/elem.hpp>
-#include <boost/preprocessor/seq/seq.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/seq/transform.hpp>
-
-#include "Actions/ActionQueue.hpp"
-#include "Actions/toCLIString.hpp"
-#include "Actions/toPythonString.hpp"
-
-// some derived names: if CATEGORY is not given, we don't prefix with it
-#ifdef CATEGORY
-#define REACTION BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Action))
-#define COMMAND BOOST_PP_CAT(CATEGORY, ACTIONNAME)
-#define STATE BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, State))
-#define PARAMS BOOST_PP_CAT(CATEGORY, BOOST_PP_CAT(ACTIONNAME, Parameters))
-#else
-#define REACTION BOOST_PP_CAT(ACTIONNAME, Action)
-#define COMMAND ACTIONNAME
-#define STATE BOOST_PP_CAT(ACTIONNAME, State)
-#define PARAMS BOOST_PP_CAT(ACTIONNAME, Parameters)
-#endif
-
-// check if no lists given
-#ifndef paramtypes
-#define MAXPARAMTYPES 0
-#else
-#define MAXPARAMTYPES BOOST_PP_SEQ_SIZE(paramtypes)
-#endif
-#ifndef statetypes
-#define MAXSTATETYPES 0
-#else
-#define MAXSTATETYPES BOOST_PP_SEQ_SIZE(statetypes)
-#endif
-
-// check user has given name and category
-#ifndef ACTIONNAME
-ERROR: No "ACTIONNAME" defined in: __FILE__
-#endif
-
-// calculate numbers and check whether all have same size
-#ifdef paramtokens
-BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramtokens)),\
-  ERROR: There are not the same number of "paramtokens" and "paramtypes" in: __FILE__ \
-)
-#endif
-#ifdef paramreferences
-BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXPARAMTYPES, BOOST_PP_SEQ_SIZE(paramreferences)),\
-  ERROR: There are not the same number of "paramtokens" and "paramreferences" in: __FILE__ \
-)
-#endif
-
-#ifdef statetypes
-BOOST_PP_ASSERT_MSG(BOOST_PP_EQUAL(MAXSTATETYPES, BOOST_PP_SEQ_SIZE(statereferences)),\
-  ERROR: There are not the same number of "statetypes" and "statereferences" in: __FILE__ \
-)
-#endif
-
-// set the return type
-#ifndef returntype
-BOOST_PP_ASSERT_MSG(0,\
-  ERROR: No returntype is defined in __FILE__ \
-)
-#endif
-#define RETURNTYPE returntype
-
-// print a list of type ref followed by a separator, i.e. "int i;"
-#define initialiser_print(z,n,initialiserlist) \
-  BOOST_PP_SEQ_ELEM(n, initialiserlist) \
-  (BOOST_PP_CAT(_, BOOST_PP_SEQ_ELEM(n, initialiserlist))),
-
-// print a list of ref(_ref) followed by a separator, i.e. "id(_id),"
-#define type_print(z,n,TYPELIST, VARLIST, separator) \
-  BOOST_PP_SEQ_ELEM(n, TYPELIST) \
-  BOOST_PP_SEQ_ELEM(n, VARLIST)\
-  separator
-
-// print a list of type ref followed, i.e. "int i, double position"
-#define type_list(z,n,TYPELIST,VARLIST) \
-  BOOST_PP_COMMA_IF(n)\
-  BOOST_PP_SEQ_ELEM(n, TYPELIST) \
-  BOOST_PP_SEQ_ELEM(n, VARLIST)
-
-// prints dialog->query calls for paramtypes with tokens
-#define dialog_print(z,n,unused) \
-  dialog->query<\
-  BOOST_PP_SEQ_ELEM(n, paramtypes)\
-  >(\
-  BOOST_PP_SEQ_ELEM(n, paramtokens)\
-  , Traits.getDescription()\
-  );
-
-// prints command line call for this Action for paramtypes with tokens
-#define outputAsCLI_print(z,n,output) \
-    output << \
-    BOOST_PP_IF(n, " --", "--") \
-    << \
-    BOOST_PP_SEQ_ELEM(n, paramtokens) \
-    << " " << toCLIString(params. \
-        BOOST_PP_SEQ_ELEM(n, paramreferences) \
-        .get());
-
-// prints if statement to check two strings (paramtokens[n] vs. TOKEN)
-#define checkpresenttoken_print(z, n, TOKEN, booltoken) \
-    if ( std::string(\
-        BOOST_PP_SEQ_ELEM(n, paramtokens) )\
-        == getName()) \
-        booltoken = false;
-
-// prints command line call for this Action for paramtypes with tokens
-#define outputAsPython_print(z,n,output) \
-    output << \
-    BOOST_PP_IF(n, ", ", "") \
-    << "\"" << toPythonString(params. \
-        BOOST_PP_SEQ_ELEM(n, paramreferences) \
-        .get()) \
-    << "\"";
-
-// prints set/queryCurrentValue (command) for paramreferences and paramtokens
-#define value_print(z, n, container, prefix) \
-  prefix \
-  BOOST_PP_SEQ_ELEM(n, container)\
-  .set(\
-  BOOST_PP_SEQ_ELEM(n, container)\
-  );
-
-// prints set/queryCurrentValue (command) for paramreferences and paramtokens
-#define valuetype_print(z,n,container, types, prefix) \
-  prefix \
-  BOOST_PP_SEQ_ELEM(n, container) \
-  .setAsString( \
-  BOOST_PP_SEQ_ELEM(n, container) \
-  );
-
-#define stringtype std::string
-
-#define type2string(s, data, elem) \
-	stringtype
-
-
-#include "Actions/ActionRegistry.hpp"
-//#include "Actions/ActionTraits.hpp"
-#include "UIElements/Dialog.hpp"
-
-#ifdef paramtokens
-#define statenecessary 1
-#endif
-#ifndef statetokens
-#define statenecessary 1
-#endif
-
-namespace MoleCuilder {
-
-// =========== constructor ===========
-REACTION::REACTION () :
-  Reaction< RETURNTYPE >(ActionTraits< REACTION >())
-{}
-
-// =========== destructor ===========
-REACTION::~REACTION ()
-{
-  //std::cout << "Action REACTION is being destroyed." << std::endl;
-}
-
-// =========== clone Action ===========
-Action* REACTION::clone(enum QueryOptions flag) const
-{
-  if (flag == Interactive)
-    return new REACTION();
-  else
-    return new REACTION(*this);
-}
-
-// =========== fill a dialog ===========
-Dialog* REACTION::fillDialog(Dialog *dialog) {
-        ASSERT(dialog,"No Dialog given when filling actionname's dialog");
-#if BOOST_PP_EQUAL(MAXPARAMTYPES,0)
-        dialog->queryEmpty(TOKEN, Traits.getDescription());
-#else
-#define BOOST_PP_LOCAL_MACRO(n) dialog_print(~, n, ~)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-        return dialog;
-};
-
-// =========== output as CLI ===========
-void REACTION::outputAsCLI(std::ostream &ost) const {
-  // check whether TOKEN is also an option
-  // is a bit ugly as preprocessor cannot compare strings
-  bool status = true;
-#if defined paramtokens && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) checkpresenttoken_print(~, n, TOKEN, status)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-  if (status) {
-    ost << "--" << TOKEN;
-#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-    ost << " ";
-#endif
-  }
-  // then print option along with each argument if set
-#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) outputAsCLI_print(~, n, ost)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-}
-
-// =========== output as PYTHTON ===========
-void REACTION::outputAsPython(std::ostream &ost, const std::string &prefix) const {
-  // print prefix and action command
-  ost << prefix << "." << BOOST_PP_STRINGIZE( COMMAND ) << "(";
-  // then print option along with each argument if set
-#if defined paramtypes && defined paramreferences && BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) outputAsCLI_print(~, n, ost)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-  ost << ")" << std::endl;
-}
-
-// =========== command for calling action directly ===========
-RETURNTYPE COMMAND(
-#if defined paramtypes && defined paramreferences
-#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, paramtypes, paramreferences)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-)
-{
-  Action *ToCall = ActionQueue::getInstance().getActionByName( TOKEN ); //->clone(params);
-  //REACTION::PARAMS params;
-#if BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) value_print(~, n, setCurrentValue, )
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-  ActionQueue::getInstance().queueAction( ToCall, Action::NonInteractive);
-  RETURNTYPE result;
-  try {
-    const Reaction< RETURNTYPE > & resultaction =
-        static_cast<const Reaction< RETURNTYPE > &>(ActionQueue::getInstance().getLastAction());
-    ASSERT( resultaction.hasResult (),
-        " _COMMAND - result is not done yet?");
-    result = resultaction.getResult();
-  } ASSERT_NOCATCH("  COMMAND - static cast to Reaction type failed.");
-  return result;
-};
-
-RETURNTYPE BOOST_PP_CAT( COMMAND, _stringargs)(
-#if defined paramtypes && defined paramreferences
-#define BOOST_PP_LOCAL_MACRO(n) type_list(~, n, BOOST_PP_SEQ_TRANSFORM( type2string, , paramtypes), paramreferences)
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-	) {
-  Action *ToCall = ActionQueue::getInstance().getActionByName( TOKEN ); //->clone(params);
-  //REACTION::PARAMS params;
-#if BOOST_PP_NOT_EQUAL(MAXPARAMTYPES,0)
-#define BOOST_PP_LOCAL_MACRO(n) valuetype_print(~, n, setCurrentValueByString, )
-#define BOOST_PP_LOCAL_LIMITS  (0, MAXPARAMTYPES-1)
-#include BOOST_PP_LOCAL_ITERATE()
-#endif
-  ActionQueue::getInstance().queueAction( ToCall, Action::NonInteractive);
-  RETURNTYPE result;
-  try {
-    const Reaction< RETURNTYPE > & resultaction =
-        static_cast<const Reaction< RETURNTYPE > &>(ActionQueue::getInstance().getLastAction());
-    ASSERT( resultaction.hasResult (),
-        " _COMMAND - result is not done yet?");
-    result = resultaction.getResult();
-  } ASSERT_NOCATCH("  COMMAND - static cast to Reaction type failed.");
-  return result;
-};
-
-}
-
-// free up defines
-#undef paramtypes
-#undef paramtokens
-#undef paramreferences
-#undef MAXPARAMTYPES
-
-#undef returntype
-#undef RETURNTYPE
-
-#undef type2string
-#undef stringtype
-#undef initialiser_print
-#undef type_print
-#undef type_list
-#undef dialog_print
-#undef value_print
-#undef valuetype_print
-
-#undef REACTION
-#undef COMMAND
-#undef PARAMS
-#undef STATE
-
-#undef ACTIONNAME
-#undef CATEGORY
-#undef TOKEN
Index: src/Actions/pyMoleCuilder.cpp
===================================================================
--- src/Actions/pyMoleCuilder.cpp	(revision 0d416866348175de64612b7f88582c36f2167054)
+++ 	(revision )
@@ -1,147 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * 
- *
- *   This file is part of MoleCuilder.
- *
- *    MoleCuilder is free software: you can redistribute it and/or modify
- *    it under the terms of the GNU General Public License as published by
- *    the Free Software Foundation, either version 2 of the License, or
- *    (at your option) any later version.
- *
- *    MoleCuilder is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *    GNU General Public License for more details.
- *
- *    You should have received a copy of the GNU General Public License
- *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * pyMoleCuilder.cpp
- *
- *  Created on: Sep 21, 2011
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <boost/python.hpp>
-#include <boost/python/module.hpp>
-#include <boost/python/args.hpp>
-
-#include "CodePatterns/MemDebug.hpp"
-#include "CodePatterns/toString.hpp"
-
-//!> define all present actions
-#include "GlobalListOfActions.hpp"
-
-//!> python wrapping for all of these actions
-#include "AllActionPython.hpp"
-
-#include "cleanUp.hpp"
-
-namespace MoleCuilder {
-
-namespace detail {
-
-void module_exit()
-{
-  // save everything
-  std::cout << "Saving." << std::endl;
-  saveAll();
-  // purge everything
-  std::cout << "Cleaning memory." << std::endl;
-  cleanUp();
-}
-
-void module_reinit()
-{
-  // save everything
-  std::cout << "Saving." << std::endl;
-  saveAll();
-  // purge everything
-  std::cout << "Cleaning static instances from memory." << std::endl;
-  purgeStaticInstances();
-  // need to init the history before any action is created
-  std::cout << "Reinitializing." << std::endl;
-}
-
-} /* namespace detail */
-
-namespace PythonTypes {
-
-inline void IndexError(){
-    PyErr_SetString(PyExc_IndexError, "Index out of range");
-    boost::python::throw_error_already_set();
-}
-
-template<class T>
-struct vec_item{
-    typedef typename T::value_type V;
-    static V& get(T& x, int i){
-        static V nothing;
-        if(i < 0) i += x.size();
-        if(i >= 0 && i < int(x.size())) return x[i];
-        IndexError();
-        return nothing;
-    }
-    static void set(T& x, int i, V const& v){
-        if(i < 0) i += x.size();
-        if(i >= 0 && i < int(x.size())) x[i] = v;
-        else IndexError();
-    }
-    static void del(T& x, int i){
-        if(i < 0) i += x.size();
-        if(i >= 0 && i < int(x.size())) x.erase(x.begin() + i);
-        else IndexError();
-    }
-    static void add(T& x, V const& v){
-        x.push_back(v);
-    }
-};
-
-
-} /* namespace PythonTypes */
-} /* namespace MoleCuilder */
-
-BOOST_PYTHON_MODULE(pyMoleCuilder)
-{
-  // from this moment on, we need to be sure to deeinitialize in the correct order
-  // this is handled by the cleanup function
-  atexit(MoleCuilder::detail::module_exit);
-
-  // set the docstring of the current module scope
-  boost::python::scope().attr("__doc__") = "pyMolecuilder are the python bindings to all Actions of the program suite MoleCuilder.\n\nMoleCuilder is a program to build molecular (dynamics) worlds, allowing you indefinite manipulation, control and analysis over the atoms and molecules within a simulation domain.";
-
-  boost::python::def("reinit", MoleCuilder::detail::module_reinit, "Reinitializes the internal state of the python module as if it had been freshly imported, saves all input files beforehand.");
-
-  // STL Vectors:
-  // doubleVec
-  boost::python::class_< std::vector< double > >("PythonType_doubleVec")
-      .def("__len__", &std::vector< double >::size)
-      .def("clear", &std::vector< double >::clear)
-      .def("append", &MoleCuilder::PythonTypes::vec_item< std::vector< double > >::add,
-            boost::python::with_custodian_and_ward<1, 2>()) // let container keep value
-      .def("__getitem__", &MoleCuilder::PythonTypes::vec_item< std::vector< double > >::get,
-           boost::python::return_value_policy<boost::python::copy_non_const_reference>())
-      .def("__setitem__", &MoleCuilder::PythonTypes::vec_item< std::vector< double > >::set,
-           boost::python::with_custodian_and_ward<1,2>()) // to let container keep value
-      .def("__delitem__", &MoleCuilder::PythonTypes::vec_item< std::vector< double > >::del)
-      .def("__iter__", boost::python::iterator< std::vector< double > >())
-  ;
-
-
-#define export_print(z,n,list) \
-	BOOST_PP_CAT(export_, BOOST_PP_SEQ_ELEM(n, list))();
-#define BOOST_PP_LOCAL_MACRO(n) export_print(~, n, GLOBALLISTOFACTIONS)
-#define BOOST_PP_LOCAL_LIMITS  (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(GLOBALLISTOFACTIONS)))
-#include BOOST_PP_LOCAL_ITERATE()
-#undef instance_print  
-}
