Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 481e9213138a06f3024b941f985d8988719fa579)
+++ src/Actions/Makefile.am	(revision 381c5fe8fd9ca93694a21da8584771be55a797fc)
@@ -126,4 +126,5 @@
 	SelectionAction/MoleculeOfAtomAction.cpp \
 	SelectionAction/NotAllAtomsAction.cpp \
+	SelectionAction/NotAllAtomsOfMoleculeAction.cpp \
 	SelectionAction/NotAllMoleculesAction.cpp \
 	SelectionAction/NotAtomByIdAction.cpp \
@@ -139,4 +140,5 @@
 	SelectionAction/MoleculeOfAtomAction.hpp \
 	SelectionAction/NotAllAtomsAction.hpp \
+	SelectionAction/NotAllAtomsOfMoleculeAction.hpp \
 	SelectionAction/NotAllMoleculesAction.hpp \
 	SelectionAction/NotAtomByIdAction.hpp \
Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision 481e9213138a06f3024b941f985d8988719fa579)
+++ src/Actions/MapOfActions.cpp	(revision 381c5fe8fd9ca93694a21da8584771be55a797fc)
@@ -75,4 +75,5 @@
 #include "Actions/SelectionAction/MoleculeOfAtomAction.hpp"
 #include "Actions/SelectionAction/NotAllAtomsAction.hpp"
+#include "Actions/SelectionAction/NotAllAtomsOfMoleculeAction.hpp"
 #include "Actions/SelectionAction/NotAllMoleculesAction.hpp"
 #include "Actions/SelectionAction/NotAtomByIdAction.hpp"
@@ -235,4 +236,5 @@
   DescriptionMap["unselect-atom-by-id"] = "unselect an atom by index";
   DescriptionMap["unselect-molecule-by-id"] = "unselect a molecule by index";
+  DescriptionMap["unselect-molecules-atoms"] = "unselect all atoms of a molecule";
   DescriptionMap["verbose"] = "set verbosity level";
   DescriptionMap["verlet-integrate"] = "perform verlet integration of a given force file";
@@ -356,4 +358,5 @@
   TypeMap["unselect-atom-by-id"] = &typeid(atom);
   TypeMap["unselect-molecule-by-id"] = &typeid(molecule);
+  TypeMap["unselect-molecules-atoms"] = &typeid(molecule);
   TypeMap["verlet-integrate"] = &typeid(std::string);
   TypeMap["verbose"] = &typeid(int);
@@ -466,4 +469,5 @@
   MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-atom-by-id") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-molecule-by-id") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-molecules-atoms") );
 
   MenuContainsActionMap.insert( pair<std::string, std::string> ("tesselation", "convex-envelope") );
@@ -540,4 +544,5 @@
   generic.insert("unselect-atom-by-id");
   generic.insert("unselect-molecule-by-id");
+  generic.insert("unselect-molecules-atoms");
 	generic.insert("verbose");
   generic.insert("verlet-integrate");
@@ -863,4 +868,5 @@
   new SelectionMoleculeOfAtomAction();
   new SelectionNotAllAtomsAction();
+  new SelectionNotAllAtomsOfMoleculeAction();
   new SelectionNotAllMoleculesAction();
   new SelectionNotAtomByIdAction();
Index: src/Actions/SelectionAction/NotAllAtomsOfMoleculeAction.cpp
===================================================================
--- src/Actions/SelectionAction/NotAllAtomsOfMoleculeAction.cpp	(revision 381c5fe8fd9ca93694a21da8584771be55a797fc)
+++ src/Actions/SelectionAction/NotAllAtomsOfMoleculeAction.cpp	(revision 381c5fe8fd9ca93694a21da8584771be55a797fc)
@@ -0,0 +1,101 @@
+/*
+ * NotAllAtomsOfMoleculeAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Actions/SelectionAction/NotAllAtomsOfMoleculeAction.hpp"
+#include "Actions/ActionRegistry.hpp"
+#include "Descriptors/AtomDescriptor.hpp"
+#include "atom.hpp"
+#include "molecule.hpp"
+#include "Helpers/Log.hpp"
+#include "Helpers/Verbose.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "UIElements/UIFactory.hpp"
+#include "UIElements/Dialog.hpp"
+#include "Actions/ValueStorage.hpp"
+
+
+// memento to remember the state when undoing
+
+class SelectionNotAllAtomsOfMoleculeState : public ActionState {
+public:
+  SelectionNotAllAtomsOfMoleculeState(std::vector<atom*> _selectedAtoms, molecule *_mol) :
+    selectedAtoms(_selectedAtoms),
+    mol(_mol)
+  {}
+  std::vector<atom*> selectedAtoms;
+  molecule *mol;
+};
+
+const char SelectionNotAllAtomsOfMoleculeAction::NAME[] = "unselect-molecules-atoms";
+
+SelectionNotAllAtomsOfMoleculeAction::SelectionNotAllAtomsOfMoleculeAction() :
+  Action(NAME)
+{}
+
+SelectionNotAllAtomsOfMoleculeAction::~SelectionNotAllAtomsOfMoleculeAction()
+{}
+
+void SelectionNotAllAtomsOfMolecule() {
+  ActionRegistry::getInstance().getActionByName(SelectionNotAllAtomsOfMoleculeAction::NAME)->call(Action::NonInteractive);
+};
+
+Dialog* SelectionNotAllAtomsOfMoleculeAction::fillDialog(Dialog *dialog) {
+  ASSERT(dialog,"No Dialog given when filling action dialog");
+
+  dialog->queryMolecule(NAME, ValueStorage::getInstance().getDescription(NAME));
+
+  return dialog;
+}
+
+Action::state_ptr SelectionNotAllAtomsOfMoleculeAction::performCall() {
+  molecule *mol = NULL;
+  std::vector<atom *> selectedAtoms = World::getInstance().getSelectedAtoms();
+
+  ValueStorage::getInstance().queryCurrentValue(NAME, mol);
+
+  DoLog(1) && (Log() << Verbose(1) << "Unselecting all atoms of molecule " << mol->getName() << "." << endl);
+  World::getInstance().unselectAtomsOfMolecule(mol);
+  return Action::state_ptr(new SelectionNotAllAtomsOfMoleculeState(selectedAtoms, mol));
+}
+
+Action::state_ptr SelectionNotAllAtomsOfMoleculeAction::performUndo(Action::state_ptr _state) {
+  SelectionNotAllAtomsOfMoleculeState *state = assert_cast<SelectionNotAllAtomsOfMoleculeState*>(_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 SelectionNotAllAtomsOfMoleculeState(state->selectedAtoms, state->mol));
+}
+
+Action::state_ptr SelectionNotAllAtomsOfMoleculeAction::performRedo(Action::state_ptr _state){
+  SelectionNotAllAtomsOfMoleculeState *state = assert_cast<SelectionNotAllAtomsOfMoleculeState*>(_state.get());
+
+  World::getInstance().unselectAtomsOfMolecule(state->mol);
+
+  return Action::state_ptr(new SelectionNotAllAtomsOfMoleculeState(state->selectedAtoms, state->mol));
+}
+
+bool SelectionNotAllAtomsOfMoleculeAction::canUndo() {
+  return true;
+}
+
+bool SelectionNotAllAtomsOfMoleculeAction::shouldUndo() {
+  return true;
+}
+
+const string SelectionNotAllAtomsOfMoleculeAction::getName() {
+  return NAME;
+}
Index: src/Actions/SelectionAction/NotAllAtomsOfMoleculeAction.hpp
===================================================================
--- src/Actions/SelectionAction/NotAllAtomsOfMoleculeAction.hpp	(revision 381c5fe8fd9ca93694a21da8584771be55a797fc)
+++ src/Actions/SelectionAction/NotAllAtomsOfMoleculeAction.hpp	(revision 381c5fe8fd9ca93694a21da8584771be55a797fc)
@@ -0,0 +1,36 @@
+/*
+ * NotAllAtomsOfMoleculeAction.hpp
+ *
+ *  Created on: Aug 09, 2010
+ *      Author: heber
+ */
+
+#ifndef NOTALLATOMSOFMOLECULEACTION_HPP_
+#define NOTALLATOMSOFMOLECULEACTION_HPP_
+
+#include "Actions/Action.hpp"
+
+void SelectionNotAllAtomsOfMolecule();
+
+class SelectionNotAllAtomsOfMoleculeAction : public Action {
+  friend void SelectionNotAllAtomsOfMolecule();
+
+public:
+  SelectionNotAllAtomsOfMoleculeAction();
+  virtual ~SelectionNotAllAtomsOfMoleculeAction();
+
+  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 /* NOTALLATOMSOFMOLECULEACTION_HPP_ */
