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
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 75a80fa17f1d93225b82f8ef166306e615a37e33)
+++ src/Actions/Makefile.am	(revision 34c338bb9488bd56607ec1c6e8571df32ba115d2)
@@ -50,9 +50,11 @@
   AtomAction/AddAction.cpp \
   AtomAction/ChangeElementAction.cpp \
-  AtomAction/RemoveAction.cpp
+  AtomAction/RemoveAction.cpp \
+  AtomAction/TranslateAction.cpp
 ATOMACTIONHEADER = \
   AtomAction/AddAction.hpp \
   AtomAction/ChangeElementAction.hpp \
-  AtomAction/RemoveAction.cpp
+  AtomAction/RemoveAction.cpp \
+  AtomAction/TranslateAction.hpp
 
 CMDACTIONSOURCE = \
@@ -92,5 +94,4 @@
   MoleculeAction/SaveTemperatureAction.cpp \
   MoleculeAction/SuspendInWaterAction.cpp \
-  MoleculeAction/TranslateAction.cpp \
   MoleculeAction/VerletIntegrationAction.cpp
 MOLECULEACTIONHEADER = \
@@ -106,5 +107,4 @@
   MoleculeAction/SaveTemperatureAction.hpp \
   MoleculeAction/SuspendInWaterAction.hpp \
-  MoleculeAction/TranslateAction.hpp \
   MoleculeAction/VerletIntegrationAction.hpp
                  
Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision 75a80fa17f1d93225b82f8ef166306e615a37e33)
+++ src/Actions/MapOfActions.cpp	(revision 34c338bb9488bd56607ec1c6e8571df32ba115d2)
@@ -42,4 +42,5 @@
 #include "Actions/AtomAction/ChangeElementAction.hpp"
 #include "Actions/AtomAction/RemoveAction.hpp"
+#include "Actions/AtomAction/TranslateAction.hpp"
 #include "Actions/CmdAction/BondLengthTableAction.hpp"
 #include "Actions/CmdAction/ElementDbAction.hpp"
@@ -62,5 +63,4 @@
 #include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
 #include "Actions/MoleculeAction/SuspendInWaterAction.hpp"
-#include "Actions/MoleculeAction/TranslateAction.hpp"
 #include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
 #include "Actions/ParserAction/LoadXyzAction.hpp"
@@ -232,5 +232,5 @@
   DescriptionMap["surface-correlation"] = "pair correlation analysis between element and surface";
   DescriptionMap["suspend-in-water"] = "suspend the given molecule in water such that in the domain the mean density is as specified";
-  DescriptionMap["translate-mol"] = "translate molecule by given vector";
+  DescriptionMap["translate-atoms"] = "translate all selected atoms by given vector";
   DescriptionMap["unselect-all-atoms"] = "unselect all atoms";
   DescriptionMap["unselect-all-molecules"] = "unselect all molecules";
@@ -302,5 +302,5 @@
   ShortFormMap["subgraph-dissect"] = "I";
   ShortFormMap["suspend-in-water"] = "u";
-  ShortFormMap["translate-mol"] = "t";
+  ShortFormMap["translate-atoms"] = "t";
   ShortFormMap["verbose"] = "v";
   ShortFormMap["verlet-integrate"] = "P";
@@ -355,5 +355,5 @@
   TypeMap["surface-correlation"] = &typeid(void);
   TypeMap["suspend-in-water"] = &typeid(double);
-  TypeMap["translate-mol"] = &typeid(VectorValue);
+  TypeMap["translate-atoms"] = &typeid(VectorValue);
   TypeMap["unselect-all-atoms"] = &typeid(void);
   TypeMap["unselect-all-molecules"] = &typeid(void);
@@ -432,4 +432,5 @@
   MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "change-element") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "remove-atom") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "translate-atoms") );
 
   MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "bond-table") );
@@ -454,5 +455,4 @@
   MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-temperature") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "suspend-in-water") );
-  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "translate-mol") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "verlet-integrate") );
 
@@ -543,5 +543,5 @@
   generic.insert("surface-correlation");
   generic.insert("suspend-in-water");
-  generic.insert("translate-mol");
+  generic.insert("translate-atoms");
   generic.insert("unselect-all-atoms");
   generic.insert("unselect-all-molecules");
@@ -835,4 +835,5 @@
   new AtomChangeElementAction();
   new AtomRemoveAction();
+  new AtomTranslateAction();
 
   new CommandLineBondLengthTableAction();
@@ -858,5 +859,4 @@
   new MoleculeSaveTemperatureAction();
   new MoleculeSuspendInWaterAction();
-  new MoleculeTranslateAction();
   new MoleculeVerletIntegrationAction();
 
Index: c/Actions/MoleculeAction/TranslateAction.cpp
===================================================================
--- src/Actions/MoleculeAction/TranslateAction.cpp	(revision 75a80fa17f1d93225b82f8ef166306e615a37e33)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/*
- * TranslateAction.cpp
- *
- *  Created on: May 10, 2010
- *      Author: heber
- */
-
-#include "Helpers/MemDebug.hpp"
-
-#include "Actions/MoleculeAction/TranslateAction.hpp"
-#include "Actions/ActionRegistry.hpp"
-#include "Helpers/Log.hpp"
-#include "molecule.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"
-
-/****** MoleculeTranslateAction *****/
-
-// memento to remember the state when undoing
-
-//class MoleculeTranslateState : public ActionState {
-//public:
-//  MoleculeTranslateState(molecule* _mol,std::string _lastName) :
-//    mol(_mol),
-//    lastName(_lastName)
-//  {}
-//  molecule* mol;
-//  std::string lastName;
-//};
-
-const char MoleculeTranslateAction::NAME[] = "translate-mol";
-
-MoleculeTranslateAction::MoleculeTranslateAction() :
-  Action(NAME)
-{}
-
-MoleculeTranslateAction::~MoleculeTranslateAction()
-{}
-
-void MoleculeTranslate(Vector &x, bool periodic) {
-  ValueStorage::getInstance().setCurrentValue(MoleculeTranslateAction::NAME, x);
-  ValueStorage::getInstance().setCurrentValue("periodic", periodic);
-  ActionRegistry::getInstance().getActionByName(MoleculeTranslateAction::NAME)->call(Action::NonInteractive);
-};
-
-Dialog* MoleculeTranslateAction::fillDialog(Dialog *dialog) {
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-
-  dialog->queryVector(NAME, false, ValueStorage::getInstance().getDescription(NAME));
-  dialog->queryBoolean("periodic", ValueStorage::getInstance().getDescription("periodic"));
-
-  return dialog;
-}
-
-Action::state_ptr MoleculeTranslateAction::performCall() {
-  molecule *mol = NULL;
-  Vector x;
-  bool periodic = false;
-
-  ValueStorage::getInstance().queryCurrentValue(NAME, x);
-  ValueStorage::getInstance().queryCurrentValue("periodic", periodic);
-
-  for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
-    mol = iter->second;
-    DoLog(1) && (Log() << Verbose(1) << "Translating all ions by given vector." << endl);
-    if (periodic)
-      mol->TranslatePeriodically((const Vector *)&x);
-    else
-      mol->Translate((const Vector *)&x);
-  }
-  return Action::success;
-}
-
-Action::state_ptr MoleculeTranslateAction::performUndo(Action::state_ptr _state) {
-//  MoleculeTranslateState *state = assert_cast<MoleculeTranslateState*>(_state.get());
-
-//  string newName = state->mol->getName();
-//  state->mol->setName(state->lastName);
-
-  return Action::failure;
-}
-
-Action::state_ptr MoleculeTranslateAction::performRedo(Action::state_ptr _state){
-  // Undo and redo have to do the same for this action
-  return performUndo(_state);
-}
-
-bool MoleculeTranslateAction::canUndo() {
-  return false;
-}
-
-bool MoleculeTranslateAction::shouldUndo() {
-  return false;
-}
-
-const string MoleculeTranslateAction::getName() {
-  return NAME;
-}
Index: c/Actions/MoleculeAction/TranslateAction.hpp
===================================================================
--- src/Actions/MoleculeAction/TranslateAction.hpp	(revision 75a80fa17f1d93225b82f8ef166306e615a37e33)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
- * 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 MoleculeTranslate(Vector &x, bool periodic);
-
-class MoleculeTranslateAction : public Action {
-  friend void MoleculeTranslate(Vector &x, bool periodic);
-
-public:
-  MoleculeTranslateAction();
-  virtual ~MoleculeTranslateAction();
-
-  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
Index: tests/regression/testsuite-molecules.at
===================================================================
--- tests/regression/testsuite-molecules.at	(revision 75a80fa17f1d93225b82f8ef166306e615a37e33)
+++ tests/regression/testsuite-molecules.at	(revision 34c338bb9488bd56607ec1c6e8571df32ba115d2)
@@ -45,17 +45,9 @@
 AT_KEYWORDS([Molecules])
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/pre/test.* .], 0)
-AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ --select-molecule-by-id 0 -t "1., 1., 1." --periodic 0], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ --select-molecules-atoms 0 -t "1., 1., 1." --periodic 0], 0, [stdout], [stderr])
 AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore])
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/pre/test2.* .], 0)
-AT_CHECK([../../molecuilder -i test2.conf -e ${abs_top_srcdir}/src/ --select-molecule-by-id 0 -t "-1., -1., -1." --periodic 0], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder -i test2.conf -e ${abs_top_srcdir}/src/ --select-molecules-atoms 0 -t "-1., -1., -1." --periodic 0], 0, [stdout], [stderr])
 AT_CHECK([file=test2.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore])
-AT_CLEANUP
-
-# 7. Periodic translation
-AT_SETUP([Molecules - Periodic translation])
-AT_KEYWORDS([Molecules])
-AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/pre/test.* .], 0)
-AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ --select-molecule-by-id 0 -t "12., 12., 12." --periodic 1], 0, [stdout], [stderr])
-AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/post/$file], 0, [ignore], [ignore])
 AT_CLEANUP
 
