Index: doc/userguide/userguide.xml
===================================================================
--- doc/userguide/userguide.xml	(revision 0241c59e7f10c73f87336715af0aadac2b2d4db1)
+++ doc/userguide/userguide.xml	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -960,4 +960,21 @@
 
           <programlisting>... --remove-atom</programlisting>
+        </section>
+
+        <section xml:id='atoms.saturate-atom'>
+          <title xml:id='atoms.saturate-atom.title'>Saturating atoms</title>
+
+          <para>Newly instantiated atoms have no bonds to any other atom. If
+          you want to fill up their valence by a slew of hydrogen atoms 
+          residing on a sphere around this atom, use this action.</para>
+
+          <programlisting>
+		... --saturate-atoms
+	  </programlisting>
+
+          <para>A number of hydrogen atoms is added. The number corrresponding
+          to the valence of each selected atom. They are placed in the same
+          distance to this atom and approximately with same distance to their
+	  nearest neighbors.</para>
         </section>
 
Index: src/Actions/AtomAction/SaturateAction.cpp
===================================================================
--- src/Actions/AtomAction/SaturateAction.cpp	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ src/Actions/AtomAction/SaturateAction.cpp	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,124 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2015 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/>.
+ */
+
+/*
+ * SaturateAction.cpp
+ *
+ *  Created on: Jan 26, 2015
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Log.hpp"
+
+#include "Actions/AtomAction/SaturateAction.hpp"
+#include "Actions/UndoRedoHelpers.hpp"
+#include "Atom/atom.hpp"
+#include "Atom/AtomicInfo.hpp"
+#include "Element/element.hpp"
+#include "Element/periodentafel.hpp"
+#include "Fragmentation/Exporters/SphericalPointDistribution.hpp"
+#include "molecule.hpp"
+#include "World.hpp"
+#include "WorldTime.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "SaturateAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+ActionState::ptr AtomSaturateAction::performCall() {
+
+  // get hydrogen element
+  const element * const hydrogen = World::getInstance().getPeriode()->FindElement(1);
+
+  // go through each atom
+  std::vector<AtomicInfo> addedHydrogens;
+  World &world = World::getInstance();
+  for (World::AtomSelectionIterator iter = world.beginAtomSelection();
+      iter != world.endAtomSelection(); ++iter) {
+    atom * const _atom = iter->second;
+
+    // if atom is attached to molecule, add hydrogens there, too
+    molecule * mol = _atom->getMolecule();
+    if (mol == NULL) {
+      mol = World::getInstance().createMolecule();
+      mol->AddAtom(_atom);
+    }
+
+    // add the hydrogens
+    const Vector AtomsPosition = _atom->getPosition();
+    double typical_distance = _atom->getType()->getHBondDistance(1);
+    if (typical_distance == -1.)
+      typical_distance = 1.;
+    SphericalPointDistribution PointSphere(typical_distance);
+    PointSphere.initSelf(_atom->getType()->getNoValenceOrbitals());
+    for (SphericalPointDistribution::Polygon_t::const_iterator iter = PointSphere.points.begin();
+        iter != PointSphere.points.end(); ++iter) {
+      // for every Vector add a point relative to atom's position
+      atom * hydrogenAtom = World::getInstance().createAtom();
+      hydrogenAtom->setType(hydrogen);
+      hydrogenAtom->setPosition(AtomsPosition + *iter);
+      mol->AddAtom(hydrogenAtom);
+      // add bond
+      _atom->addBond(WorldTime::getTime(), hydrogenAtom);
+      // mark down for undo state
+      addedHydrogens.push_back(AtomicInfo(*(hydrogenAtom)));
+    }
+  }
+
+  return ActionState::ptr(new AtomSaturateState(addedHydrogens, params));
+}
+
+ActionState::ptr AtomSaturateAction::performUndo(ActionState::ptr _state) {
+  AtomSaturateState *state = assert_cast<AtomSaturateState*>(_state.get());
+
+  // remove all added hydrogen atoms
+  RemoveAtomsFromAtomicInfo(state->addedHydrogens);
+
+  return ActionState::ptr(_state);
+}
+
+ActionState::ptr AtomSaturateAction::performRedo(ActionState::ptr _state){
+  AtomSaturateState *state = assert_cast<AtomSaturateState*>(_state.get());
+
+  // re-add all added hydrogen atoms
+  AddAtomsFromAtomicInfo(state->addedHydrogens);
+
+  return ActionState::ptr(_state);
+}
+
+bool AtomSaturateAction::canUndo() {
+  return true;
+}
+
+bool AtomSaturateAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/AtomAction/SaturateAction.def
===================================================================
--- src/Actions/AtomAction/SaturateAction.def	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ src/Actions/AtomAction/SaturateAction.def	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,34 @@
+/*
+ * SaturateAction.def
+ *
+ *  Created on: Jan 26, 2015
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include "Atom/AtomicInfo.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
+#undef paramtypes
+#undef paramtokens
+#undef paramdescriptions
+#undef paramreferences
+#undef paramdefaults
+#undef paramvalids
+
+#define statetypes (std::vector<AtomicInfo>)
+#define statereferences (addedHydrogens)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Atom
+#define MENUNAME "atom"
+#define MENUPOSITION 4
+#define ACTIONNAME Saturate
+#define TOKEN "saturate-atoms"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "saturate all selected atoms by adding hydrogens at the typical distance"
+#undef SHORTFORM
Index: src/Actions/AtomAction/SaturateAction.hpp
===================================================================
--- src/Actions/AtomAction/SaturateAction.hpp	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ src/Actions/AtomAction/SaturateAction.hpp	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,22 @@
+/*
+ * SaturateAction.hpp
+ *
+ *  Created on: Jan 26, 2015
+ *      Author: heber
+ */
+
+#ifndef SATURATEACTION_HPP
+#define SATURATEACTION_HPP
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "SaturateAction.def"
+#include "Action_impl_header.hpp"
+
+#endif // SATURATEACTION_HPP
Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision 0241c59e7f10c73f87336715af0aadac2b2d4db1)
+++ src/Actions/GlobalListOfActions.hpp	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -35,4 +35,5 @@
   (AtomRemove) \
   (AtomRotateAroundOriginByAngle) \
+  (AtomSaturate) \
   (AtomSaveSelectedAtoms) \
   (AtomTranslate) \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 0241c59e7f10c73f87336715af0aadac2b2d4db1)
+++ src/Actions/Makefile.am	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -150,4 +150,5 @@
   Actions/AtomAction/RemoveAction.cpp \
   Actions/AtomAction/RotateAroundOriginByAngleAction.cpp \
+  Actions/AtomAction/SaturateAction.cpp \
   Actions/AtomAction/SaveSelectedAtomsAction.cpp \
   Actions/AtomAction/TranslateAction.cpp \
@@ -159,4 +160,5 @@
   Actions/AtomAction/RemoveAction.hpp \
   Actions/AtomAction/RotateAroundOriginByAngleAction.hpp \
+  Actions/AtomAction/SaturateAction.hpp \
   Actions/AtomAction/SaveSelectedAtomsAction.hpp \
   Actions/AtomAction/TranslateAction.hpp \
@@ -168,4 +170,5 @@
   Actions/AtomAction/RemoveAction.def \
   Actions/AtomAction/RotateAroundOriginByAngleAction.def \
+  Actions/AtomAction/SaturateAction.def \
   Actions/AtomAction/SaveSelectedAtomsAction.def \
   Actions/AtomAction/TranslateAction.def \
Index: tests/regression/Atoms/Saturate/post/carbon.xyz
===================================================================
--- tests/regression/Atoms/Saturate/post/carbon.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ tests/regression/Atoms/Saturate/post/carbon.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,3 @@
+1
+	Created by molecuilder on Wed Jan 28 20:57:11 2015, time step 0
+C	10	10	10
Index: tests/regression/Atoms/Saturate/post/nitrogen.xyz
===================================================================
--- tests/regression/Atoms/Saturate/post/nitrogen.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ tests/regression/Atoms/Saturate/post/nitrogen.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,3 @@
+1
+	Created by molecuilder on Wed Jan 28 21:41:39 2015, time step 0
+N	10	10	10
Index: tests/regression/Atoms/Saturate/post/saturated_carbon.xyz
===================================================================
--- tests/regression/Atoms/Saturate/post/saturated_carbon.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ tests/regression/Atoms/Saturate/post/saturated_carbon.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,7 @@
+5
+	Created by molecuilder on Wed Jan 28 20:57:11 2015, time step 0
+C	10	10	10
+H	11.076	10	10
+H	9.64133	11.0145	10
+H	9.64133	9.49277	10.8786
+H	9.64133	9.49277	9.12145
Index: tests/regression/Atoms/Saturate/post/saturated_nitrogen.xyz
===================================================================
--- tests/regression/Atoms/Saturate/post/saturated_nitrogen.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ tests/regression/Atoms/Saturate/post/saturated_nitrogen.xyz	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,6 @@
+4
+	Created by molecuilder on Wed Jan 28 21:41:39 2015, time step 0
+N	10	10	10
+H	11.02	10	10
+H	9.49	10.866	10
+H	9.49	9.13397	10
Index: tests/regression/Atoms/Saturate/testsuite-atoms-saturate_carbon.at
===================================================================
--- tests/regression/Atoms/Saturate/testsuite-atoms-saturate_carbon.at	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ tests/regression/Atoms/Saturate/testsuite-atoms-saturate_carbon.at	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,45 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2015 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/>.
+#
+### add atom
+
+AT_SETUP([Atoms - saturating carbon])
+AT_KEYWORDS([atoms saturate-atoms])
+
+file=saturated_carbon.xyz
+AT_CHECK([../../molecuilder -a 6 --domain-position "10., 10., 10." --select-all-atoms --saturate-atoms --output-as $file], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Atoms - saturating carbon with Undo])
+AT_KEYWORDS([atoms saturate-atoms undo])
+
+file=carbon.xyz
+AT_CHECK([../../molecuilder -a 6 --domain-position "10., 10., 10." --select-all-atoms --saturate-atoms --undo --output-as $file], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Atoms - saturating carbon with Redo])
+AT_KEYWORDS([atoms saturate-atoms redo])
+
+file=saturated_carbon.xyz
+AT_CHECK([../../molecuilder -a 6 --domain-position "10., 10., 10." --select-all-atoms --saturate-atoms --undo --redo --output-as $file], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Atoms/Saturate/testsuite-atoms-saturate_nitrogen.at
===================================================================
--- tests/regression/Atoms/Saturate/testsuite-atoms-saturate_nitrogen.at	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
+++ tests/regression/Atoms/Saturate/testsuite-atoms-saturate_nitrogen.at	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -0,0 +1,45 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2015 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/>.
+#
+### add atom
+
+AT_SETUP([Atoms - saturating nitrogen])
+AT_KEYWORDS([atoms saturate-atoms])
+
+file=saturated_nitrogen.xyz
+AT_CHECK([../../molecuilder -a 7 --domain-position "10., 10., 10." --select-all-atoms --saturate-atoms --output-as $file], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Atoms - saturating nitrogen with Undo])
+AT_KEYWORDS([atoms saturate-atoms undo])
+
+file=nitrogen.xyz
+AT_CHECK([../../molecuilder -a 7 --domain-position "10., 10., 10." --select-all-atoms --saturate-atoms --undo --output-as $file], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+AT_SETUP([Atoms - saturating nitrogen with Redo])
+AT_KEYWORDS([atoms saturate-atoms redo])
+
+file=saturated_nitrogen.xyz
+AT_CHECK([../../molecuilder -a 7 --domain-position "10., 10., 10." --select-all-atoms --saturate-atoms --undo --redo --output-as $file], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/Saturate/post/], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Atoms/testsuite-atoms.at
===================================================================
--- tests/regression/Atoms/testsuite-atoms.at	(revision 0241c59e7f10c73f87336715af0aadac2b2d4db1)
+++ tests/regression/Atoms/testsuite-atoms.at	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -44,2 +44,6 @@
 # mirror atoms
 m4_include([Atoms/Mirror/testsuite-atoms-mirror.at])
+
+# saturate atoms
+m4_include([Atoms/Saturate/testsuite-atoms-saturate_carbon.at])
+m4_include([Atoms/Saturate/testsuite-atoms-saturate_nitrogen.at])
Index: tests/regression/Makefile.am
===================================================================
--- tests/regression/Makefile.am	(revision 0241c59e7f10c73f87336715af0aadac2b2d4db1)
+++ tests/regression/Makefile.am	(revision 2fcef36f8dcba275ab6b2280c2ac65fea1f5322a)
@@ -40,4 +40,6 @@
 	$(srcdir)/Atoms/RemoveSphere/testsuite-atoms-remove-sphere.at \
 	$(srcdir)/Atoms/SaveSelectedAtoms/testsuite-atoms-save-selected-atoms.at \
+	$(srcdir)/Atoms/Saturate/testsuite-atoms-saturate_carbon.at \
+	$(srcdir)/Atoms/Saturate/testsuite-atoms-saturate_nitrogen.at \
 	$(srcdir)/Atoms/Translation/testsuite-atoms-translation.at \
 	$(srcdir)/Atoms/TranslationToOrigin/testsuite-atoms-translation-to-origin.at \
