Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 1d9b7d286b00ba8325055cd0a5629ca79e89b120)
+++ src/Actions/Makefile.am	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -114,11 +114,19 @@
 
 SELECTIONACTIONSOURCE = \
+	SelectionAction/AllAtomsAction.cpp \
+	SelectionAction/AllMoleculesAction.cpp \
 	SelectionAction/AtomByIdAction.cpp \
 	SelectionAction/MoleculeByIdAction.cpp \
+	SelectionAction/NotAllAtomsAction.cpp \
+	SelectionAction/NotAllMoleculesAction.cpp \
 	SelectionAction/NotAtomByIdAction.cpp \
 	SelectionAction/NotMoleculeByIdAction.cpp
 SELECTIONACTIONHEADER = \
+	SelectionAction/AllAtomsAction.hpp \
+	SelectionAction/AllMoleculesAction.hpp \
 	SelectionAction/AtomByIdAction.hpp \
 	SelectionAction/MoleculeByIdAction.hpp \
+	SelectionAction/NotAllAtomsAction.hpp \
+	SelectionAction/NotAllMoleculesAction.hpp \
 	SelectionAction/NotAtomByIdAction.hpp \
 	SelectionAction/NotMoleculeByIdAction.hpp
Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision 1d9b7d286b00ba8325055cd0a5629ca79e89b120)
+++ src/Actions/MapOfActions.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -64,6 +64,10 @@
 #include "Actions/ParserAction/LoadXyzAction.hpp"
 #include "Actions/ParserAction/SaveXyzAction.hpp"
+#include "Actions/SelectionAction/AllAtomsAction.hpp"
+#include "Actions/SelectionAction/AllMoleculesAction.hpp"
 #include "Actions/SelectionAction/AtomByIdAction.hpp"
 #include "Actions/SelectionAction/MoleculeByIdAction.hpp"
+#include "Actions/SelectionAction/NotAllAtomsAction.hpp"
+#include "Actions/SelectionAction/NotAllMoleculesAction.hpp"
 #include "Actions/SelectionAction/NotAtomByIdAction.hpp"
 #include "Actions/SelectionAction/NotMoleculeByIdAction.hpp"
@@ -236,7 +240,11 @@
   DescriptionMap["periodic"] = "system is constraint to periodic boundary conditions (y/n)";
   DescriptionMap["position"] = "position in R^3 space";
+  DescriptionMap["select-all-atoms"] = "select all atoms";
+  DescriptionMap["select-all-molecules"] = "select all molecules";
   DescriptionMap["select-atom-by-id"] = "select an atom by index";
   DescriptionMap["select-molecule-by-id"] = "select a molecule by index";
   DescriptionMap["start-step"] = "first or start step";
+  DescriptionMap["unselect-all-atoms"] = "unselect all atoms";
+  DescriptionMap["unselect-all-molecules"] = "unselect all molecules";
   DescriptionMap["unselect-atom-by-id"] = "unselect an atom by index";
   DescriptionMap["unselect-molecule-by-id"] = "unselect a molecule by index";
@@ -343,7 +351,11 @@
   TypeMap["periodic"] = &typeid(bool);
   TypeMap["position"] = &typeid(VectorValue);
+  TypeMap["select-all-atoms"] = &typeid(void);
+  TypeMap["select-all-molecules"] = &typeid(void);
   TypeMap["select-atom-by-id"] = &typeid(atom);
   TypeMap["select-molecule-by-id"] = &typeid(molecule);
   TypeMap["start-step"] = &typeid(int);
+  TypeMap["unselect-all-atoms"] = &typeid(void);
+  TypeMap["unselect-all-molecules"] = &typeid(void);
   TypeMap["unselect-atom-by-id"] = &typeid(atom);
   TypeMap["unselect-molecule-by-id"] = &typeid(molecule);
@@ -475,4 +487,8 @@
   generic.insert("save-temperature");
   generic.insert("scale-box");
+  generic.insert("select-all-atoms");
+  generic.insert("select-all-molecules");
+  generic.insert("select-atom-by-id");
+  generic.insert("select-molecule-by-id");
   generic.insert("set-basis");
   generic.insert("set-output");
@@ -480,4 +496,8 @@
   generic.insert("suspend-in-water");
   generic.insert("translate-mol");
+  generic.insert("unselect-all-atoms");
+  generic.insert("unselect-all-molecules");
+  generic.insert("unselect-atom-by-id");
+  generic.insert("unselect-molecule-by-id");
 	generic.insert("verbose");
   generic.insert("verlet-integrate");
@@ -507,9 +527,5 @@
   hidden.insert("periodic");
   hidden.insert("position");
-  hidden.insert("select-atom-by-id");
-  hidden.insert("select-molecule-by-id");
   hidden.insert("start-step");
-  hidden.insert("unselect-atom-by-id");
-  hidden.insert("unselect-molecule-by-id");
 }
 
@@ -790,6 +806,10 @@
   new ParserSaveXyzAction();
 
+  new SelectionAllAtomsAction();
+  new SelectionAllMoleculesAction();
   new SelectionAtomByIdAction();
   new SelectionMoleculeByIdAction();
+  new SelectionNotAllAtomsAction();
+  new SelectionNotAllMoleculesAction();
   new SelectionNotAtomByIdAction();
   new SelectionNotMoleculeByIdAction();
Index: src/Actions/SelectionAction/AllAtomsAction.cpp
===================================================================
--- src/Actions/SelectionAction/AllAtomsAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/AllAtomsAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,89 @@
+/*
+ * AllAtomsAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/SelectionAction/AllAtomsAction.hpp"
+#include "Descriptors/AtomDescriptor.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "UIElements/ValueStorage.hpp"
+
+
+// memento to remember the state when undoing
+
+class SelectionAllAtomsState : public ActionState {
+public:
+  SelectionAllAtomsState(std::vector<atom*> _selectedAtoms) :
+    selectedAtoms(_selectedAtoms)
+  {}
+  std::vector<atom*> selectedAtoms;
+};
+
+const char SelectionAllAtomsAction::NAME[] = "select-all-atoms";
+
+SelectionAllAtomsAction::SelectionAllAtomsAction() :
+  Action(NAME)
+{}
+
+SelectionAllAtomsAction::~SelectionAllAtomsAction()
+{}
+
+Dialog* SelectionAllAtomsAction::createDialog() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryEmpty(NAME, ValueStorage::getInstance().getDescription(NAME));
+
+  return dialog;
+}
+
+Action::state_ptr SelectionAllAtomsAction::performCall() {
+  std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms();
+  DoLog(1) && (Log() << Verbose(1) << "Selecting all atoms." << endl);
+  World::getInstance().selectAllAtoms(AllAtoms());
+  return Action::state_ptr(new SelectionAllAtomsState(selectedAtoms));
+}
+
+Action::state_ptr SelectionAllAtomsAction::performUndo(Action::state_ptr _state) {
+  SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
+
+  World::getInstance().clearAtomSelection();
+  for(std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter)
+    World::getInstance().selectAtom(*iter);
+
+  return Action::state_ptr(new SelectionAllAtomsState(state->selectedAtoms));
+}
+
+Action::state_ptr SelectionAllAtomsAction::performRedo(Action::state_ptr _state){
+  SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
+
+  World::getInstance().selectAllAtoms(AllAtoms());
+
+  return Action::state_ptr(new SelectionAllAtomsState(state->selectedAtoms));
+}
+
+bool SelectionAllAtomsAction::canUndo() {
+  return true;
+}
+
+bool SelectionAllAtomsAction::shouldUndo() {
+  return true;
+}
+
+const string SelectionAllAtomsAction::getName() {
+  return NAME;
+}
Index: src/Actions/SelectionAction/AllAtomsAction.hpp
===================================================================
--- src/Actions/SelectionAction/AllAtomsAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/AllAtomsAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,31 @@
+/*
+ * AllAtomsAction.hpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#ifndef ALLATOMSACTION_HPP_
+#define ALLATOMSACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class SelectionAllAtomsAction : public Action {
+public:
+  SelectionAllAtomsAction();
+  virtual ~SelectionAllAtomsAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Dialog* createDialog();
+  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 /* ALLATOMSACTION_HPP_ */
Index: src/Actions/SelectionAction/AllMoleculesAction.cpp
===================================================================
--- src/Actions/SelectionAction/AllMoleculesAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/AllMoleculesAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,89 @@
+/*
+ * AllMoleculesAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/SelectionAction/AllMoleculesAction.hpp"
+#include "Descriptors/MoleculeDescriptor.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "UIElements/ValueStorage.hpp"
+
+
+// memento to remember the state when undoing
+
+class SelectionAllMoleculesState : public ActionState {
+public:
+  SelectionAllMoleculesState(std::vector<molecule*> selectedMolecules) :
+    selectedMolecules(selectedMolecules)
+  {}
+  std::vector<molecule*> selectedMolecules;
+};
+
+const char SelectionAllMoleculesAction::NAME[] = "select-all-molecules";
+
+SelectionAllMoleculesAction::SelectionAllMoleculesAction() :
+  Action(NAME)
+{}
+
+SelectionAllMoleculesAction::~SelectionAllMoleculesAction()
+{}
+
+Dialog* SelectionAllMoleculesAction::createDialog() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryEmpty(NAME, ValueStorage::getInstance().getDescription(NAME));
+
+  return dialog;
+}
+
+Action::state_ptr SelectionAllMoleculesAction::performCall() {
+  std::vector<molecule *> selectedMolecules = World::getInstance().getSelectedMolecules();
+  DoLog(1) && (Log() << Verbose(1) << "Selecting all molecules." << endl);
+  World::getInstance().selectAllMolecules(AllMolecules());
+  return Action::state_ptr(new SelectionAllMoleculesState(selectedMolecules));
+}
+
+Action::state_ptr SelectionAllMoleculesAction::performUndo(Action::state_ptr _state) {
+  SelectionAllMoleculesState *state = assert_cast<SelectionAllMoleculesState*>(_state.get());
+
+  World::getInstance().clearMoleculeSelection();
+  for(std::vector<molecule *>::iterator iter = state->selectedMolecules.begin(); iter != state->selectedMolecules.end(); ++iter)
+    World::getInstance().selectMolecule(*iter);
+
+  return Action::state_ptr(new SelectionAllMoleculesState(state->selectedMolecules));
+}
+
+Action::state_ptr SelectionAllMoleculesAction::performRedo(Action::state_ptr _state){
+  SelectionAllMoleculesState *state = assert_cast<SelectionAllMoleculesState*>(_state.get());
+
+  World::getInstance().selectAllMolecules(AllMolecules());
+
+  return Action::state_ptr(new SelectionAllMoleculesState(state->selectedMolecules));
+}
+
+bool SelectionAllMoleculesAction::canUndo() {
+  return true;
+}
+
+bool SelectionAllMoleculesAction::shouldUndo() {
+  return true;
+}
+
+const string SelectionAllMoleculesAction::getName() {
+  return NAME;
+}
Index: src/Actions/SelectionAction/AllMoleculesAction.hpp
===================================================================
--- src/Actions/SelectionAction/AllMoleculesAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/AllMoleculesAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,31 @@
+/*
+ * AllMoleculesAction.hpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#ifndef ALLMOLECULESSACTION_HPP_
+#define ALLMOLECULESSACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class SelectionAllMoleculesAction : public Action {
+public:
+  SelectionAllMoleculesAction();
+  virtual ~SelectionAllMoleculesAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Dialog* createDialog();
+  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 /* ALLMOLECULESSACTION_HPP_ */
Index: src/Actions/SelectionAction/NotAllAtomsAction.cpp
===================================================================
--- src/Actions/SelectionAction/NotAllAtomsAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/NotAllAtomsAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,89 @@
+/*
+ * NotAllAtomsAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/SelectionAction/NotAllAtomsAction.hpp"
+#include "Descriptors/AtomDescriptor.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "UIElements/ValueStorage.hpp"
+
+
+// memento to remember the state when undoing
+
+class SelectionAllAtomsState : public ActionState {
+public:
+  SelectionAllAtomsState(std::vector<atom*> _selectedAtoms) :
+    selectedAtoms(_selectedAtoms)
+  {}
+  std::vector<atom*> selectedAtoms;
+};
+
+const char SelectionNotAllAtomsAction::NAME[] = "unselect-all-atoms";
+
+SelectionNotAllAtomsAction::SelectionNotAllAtomsAction() :
+  Action(NAME)
+{}
+
+SelectionNotAllAtomsAction::~SelectionNotAllAtomsAction()
+{}
+
+Dialog* SelectionNotAllAtomsAction::createDialog() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryEmpty(NAME, ValueStorage::getInstance().getDescription(NAME));
+
+  return dialog;
+}
+
+Action::state_ptr SelectionNotAllAtomsAction::performCall() {
+  std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms();
+  DoLog(1) && (Log() << Verbose(1) << "Unselecting all atoms." << endl);
+  World::getInstance().clearAtomSelection();
+  return Action::state_ptr(new SelectionAllAtomsState(selectedAtoms));
+}
+
+Action::state_ptr SelectionNotAllAtomsAction::performUndo(Action::state_ptr _state) {
+  SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
+
+  World::getInstance().clearAtomSelection();
+  for(std::vector<atom *>::iterator iter = state->selectedAtoms.begin(); iter != state->selectedAtoms.end(); ++iter)
+    World::getInstance().selectAtom(*iter);
+
+  return Action::state_ptr(new SelectionAllAtomsState(state->selectedAtoms));
+}
+
+Action::state_ptr SelectionNotAllAtomsAction::performRedo(Action::state_ptr _state){
+  SelectionAllAtomsState *state = assert_cast<SelectionAllAtomsState*>(_state.get());
+
+  World::getInstance().clearAtomSelection();
+
+  return Action::state_ptr(new SelectionAllAtomsState(state->selectedAtoms));
+}
+
+bool SelectionNotAllAtomsAction::canUndo() {
+  return true;
+}
+
+bool SelectionNotAllAtomsAction::shouldUndo() {
+  return true;
+}
+
+const string SelectionNotAllAtomsAction::getName() {
+  return NAME;
+}
Index: src/Actions/SelectionAction/NotAllAtomsAction.hpp
===================================================================
--- src/Actions/SelectionAction/NotAllAtomsAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/NotAllAtomsAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,31 @@
+/*
+ * NotAllAtomsAction.hpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#ifndef NOTALLATOMSACTION_HPP_
+#define NOTALLATOMSACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class SelectionNotAllAtomsAction : public Action {
+public:
+  SelectionNotAllAtomsAction();
+  virtual ~SelectionNotAllAtomsAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Dialog* createDialog();
+  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 /* NOTALLATOMSACTION_HPP_ */
Index: src/Actions/SelectionAction/NotAllMoleculesAction.cpp
===================================================================
--- src/Actions/SelectionAction/NotAllMoleculesAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/NotAllMoleculesAction.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,89 @@
+/*
+ * NotAllMoleculesAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/SelectionAction/NotAllMoleculesAction.hpp"
+#include "Descriptors/MoleculeDescriptor.hpp"
+#include "atom.hpp"
+#include "log.hpp"
+#include "verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "UIElements/ValueStorage.hpp"
+
+
+// memento to remember the state when undoing
+
+class SelectionNotAllMoleculesState : public ActionState {
+public:
+  SelectionNotAllMoleculesState(std::vector<molecule*> selectedMolecules) :
+    selectedMolecules(selectedMolecules)
+  {}
+  std::vector<molecule*> selectedMolecules;
+};
+
+const char SelectionNotAllMoleculesAction::NAME[] = "unselect-all-molecules";
+
+SelectionNotAllMoleculesAction::SelectionNotAllMoleculesAction() :
+  Action(NAME)
+{}
+
+SelectionNotAllMoleculesAction::~SelectionNotAllMoleculesAction()
+{}
+
+Dialog* SelectionNotAllMoleculesAction::createDialog() {
+  Dialog *dialog = UIFactory::getInstance().makeDialog();
+
+  dialog->queryEmpty(NAME, ValueStorage::getInstance().getDescription(NAME));
+
+  return dialog;
+}
+
+Action::state_ptr SelectionNotAllMoleculesAction::performCall() {
+  std::vector<molecule *> selectedMolecules = World::getInstance().getSelectedMolecules();
+  DoLog(1) && (Log() << Verbose(1) << "Unselecting all molecules." << endl);
+  World::getInstance().clearMoleculeSelection();
+  return Action::state_ptr(new SelectionNotAllMoleculesState(selectedMolecules));
+}
+
+Action::state_ptr SelectionNotAllMoleculesAction::performUndo(Action::state_ptr _state) {
+  SelectionNotAllMoleculesState *state = assert_cast<SelectionNotAllMoleculesState*>(_state.get());
+
+  World::getInstance().clearMoleculeSelection();
+  for(std::vector<molecule *>::iterator iter = state->selectedMolecules.begin(); iter != state->selectedMolecules.end(); ++iter)
+    World::getInstance().selectMolecule(*iter);
+
+  return Action::state_ptr(new SelectionNotAllMoleculesState(state->selectedMolecules));
+}
+
+Action::state_ptr SelectionNotAllMoleculesAction::performRedo(Action::state_ptr _state){
+  SelectionNotAllMoleculesState *state = assert_cast<SelectionNotAllMoleculesState*>(_state.get());
+
+  World::getInstance().clearMoleculeSelection();
+
+  return Action::state_ptr(new SelectionNotAllMoleculesState(state->selectedMolecules));
+}
+
+bool SelectionNotAllMoleculesAction::canUndo() {
+  return true;
+}
+
+bool SelectionNotAllMoleculesAction::shouldUndo() {
+  return true;
+}
+
+const string SelectionNotAllMoleculesAction::getName() {
+  return NAME;
+}
Index: src/Actions/SelectionAction/NotAllMoleculesAction.hpp
===================================================================
--- src/Actions/SelectionAction/NotAllMoleculesAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
+++ src/Actions/SelectionAction/NotAllMoleculesAction.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -0,0 +1,31 @@
+/*
+ * NotAllMoleculesAction.hpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#ifndef NOTALLMOLECULESSACTION_HPP_
+#define NOTALLMOLECULESSACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+class SelectionNotAllMoleculesAction : public Action {
+public:
+  SelectionNotAllMoleculesAction();
+  virtual ~SelectionNotAllMoleculesAction();
+
+  bool canUndo();
+  bool shouldUndo();
+
+  virtual const std::string getName();
+private:
+  virtual Dialog* createDialog();
+  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 /* NOTALLMOLECULESSACTION_HPP_ */
Index: src/World.cpp
===================================================================
--- src/World.cpp	(revision 1d9b7d286b00ba8325055cd0a5629ca79e89b120)
+++ src/World.cpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -558,14 +558,24 @@
 }
 
-size_t World::countSelectedAtoms() {
+size_t World::countSelectedAtoms() const {
   size_t count = 0;
-  for (internal_AtomIterator iter = getAtomIter_internal(AllAtoms()); iter != atomEnd_internal(); ++iter)
+  for (AtomSet::const_iterator iter = selectedAtoms.begin(); iter != selectedAtoms.end(); ++iter)
     count++;
   return count;
 }
 
-bool World::isSelected(atom *atom) {
+bool World::isSelected(atom *atom) const {
   return selectedAtoms.find(atom->getId()) != selectedAtoms.end();
 }
+
+const std::vector<atom *> World::getSelectedAtoms() const {
+  std::vector<atom *> returnAtoms;
+  returnAtoms.resize(countSelectedAtoms());
+  int count = 0;
+  for (AtomSet::const_iterator iter = selectedAtoms.begin(); iter != selectedAtoms.end(); ++iter)
+    returnAtoms[count++] = iter->second;
+  return returnAtoms;
+}
+
 
 // Molecules
@@ -585,5 +595,5 @@
 }
 
-void World::selectAllMoleculess(MoleculeDescriptor descr){
+void World::selectAllMolecules(MoleculeDescriptor descr){
   internal_MoleculeIterator begin = getMoleculeIter_internal(descr);
   internal_MoleculeIterator end = moleculeEnd_internal();
@@ -616,5 +626,5 @@
 }
 
-void World::unselectAllMoleculess(MoleculeDescriptor descr){
+void World::unselectAllMolecules(MoleculeDescriptor descr){
   internal_MoleculeIterator begin = getMoleculeIter_internal(descr);
   internal_MoleculeIterator end = moleculeEnd_internal();
@@ -637,13 +647,22 @@
 }
 
-size_t World::countSelectedMolecules() {
+size_t World::countSelectedMolecules() const {
   size_t count = 0;
-  for (internal_MoleculeIterator iter = getMoleculeIter_internal(AllMolecules()); iter != moleculeEnd_internal(); ++iter)
+  for (MoleculeSet::const_iterator iter = selectedMolecules.begin(); iter != selectedMolecules.end(); ++iter)
     count++;
   return count;
 }
 
-bool World::isSelected(molecule *mol) {
+bool World::isSelected(molecule *mol) const {
   return selectedMolecules.find(mol->getId()) != selectedMolecules.end();
+}
+
+const std::vector<molecule *> World::getSelectedMolecules() const {
+  std::vector<molecule *> returnMolecules;
+  returnMolecules.resize(countSelectedMolecules());
+  int count = 0;
+  for (MoleculeSet::const_iterator iter = selectedMolecules.begin(); iter != selectedMolecules.end(); ++iter)
+    returnMolecules[count++] = iter->second;
+  return returnMolecules;
 }
 
Index: src/World.hpp
===================================================================
--- src/World.hpp	(revision 1d9b7d286b00ba8325055cd0a5629ca79e89b120)
+++ src/World.hpp	(revision e472eab9f7f6929151469defe1f2df63c0c7f1f5)
@@ -264,20 +264,22 @@
   void unselectAtomsOfMolecule(molecule*);
   void unselectAtomsOfMolecule(moleculeId_t);
-  size_t countSelectedAtoms();
-  bool isSelected(atom *_atom);
+  size_t countSelectedAtoms() const;
+  bool isSelected(atom *_atom) const;
+  const std::vector<atom *> getSelectedAtoms() const;
 
   void clearMoleculeSelection();
   void selectMolecule(molecule*);
   void selectMolecule(moleculeId_t);
-  void selectAllMoleculess(MoleculeDescriptor);
+  void selectAllMolecules(MoleculeDescriptor);
   void selectMoleculeOfAtom(atom*);
   void selectMoleculeOfAtom(atomId_t);
   void unselectMolecule(molecule*);
   void unselectMolecule(moleculeId_t);
-  void unselectAllMoleculess(MoleculeDescriptor);
+  void unselectAllMolecules(MoleculeDescriptor);
   void unselectMoleculeOfAtom(atom*);
   void unselectMoleculeOfAtom(atomId_t);
-  size_t countSelectedMolecules();
-  bool isSelected(molecule *_mol);
+  size_t countSelectedMolecules() const;
+  bool isSelected(molecule *_mol) const;
+  const std::vector<molecule *> getSelectedMolecules() const;
 
   /******************** Iterators to selections *****************/
