Index: doc/userguide/userguide.xml
===================================================================
--- doc/userguide/userguide.xml	(revision 9a477235243f25543ab86842c49bead67c602324)
+++ doc/userguide/userguide.xml	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -498,6 +498,5 @@
               </listitem>
               <listitem>
-                <para>By Element (all hydrogen atoms, all sulphur atoms,
-                ...)</para>
+                <para>By Element (all hydrogen atoms, all sulphur atoms, ...)</para>
                 <programlisting>
                 ... --select-atom-by-element 1
@@ -505,4 +504,14 @@
                 <programlisting>
                 ... --unselect-atom-by-element 1
+                </programlisting>
+              </listitem>
+              <listitem>
+                <para>By name (atom with molecule internal name "H1", e.g. 
+                this will select all "H1" atoms in every present water molecule)</para>
+                <programlisting>
+                ... --select-atom-by-name "H1"
+                </programlisting>
+                <programlisting>
+                ... --unselect-atom-by-name "H1"
                 </programlisting>
               </listitem>
Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision 9a477235243f25543ab86842c49bead67c602324)
+++ src/Actions/GlobalListOfActions.hpp	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -120,4 +120,5 @@
   (SelectionAtomByElement) \
   (SelectionAtomById) \
+  (SelectionAtomByName) \
   (SelectionAtomByOrder) \
   (SelectionClearAllAtoms) \
@@ -135,6 +136,7 @@
   (SelectionNotAllMolecules) \
   (SelectionNotAllShapes) \
+  (SelectionNotAtomByElement) \
   (SelectionNotAtomById) \
-  (SelectionNotAtomByElement) \
+  (SelectionNotAtomByName) \
   (SelectionNotAtomByOrder) \
   (SelectionNotMoleculeOfAtom) \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 9a477235243f25543ab86842c49bead67c602324)
+++ src/Actions/Makefile.am	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -466,4 +466,5 @@
   Actions/SelectionAction/Atoms/AtomByElementAction.cpp \
   Actions/SelectionAction/Atoms/AtomByIdAction.cpp \
+  Actions/SelectionAction/Atoms/AtomByNameAction.cpp \
   Actions/SelectionAction/Atoms/AtomByOrderAction.cpp \
   Actions/SelectionAction/Atoms/ClearAllAtomsAction.cpp \
@@ -474,4 +475,5 @@
   Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp \
   Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp \
+  Actions/SelectionAction/Atoms/NotAtomByNameAction.cpp \
   Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp \
   Actions/SelectionAction/Atoms/PopAtomsAction.cpp \
@@ -483,4 +485,5 @@
   Actions/SelectionAction/Atoms/AtomByElementAction.hpp \
   Actions/SelectionAction/Atoms/AtomByIdAction.hpp \
+  Actions/SelectionAction/Atoms/AtomByNameAction.hpp \
   Actions/SelectionAction/Atoms/AtomByOrderAction.hpp \
   Actions/SelectionAction/Atoms/ClearAllAtomsAction.hpp \
@@ -491,4 +494,5 @@
   Actions/SelectionAction/Atoms/NotAtomByElementAction.hpp \
   Actions/SelectionAction/Atoms/NotAtomByIdAction.hpp \
+  Actions/SelectionAction/Atoms/NotAtomByNameAction.hpp \
   Actions/SelectionAction/Atoms/NotAtomByOrderAction.hpp \
   Actions/SelectionAction/Atoms/PopAtomsAction.hpp \
@@ -500,4 +504,5 @@
   Actions/SelectionAction/Atoms/AtomByElementAction.def \
   Actions/SelectionAction/Atoms/AtomByIdAction.def \
+  Actions/SelectionAction/Atoms/AtomByNameAction.def \
   Actions/SelectionAction/Atoms/AtomByOrderAction.def \
   Actions/SelectionAction/Atoms/ClearAllAtomsAction.def \
@@ -508,4 +513,5 @@
   Actions/SelectionAction/Atoms/NotAtomByElementAction.def \
   Actions/SelectionAction/Atoms/NotAtomByIdAction.def \
+  Actions/SelectionAction/Atoms/NotAtomByNameAction.def \
   Actions/SelectionAction/Atoms/NotAtomByOrderAction.def \
   Actions/SelectionAction/Atoms/PopAtomsAction.def \
Index: src/Actions/SelectionAction/Atoms/AtomByNameAction.cpp
===================================================================
--- src/Actions/SelectionAction/Atoms/AtomByNameAction.cpp	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ src/Actions/SelectionAction/Atoms/AtomByNameAction.cpp	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -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 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ src/Actions/SelectionAction/Atoms/AtomByNameAction.def	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -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 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ src/Actions/SelectionAction/Atoms/AtomByNameAction.hpp	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -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 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ src/Actions/SelectionAction/Atoms/NotAtomByNameAction.cpp	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -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 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ src/Actions/SelectionAction/Atoms/NotAtomByNameAction.def	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -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 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ src/Actions/SelectionAction/Atoms/NotAtomByNameAction.hpp	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -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_ */
Index: tests/Python/AllActions/options.dat
===================================================================
--- tests/Python/AllActions/options.dat	(revision 9a477235243f25543ab86842c49bead67c602324)
+++ tests/Python/AllActions/options.dat	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -194,4 +194,5 @@
 select-atom-by-element	"4"
 select-atom-by-id	"0"
+select-atom-by-name	"H1"
 select-atom-by-order	"1"
 select-atoms-inside-cuboid	"10 10 10"
@@ -254,4 +255,5 @@
 unselect-atom-by-element	"4"
 unselect-atom-by-id	"0"
+unselect-atom-by-name	"H1"
 unselect-atom-by-order	"1"
 unselect-atoms-inside-cuboid	"10 10 10"
Index: tests/regression/Makefile.am
===================================================================
--- tests/regression/Makefile.am	(revision 9a477235243f25543ab86842c49bead67c602324)
+++ tests/regression/Makefile.am	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -237,4 +237,6 @@
 	$(srcdir)/Selection/Atoms/AtomById/testsuite-selection-unselect-atom-by-id.at \
 	$(srcdir)/Selection/Atoms/AtomById/testsuite-selection-unselect-atom-by-id-multiple.at \
+	$(srcdir)/Selection/Atoms/AtomByName/testsuite-selection-select-atoms-by-name.at \
+	$(srcdir)/Selection/Atoms/AtomByName/testsuite-selection-unselect-atoms-by-name.at \
 	$(srcdir)/Selection/Atoms/AtomByOrder/testsuite-selection-select-atom-by-order.at \
 	$(srcdir)/Selection/Atoms/AtomByOrder/testsuite-selection-unselect-atom-by-order.at \
Index: tests/regression/Selection/Atoms/AtomByName/post/ethane-H5_missing.pdb
===================================================================
--- tests/regression/Selection/Atoms/AtomByName/post/ethane-H5_missing.pdb	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ tests/regression/Selection/Atoms/AtomByName/post/ethane-H5_missing.pdb	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -0,0 +1,16 @@
+REMARK created by molecuilder on Fri May 12 22:19:11 2017, time step 0
+ATOM      1 C01 0non 01          9.375  10.442  10.000  0.00  0.00           C 0
+ATOM      2 C02 0non 01         10.625   9.558  10.000  0.00  0.00           C 0
+ATOM      3 H01 0non 01          9.375  11.071   9.110  0.00  0.00           H 0
+ATOM      4 H02 0non 01          9.375  11.071  10.890  0.00  0.00           H 0
+ATOM      5 H04 0non 01         10.625   8.929   9.110  0.00  0.00           H 0
+ATOM      6 H05 0non 01         10.625   8.929  10.890  0.00  0.00           H 0
+ATOM      7 H06 0non 01         11.515  10.188  10.000  0.00  0.00           H 0
+CONECT    1    2    3    4                                                      
+CONECT    2    1    5    6    7                                                 
+CONECT    3    1                                                                
+CONECT    4    1                                                                
+CONECT    5    2                                                                
+CONECT    6    2                                                                
+CONECT    7    2                                                                
+END
Index: tests/regression/Selection/Atoms/AtomByName/pre/ethane.pdb
===================================================================
--- tests/regression/Selection/Atoms/AtomByName/pre/ethane.pdb	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ tests/regression/Selection/Atoms/AtomByName/pre/ethane.pdb	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -0,0 +1,18 @@
+REMARK created by molecuilder on Mon Jun 10 22:42:25 2013, time step 0
+ATOM      1 C01 0non 01          9.375  10.442  10.000  0.00  0.00           C 0
+ATOM      2 C02 0non 01         10.625   9.558  10.000  0.00  0.00           C 0
+ATOM      3 H01 0non 01          9.375  11.071   9.110  0.00  0.00           H 0
+ATOM      4 H02 0non 01          9.375  11.071  10.890  0.00  0.00           H 0
+ATOM      5 H03 0non 01          8.485   9.812  10.000  0.00  0.00           H 0
+ATOM      6 H04 0non 01         10.625   8.929   9.110  0.00  0.00           H 0
+ATOM      7 H05 0non 01         10.625   8.929  10.890  0.00  0.00           H 0
+ATOM      8 H06 0non 01         11.515  10.188  10.000  0.00  0.00           H 0
+CONECT    1    2    3    4    5                                                 
+CONECT    2    1    6    7    8                                                 
+CONECT    3    1                                                                
+CONECT    4    1                                                                
+CONECT    5    1                                                                
+CONECT    6    2                                                                
+CONECT    7    2                                                                
+CONECT    8    2                                                                
+END
Index: tests/regression/Selection/Atoms/AtomByName/testsuite-selection-select-atoms-by-name.at
===================================================================
--- tests/regression/Selection/Atoms/AtomByName/testsuite-selection-select-atoms-by-name.at	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ tests/regression/Selection/Atoms/AtomByName/testsuite-selection-select-atoms-by-name.at	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -0,0 +1,53 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2017 Frederik Heber
+#
+#    This program 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 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### 6. (un)select atoms by name
+
+# select name by atomic number: 1, 4
+AT_SETUP([Selection - All atoms by specific name])
+AT_KEYWORDS([selection atom name select-atom-by-name])
+
+file=ethane-H5_missing.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByName/pre/ethane.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-name H5 -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByName/post/ethane-H5_missing.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Selection - All atoms by specific name with Undo])
+AT_KEYWORDS([selection atom name select-atom-by-name undo])
+
+file=ethane.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByName/pre/ethane.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-name H5 --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByName/pre/ethane.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Selection - All atoms by specific name with Redo])
+AT_KEYWORDS([selection atom name select-atom-by-name redo])
+
+file=ethane-H5_missing.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByName/pre/ethane.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-atom-by-name H5 --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByName/post/ethane-H5_missing.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Selection/Atoms/AtomByName/testsuite-selection-unselect-atoms-by-name.at
===================================================================
--- tests/regression/Selection/Atoms/AtomByName/testsuite-selection-unselect-atoms-by-name.at	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
+++ tests/regression/Selection/Atoms/AtomByName/testsuite-selection-unselect-atoms-by-name.at	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -0,0 +1,72 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2008-2012 University of Bonn
+#
+#    This program 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 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### 5. (un)select atoms by element
+
+
+# select element by atomic number: 1, 4
+AT_SETUP([Unselection - All atoms with specific element by atomic number])
+AT_KEYWORDS([unselection atom element unselect-atom-by-element])
+
+file=test-H_present.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-H_present.xyz], 0, [ignore], [ignore])
+
+file=test-Be_present.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-Be_present.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Unselection - All atoms with specific element by symbol with Undo])
+AT_KEYWORDS([unselection atom element unselect-atom-by-element undo])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/empty.xyz], 0, [ignore], [ignore])
+
+file=test.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 --undo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/empty.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Unselection - All atoms with specific element by symbol with Redo])
+AT_KEYWORDS([unselection atom element unselect-atom-by-element redo])
+
+file=test-H_present.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 1 --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-H_present.xyz], 0, [ignore], [ignore])
+
+file=test-Be_present.xyz
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/pre/test.xyz $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -v 3 --select-all-atoms --unselect-atom-by-element 4 --undo --redo -r], 0, [stdout], [stderr])
+AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomByElement/post/test-Be_present.xyz], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Selection/Atoms/testsuite-selection-atoms.at
===================================================================
--- tests/regression/Selection/Atoms/testsuite-selection-atoms.at	(revision 9a477235243f25543ab86842c49bead67c602324)
+++ tests/regression/Selection/Atoms/testsuite-selection-atoms.at	(revision 3f6aac06d33e464dc0334c630276ee1638946e4d)
@@ -38,4 +38,8 @@
 m4_include(Selection/Atoms/AtomById/testsuite-selection-unselect-atom-by-id-multiple.at)
 
+# (un)select atoms by name
+m4_include(Selection/Atoms/AtomByName/testsuite-selection-select-atoms-by-name.at)
+m4_include(Selection/Atoms/AtomByName/testsuite-selection-unselect-atoms-by-name.at)
+
 # (un)select atom by order
 m4_include(Selection/Atoms/AtomByOrder/testsuite-selection-select-atom-by-order.at)
