Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision 61c364e5234bfac462d451e14f2d8a128787f6bb)
+++ src/Actions/GlobalListOfActions.hpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -89,4 +89,5 @@
 	(SelectionAllMolecules) \
 	(SelectionClearAllMolecules) \
+  (SelectionInvertMolecules) \
 	(SelectionMoleculeByFormula) \
 	(SelectionNotMoleculeByFormula) \
@@ -97,4 +98,5 @@
 	(SelectionAllAtoms) \
 	(SelectionClearAllAtoms) \
+  (SelectionInvertAtoms) \
 	(SelectionNotAllAtoms) \
 	(SelectionNotAtomByElement) \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 61c364e5234bfac462d451e14f2d8a128787f6bb)
+++ src/Actions/Makefile.am	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -292,4 +292,5 @@
   Actions/SelectionAction/Atoms/AtomByOrderAction.cpp \
   Actions/SelectionAction/Atoms/ClearAllAtomsAction.cpp \
+  Actions/SelectionAction/Atoms/InvertAtomsAction.cpp \
   Actions/SelectionAction/Atoms/NotAllAtomsAction.cpp \
   Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.cpp \
@@ -308,4 +309,5 @@
   Actions/SelectionAction/Atoms/AtomByOrderAction.hpp \
   Actions/SelectionAction/Atoms/ClearAllAtomsAction.hpp \
+  Actions/SelectionAction/Atoms/InvertAtomsAction.hpp \
   Actions/SelectionAction/Atoms/NotAllAtomsAction.hpp \
   Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.hpp \
@@ -324,4 +326,5 @@
   Actions/SelectionAction/Atoms/AtomByOrderAction.def \
   Actions/SelectionAction/Atoms/ClearAllAtomsAction.def \
+  Actions/SelectionAction/Atoms/InvertAtomsAction.def \
   Actions/SelectionAction/Atoms/NotAllAtomsAction.def \
   Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.def \
@@ -335,4 +338,5 @@
   Actions/SelectionAction/Molecules/AllMoleculesAction.cpp \
   Actions/SelectionAction/Molecules/ClearAllMoleculesAction.cpp \
+  Actions/SelectionAction/Molecules/InvertMoleculesAction.cpp \
   Actions/SelectionAction/Molecules/MoleculeByFormulaAction.cpp \
   Actions/SelectionAction/Molecules/MoleculeByIdAction.cpp \
@@ -349,4 +353,5 @@
   Actions/SelectionAction/Molecules/AllMoleculesAction.hpp \
   Actions/SelectionAction/Molecules/ClearAllMoleculesAction.hpp \
+  Actions/SelectionAction/Molecules/InvertMoleculesAction.hpp \
   Actions/SelectionAction/Molecules/MoleculeByFormulaAction.hpp \
   Actions/SelectionAction/Molecules/MoleculeByIdAction.hpp \
@@ -363,4 +368,5 @@
   Actions/SelectionAction/Molecules/AllMoleculesAction.def \
   Actions/SelectionAction/Molecules/ClearAllMoleculesAction.def \
+  Actions/SelectionAction/Molecules/InvertMoleculesAction.def \
   Actions/SelectionAction/Molecules/MoleculeByFormulaAction.def \
   Actions/SelectionAction/Molecules/MoleculeByIdAction.def \
Index: src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp
===================================================================
--- src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp	(revision 61c364e5234bfac462d451e14f2d8a128787f6bb)
+++ src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -41,5 +41,5 @@
   getParametersfromValueStorage();
 
-  LOG(1, "Storing world to file " << params.filename << ".");
+  LOG(1, "Storing selected molecules to file " << params.filename << ".");
 
   // extract suffix
Index: src/Actions/SelectionAction/Atoms/InvertAtomsAction.cpp
===================================================================
--- src/Actions/SelectionAction/Atoms/InvertAtomsAction.cpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
+++ src/Actions/SelectionAction/Atoms/InvertAtomsAction.cpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -0,0 +1,79 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * InvertAtomsAction.cpp
+ *
+ *  Created on: May 12, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Descriptors/AtomDescriptor.hpp"
+#include "Descriptors/AtomIdDescriptor.hpp"
+#include "Atom/atom.hpp"
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "World.hpp"
+
+#include <boost/foreach.hpp>
+#include <iostream>
+#include <string>
+
+#include "InvertAtomsAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "InvertAtomsAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr SelectionInvertAtomsAction::performCall() {
+  // obtain information
+  getParametersfromValueStorage();
+
+  LOG(1, "Inverting atom selection.");
+
+  // simply unselect all selected
+  World::getInstance().invertAtomSelection();
+  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
+
+  return Action::state_ptr(new SelectionInvertAtomsState(params));
+}
+
+Action::state_ptr SelectionInvertAtomsAction::performUndo(Action::state_ptr _state) {
+  //SelectionInvertAtomsState *state = assert_cast<SelectionInvertAtomsState*>(_state.get());
+
+  World::getInstance().invertAtomSelection();
+  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
+
+  return Action::state_ptr(_state);
+}
+
+Action::state_ptr SelectionInvertAtomsAction::performRedo(Action::state_ptr _state){
+  //SelectionInvertAtomsState *state = assert_cast<SelectionInvertAtomsState*>(_state.get());
+
+  World::getInstance().invertAtomSelection();
+  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
+
+  return Action::state_ptr(_state);
+}
+
+bool SelectionInvertAtomsAction::canUndo() {
+  return true;
+}
+
+bool SelectionInvertAtomsAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/SelectionAction/Atoms/InvertAtomsAction.def
===================================================================
--- src/Actions/SelectionAction/Atoms/InvertAtomsAction.def	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
+++ src/Actions/SelectionAction/Atoms/InvertAtomsAction.def	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -0,0 +1,33 @@
+/*
+ * InvertAtomsAction.def
+ *
+ *  Created on: Aug 26, 2010
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+
+
+// 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 (NODEFAULT) for each (undefined) default value
+#undef paramtypes
+#undef paramtokens
+#undef paramdescriptions
+#undef paramdefaults
+#undef paramreferences
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Selection
+#define MENUNAME "selection"
+#define MENUPOSITION 3
+#define ACTIONNAME InvertAtoms
+#define TOKEN "invert-atoms"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "invert current selection of atoms"
+#undef SHORTFORM
Index: src/Actions/SelectionAction/Atoms/InvertAtomsAction.hpp
===================================================================
--- src/Actions/SelectionAction/Atoms/InvertAtomsAction.hpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
+++ src/Actions/SelectionAction/Atoms/InvertAtomsAction.hpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -0,0 +1,22 @@
+/*
+ * InvertAtomsAction.hpp
+ *
+ *  Created on: Mar 12, 2012
+ *      Author: heber
+ */
+
+#ifndef INVERTATOMSACTION_HPP_
+#define INVERTATOMSACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "InvertAtomsAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* INVERTATOMSACTION_HPP_ */
Index: src/Actions/SelectionAction/Molecules/InvertMoleculesAction.cpp
===================================================================
--- src/Actions/SelectionAction/Molecules/InvertMoleculesAction.cpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
+++ src/Actions/SelectionAction/Molecules/InvertMoleculesAction.cpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -0,0 +1,76 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * InvertMoleculesAction.cpp
+ *
+ *  Created on: Mar 12, 2012
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Descriptors/MoleculeDescriptor.hpp"
+#include "Descriptors/MoleculeIdDescriptor.hpp"
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "molecule.hpp"
+#include "World.hpp"
+
+#include <boost/foreach.hpp>
+#include <iostream>
+#include <string>
+
+#include "InvertMoleculesAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "InvertMoleculesAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr SelectionInvertMoleculesAction::performCall() {
+  // obtain information
+  getParametersfromValueStorage();
+
+  World::getInstance().invertMoleculeSelection();
+  LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
+
+  return Action::state_ptr(new SelectionInvertMoleculesState(params));
+}
+
+Action::state_ptr SelectionInvertMoleculesAction::performUndo(Action::state_ptr _state) {
+  //SelectionInvertMoleculesState *state = assert_cast<SelectionInvertMoleculesState*>(_state.get());
+
+  World::getInstance().invertMoleculeSelection();
+  LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
+
+  return Action::state_ptr(_state);
+}
+
+Action::state_ptr SelectionInvertMoleculesAction::performRedo(Action::state_ptr _state){
+  //SelectionInvertMoleculesState *state = assert_cast<SelectionInvertMoleculesState*>(_state.get());
+
+  World::getInstance().invertMoleculeSelection();
+  LOG(0, World::getInstance().countSelectedMolecules() << " molecules selected.");
+
+  return Action::state_ptr(_state);
+}
+
+bool SelectionInvertMoleculesAction::canUndo() {
+  return true;
+}
+
+bool SelectionInvertMoleculesAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/SelectionAction/Molecules/InvertMoleculesAction.def
===================================================================
--- src/Actions/SelectionAction/Molecules/InvertMoleculesAction.def	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
+++ src/Actions/SelectionAction/Molecules/InvertMoleculesAction.def	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -0,0 +1,32 @@
+/*
+ * InvertMoleculesAction.def
+ *
+ *  Created on: Mar 12, 2012
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+
+// 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 (NODEFAULT) for each (undefined) default value
+#undef paramtypes
+#undef paramtokens
+#undef paramdescriptions
+#undef paramdefaults
+#undef paramreferences
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Selection
+#define MENUNAME "selection"
+#define MENUPOSITION 4
+#define ACTIONNAME InvertMolecules
+#define TOKEN "invert-molecules"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "invert current selection of molecules"
+#undef SHORTFORM
Index: src/Actions/SelectionAction/Molecules/InvertMoleculesAction.hpp
===================================================================
--- src/Actions/SelectionAction/Molecules/InvertMoleculesAction.hpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
+++ src/Actions/SelectionAction/Molecules/InvertMoleculesAction.hpp	(revision ebc499bb1355679f4fc65d57497f95261d93f328)
@@ -0,0 +1,23 @@
+/*
+ * InvertMoleculesAction.hpp
+ *
+ *  Created on: Mar 12, 2012
+ *      Author: heber
+ */
+
+#ifndef INVERTMOLECULESSACTION_HPP_
+#define INVERTMOLECULESSACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+
+#include "Actions/Action.hpp"
+
+#include "InvertMoleculesAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* INVERTMOLECULESSACTION_HPP_ */
