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_ */
