Index: src/Actions/AtomAction/TranslateAction.cpp
===================================================================
--- src/Actions/AtomAction/TranslateAction.cpp	(revision 34c338bb9488bd56607ec1c6e8571df32ba115d2)
+++ src/Actions/AtomAction/TranslateAction.cpp	(revision 34c338bb9488bd56607ec1c6e8571df32ba115d2)
@@ -0,0 +1,107 @@
+/*
+ * TranslateAction.cpp
+ *
+ *  Created on: May 10, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/AtomAction/TranslateAction.hpp"
+#include "Actions/ActionRegistry.hpp"
+#include "Helpers/Log.hpp"
+#include "atom.hpp"
+#include "LinearAlgebra/Vector.hpp"
+#include "Helpers/Verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/ValueStorage.hpp"
+
+/****** AtomTranslateAction *****/
+
+// memento to remember the state when undoing
+
+class AtomTranslateState : public ActionState {
+public:
+  AtomTranslateState(std::vector<atom*> _selectedAtoms, Vector &_v) :
+    selectedAtoms(_selectedAtoms),
+    v(_v)
+  {}
+  std::vector<atom*> selectedAtoms;
+  Vector v;
+};
+
+const char AtomTranslateAction::NAME[] = "translate-atoms";
+
+AtomTranslateAction::AtomTranslateAction() :
+  Action(NAME)
+{}
+
+AtomTranslateAction::~AtomTranslateAction()
+{}
+
+void AtomTranslate(Vector &x) {
+  ValueStorage::getInstance().setCurrentValue(AtomTranslateAction::NAME, x);
+  ActionRegistry::getInstance().getActionByName(AtomTranslateAction::NAME)->call(Action::NonInteractive);
+};
+
+Dialog* AtomTranslateAction::fillDialog(Dialog *dialog) {
+  ASSERT(dialog,"No Dialog given when filling action dialog");
+
+  dialog->queryVector(NAME, false, ValueStorage::getInstance().getDescription(NAME));
+
+  return dialog;
+}
+
+Action::state_ptr AtomTranslateAction::performCall() {
+  Vector v;
+  std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms();
+
+  ValueStorage::getInstance().queryCurrentValue(NAME, v);
+
+  // TODO: use AtomSet::translate
+  for (std::vector<atom *>::iterator iter = selectedAtoms.begin(); iter != selectedAtoms.end(); ++iter) {
+    *(*iter) += v;
+  }
+  return Action::state_ptr(new AtomTranslateState(selectedAtoms, v));
+}
+
+Action::state_ptr AtomTranslateAction::performUndo(Action::state_ptr _state) {
+  AtomTranslateState *state = assert_cast<AtomTranslateState*>(_state.get());
+
+  for (std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter) {
+    *(*iter) -= state->v;
+  }
+
+  return Action::state_ptr(new AtomTranslateState(state->selectedAtoms, state->v));
+}
+
+Action::state_ptr AtomTranslateAction::performRedo(Action::state_ptr _state){
+  AtomTranslateState *state = assert_cast<AtomTranslateState*>(_state.get());
+
+  for (std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter) {
+    *(*iter) += state->v;
+  }
+
+  return Action::state_ptr(new AtomTranslateState(state->selectedAtoms, state->v));
+}
+
+bool AtomTranslateAction::canUndo() {
+  return true;
+}
+
+bool AtomTranslateAction::shouldUndo() {
+  return true;
+}
+
+const string AtomTranslateAction::getName() {
+  return NAME;
+}
Index: src/Actions/AtomAction/TranslateAction.hpp
===================================================================
--- src/Actions/AtomAction/TranslateAction.hpp	(revision 34c338bb9488bd56607ec1c6e8571df32ba115d2)
+++ src/Actions/AtomAction/TranslateAction.hpp	(revision 34c338bb9488bd56607ec1c6e8571df32ba115d2)
@@ -0,0 +1,40 @@
+/*
+ * TranslateAction.hpp
+ *
+ *  Created on: May 10, 2010
+ *      Author: heber
+ */
+
+#ifndef TRANSLATEACTION_HPP
+#define TRANSLATEACTION_HPP
+
+#include "Actions/Action.hpp"
+#include "LinearAlgebra/Vector.hpp"
+
+class MoleculeListClass;
+
+void AtomTranslate(Vector &x, bool periodic);
+
+class AtomTranslateAction : public Action {
+  friend void AtomTranslate(Vector &x);
+
+public:
+  AtomTranslateAction();
+  virtual ~AtomTranslateAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+protected:
+  virtual Dialog * fillDialog(Dialog *dialog);
+private:
+  virtual Action::state_ptr performCall();
+  virtual Action::state_ptr performUndo(Action::state_ptr);
+  virtual Action::state_ptr performRedo(Action::state_ptr);
+
+  static const char NAME[];
+};
+
+
+#endif // TRANSLATEACTION_HPP
