Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision 0b50574573487816f0c12002dfdc46008b5003c6)
+++ src/Actions/GlobalListOfActions.hpp	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
@@ -126,4 +126,5 @@
   (ShapeCreateShape) \
   (ShapeRemoveShape) \
+  (ShapeRotateShape) \
   (ShapeTranslateShape)
 
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 0b50574573487816f0c12002dfdc46008b5003c6)
+++ src/Actions/Makefile.am	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
@@ -435,4 +435,5 @@
   Actions/ShapeAction/CreateShapeAction.cpp \
   Actions/ShapeAction/RemoveShapeAction.cpp \
+  Actions/ShapeAction/RotateShapeAction.cpp \
   Actions/ShapeAction/TranslateShapeAction.cpp
 SHAPEACTIONHEADER = \
@@ -440,4 +441,5 @@
   Actions/ShapeAction/CreateShapeAction.hpp \
   Actions/ShapeAction/RemoveShapeAction.hpp \
+  Actions/ShapeAction/RotateShapeAction.hpp \
   Actions/ShapeAction/TranslateShapeAction.hpp
 SHAPEACTIONDEFS = \
@@ -445,4 +447,5 @@
   Actions/ShapeAction/CreateShapeAction.def \
   Actions/ShapeAction/RemoveShapeAction.def \
+  Actions/ShapeAction/RotateShapeAction.def \
   Actions/ShapeAction/TranslateShapeAction.def
 	
Index: src/Actions/ShapeAction/RotateShapeAction.cpp
===================================================================
--- src/Actions/ShapeAction/RotateShapeAction.cpp	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
+++ src/Actions/ShapeAction/RotateShapeAction.cpp	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
@@ -0,0 +1,121 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * RotateShapeAction.cpp
+ *
+ *  Created on: Nov 19, 2012
+ *      Author: ankele
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Shapes/ShapeRegistry.hpp"
+#include "Shapes/ShapeOps.hpp"
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Verbose.hpp"
+
+#include <iostream>
+#include <string>
+
+#include "RotateShapeAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "RotateShapeAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr ShapeRotateShapeAction::performCall() {
+  LOG(1, "Translating shapes in ShapeRegistry.");
+
+  std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes();
+
+  RealSpaceMatrix rotation;
+  rotation.setRotation(params.angle_x.get(), params.angle_y.get(), params.angle_z.get());
+
+  for (unsigned int i=0;i<selectedShapes.size();i++){
+    Shape s = transform(*selectedShapes[i], rotation);
+    std::string name = selectedShapes[i]->getName();
+    s.setName(name);
+    ShapeRegistry::getInstance().removeShape(name);
+    ShapeRegistry::getInstance().addShape(s);
+    ShapeRegistry::getInstance().selectShape(name);
+  }
+
+  return Action::state_ptr(new ShapeRotateShapeState(params));
+}
+
+Action::state_ptr ShapeRotateShapeAction::performUndo(Action::state_ptr _state) {
+  ShapeRotateShapeState *state = assert_cast<ShapeRotateShapeState*>(_state.get());
+
+  std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes();
+
+  RealSpaceMatrix rotation;
+  rotation.setRotation(state->params.angle_x.get(), state->params.angle_y.get(), state->params.angle_z.get());
+  rotation = rotation.invert();
+
+  for (unsigned int i=0;i<selectedShapes.size();i++){
+    Shape s = transform(*selectedShapes[i], rotation);
+    std::string name = selectedShapes[i]->getName();
+    s.setName(name);
+    ShapeRegistry::getInstance().removeShape(name);
+    ShapeRegistry::getInstance().addShape(s);
+    ShapeRegistry::getInstance().selectShape(name);
+  }
+
+  return Action::state_ptr(_state);
+}
+
+Action::state_ptr ShapeRotateShapeAction::performRedo(Action::state_ptr _state){
+  ShapeRotateShapeState *state = assert_cast<ShapeRotateShapeState*>(_state.get());
+
+  std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes();
+
+  RealSpaceMatrix rotation;
+  rotation.setRotation(state->params.angle_x.get(), state->params.angle_y.get(), state->params.angle_z.get());
+
+  for (unsigned int i=0;i<selectedShapes.size();i++){
+    Shape s = transform(*selectedShapes[i], rotation);
+    std::string name = selectedShapes[i]->getName();
+    s.setName(name);
+    ShapeRegistry::getInstance().removeShape(name);
+    ShapeRegistry::getInstance().addShape(s);
+    ShapeRegistry::getInstance().selectShape(name);
+  }
+
+  return Action::state_ptr(_state);
+}
+
+bool ShapeRotateShapeAction::canUndo() {
+  return true;
+}
+
+bool ShapeRotateShapeAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/ShapeAction/RotateShapeAction.def
===================================================================
--- src/Actions/ShapeAction/RotateShapeAction.def	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
+++ src/Actions/ShapeAction/RotateShapeAction.def	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
@@ -0,0 +1,38 @@
+/*
+ * RotateShapeAction.def
+ *
+ *  Created on: Nov 19, 2012
+ *      Author: ankele
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include <boost/filesystem.hpp>
+
+#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
+#define paramtypes (double)(double)(double)(Vector)
+#define paramtokens ("angle-x")("angle-y")("angle-z")("center")
+#define paramdescriptions ("rotation x")("rotation y")("rotation z")("center of rotation")
+#define paramdefaults (PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(Vector(0.,0.,0.)))
+#define paramreferences (angle_x)(angle_y)(angle_z)(center)
+#define paramvalids \
+(DummyValidator<double>()) \
+(DummyValidator<double>()) \
+(DummyValidator<double>()) \
+(DummyValidator<Vector>())
+
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Shape
+#define MENUNAME "shape"
+#define MENUPOSITION 5
+#define ACTIONNAME RotateShape
+#define TOKEN "rotate-shapes"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "rotates selected shapes in ShapeRegistry"
+#undef SHORTFORM
Index: src/Actions/ShapeAction/RotateShapeAction.hpp
===================================================================
--- src/Actions/ShapeAction/RotateShapeAction.hpp	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
+++ src/Actions/ShapeAction/RotateShapeAction.hpp	(revision a2bbb14f9ffbccf2908b0ddcaff8ca3770503097)
@@ -0,0 +1,22 @@
+/*
+ * RotateShapeAction.hpp
+ *
+ *  Created on: Nov 19, 2012
+ *      Author: ankele
+ */
+
+#ifndef ROTATESHAPEACTION_HPP_
+#define ROTATESHAPEACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "RotateShapeAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* ROTATESHAPEACTION_HPP_ */
