Index: src/Actions/SelectionAction/Atoms/AtomByNameAction.cpp
===================================================================
--- src/Actions/SelectionAction/Atoms/AtomByNameAction.cpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
+++ src/Actions/SelectionAction/Atoms/AtomByNameAction.cpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
@@ -0,0 +1,90 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2017 Frederik Heber. All rights reserved.
+ * 
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * AtomByNameAction.cpp
+ *
+ *  Created on: May 12, 2017
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+//#include "CodePatterns/MemDebug.hpp"
+
+#include "Descriptors/AtomNameDescriptor.hpp"
+#include "Descriptors/AtomSelectionDescriptor.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 "AtomByNameAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "AtomByNameAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+ActionState::ptr SelectionAtomByNameAction::performCall() {
+  LOG(1, "Selecting atoms of name " << params.atomname.get());
+  std::vector<const atom *> selectedAtoms =
+      const_cast<const World &>(World::getInstance()).getAllAtoms(AtomsBySelection());
+  World::getInstance().selectAllAtoms(AtomByName(params.atomname.get()));
+  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
+  return ActionState::ptr(new SelectionAtomByNameState(selectedAtoms,params));
+}
+
+ActionState::ptr SelectionAtomByNameAction::performUndo(ActionState::ptr _state) {
+  SelectionAtomByNameState *state = assert_cast<SelectionAtomByNameState*>(_state.get());
+
+  World::getInstance().unselectAllAtoms(AtomByName(state->params.atomname.get()));
+  BOOST_FOREACH(const atom *_atom, state->selectedAtoms)
+    World::getInstance().selectAtom(_atom);
+
+  return ActionState::ptr(_state);
+}
+
+ActionState::ptr SelectionAtomByNameAction::performRedo(ActionState::ptr _state){
+  SelectionAtomByNameState *state = assert_cast<SelectionAtomByNameState*>(_state.get());
+
+  World::getInstance().selectAllAtoms(AtomByName(state->params.atomname.get()));
+
+  return ActionState::ptr(_state);
+}
+
+bool SelectionAtomByNameAction::canUndo() {
+  return true;
+}
+
+bool SelectionAtomByNameAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/SelectionAction/Atoms/AtomByNameAction.def
===================================================================
--- src/Actions/SelectionAction/Atoms/AtomByNameAction.def	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
+++ src/Actions/SelectionAction/Atoms/AtomByNameAction.def	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
@@ -0,0 +1,37 @@
+/*
+ * AtomByNameAction.def
+ *
+ *  Created on: May 12, 2017
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+class element;
+
+#include "Parameters/Validators/DummyValidator.hpp"
+
+// 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 (NOPARAM_DEFAULT) for each (undefined) default value
+#define paramtypes (std::string)
+#define paramtokens ("select-atom-by-name")
+#define paramdescriptions ("name of atom (in molecule)")
+#undef paramdefaults
+#define paramreferences (atomname)
+#define paramvalids \
+(DummyValidator<std::string>())
+
+#define statetypes (std::vector<const atom*>)
+#define statereferences (selectedAtoms)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Selection
+#define MENUNAME "selection"
+#define MENUPOSITION 6
+#define ACTIONNAME AtomByName
+#define TOKEN "select-atom-by-name"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "select an atom by its name in a molecule"
+#undef SHORTFORM
Index: src/Actions/SelectionAction/Atoms/AtomByNameAction.hpp
===================================================================
--- src/Actions/SelectionAction/Atoms/AtomByNameAction.hpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
+++ src/Actions/SelectionAction/Atoms/AtomByNameAction.hpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
@@ -0,0 +1,22 @@
+/*
+ * AtomByNameAction.hpp
+ *
+ *  Created on: May 12, 2017
+ *      Author: heber
+ */
+
+#ifndef ATOMBYNAMEACTION_HPP_
+#define ATOMBYNAMEACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "AtomByNameAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* ATOMBYNAMEACTION_HPP_ */
Index: src/Actions/SelectionAction/Atoms/NotAtomByNameAction.cpp
===================================================================
--- src/Actions/SelectionAction/Atoms/NotAtomByNameAction.cpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
+++ src/Actions/SelectionAction/Atoms/NotAtomByNameAction.cpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
@@ -0,0 +1,91 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2017 Frederik Heber. All rights reserved.
+ * 
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NotAtomByNameAction.cpp
+ *
+ *  Created on: May 12, 2017
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+//#include "CodePatterns/MemDebug.hpp"
+
+#include "Descriptors/AtomNameDescriptor.hpp"
+#include "Descriptors/AtomSelectionDescriptor.hpp"
+#include "Atom/atom.hpp"
+#include "Element/element.hpp"
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "World.hpp"
+
+#include <boost/foreach.hpp>
+#include <iostream>
+#include <string>
+
+#include "NotAtomByNameAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "NotAtomByNameAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+ActionState::ptr SelectionNotAtomByNameAction::performCall() {
+  LOG(1, "Unselecting atoms of name " << params.atomname.get());
+  std::vector<const atom *> unselectedAtoms = const_cast<const World &>(World::getInstance()).
+      getAllAtoms(!AtomsBySelection());
+  World::getInstance().unselectAllAtoms(AtomByName(params.atomname.get()));
+  LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected.");
+  return ActionState::ptr(new SelectionNotAtomByNameState(unselectedAtoms,params));
+}
+
+ActionState::ptr SelectionNotAtomByNameAction::performUndo(ActionState::ptr _state) {
+  SelectionNotAtomByNameState *state = assert_cast<SelectionNotAtomByNameState*>(_state.get());
+
+  World::getInstance().selectAllAtoms(AtomByName(state->params.atomname.get()));
+  BOOST_FOREACH(const atom *_atom, state->unselectedAtoms)
+    World::getInstance().unselectAtom(_atom);
+
+  return ActionState::ptr(_state);
+}
+
+ActionState::ptr SelectionNotAtomByNameAction::performRedo(ActionState::ptr _state){
+  SelectionNotAtomByNameState *state = assert_cast<SelectionNotAtomByNameState*>(_state.get());
+
+  World::getInstance().unselectAllAtoms(AtomByName(state->params.atomname.get()));
+
+  return ActionState::ptr(_state);
+}
+
+bool SelectionNotAtomByNameAction::canUndo() {
+  return true;
+}
+
+bool SelectionNotAtomByNameAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/SelectionAction/Atoms/NotAtomByNameAction.def
===================================================================
--- src/Actions/SelectionAction/Atoms/NotAtomByNameAction.def	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
+++ src/Actions/SelectionAction/Atoms/NotAtomByNameAction.def	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
@@ -0,0 +1,37 @@
+/*
+ * NotAtomByNameAction.def
+ *
+ *  Created on: May 12, 2017
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+class element;
+
+#include "Parameters/Validators/DummyValidator.hpp"
+
+// 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 (NOPARAM_DEFAULT) for each (undefined) default value
+#define paramtypes (std::string)
+#define paramtokens ("unselect-atom-by-name")
+#define paramdescriptions ("name of atom (in molecule)")
+#undef paramdefaults
+#define paramreferences (atomname)
+#define paramvalids \
+(DummyValidator<std::string>())
+
+#define statetypes (std::vector<const atom*>)
+#define statereferences (unselectedAtoms)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Selection
+#define MENUNAME "selection"
+#define MENUPOSITION 16
+#define ACTIONNAME NotAtomByName
+#define TOKEN "unselect-atom-by-name"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "unselect an atom by name (in a molecule)"
+#undef SHORTFORM
Index: src/Actions/SelectionAction/Atoms/NotAtomByNameAction.hpp
===================================================================
--- src/Actions/SelectionAction/Atoms/NotAtomByNameAction.hpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
+++ src/Actions/SelectionAction/Atoms/NotAtomByNameAction.hpp	(revision 3cfb31f11e06cea6265a0b2fc6f2678ab77814cf)
@@ -0,0 +1,22 @@
+/*
+ * NotAtomByNameAction.hpp
+ *
+ *  Created on: May 12, 2017
+ *      Author: heber
+ */
+
+#ifndef NOTATOMBYNAMEACTION_HPP_
+#define NOTATOMBYNAMEACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "NotAtomByNameAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* NOTATOMBYNAMEACTION_HPP_ */
