Index: src/Actions/FragmentationAction/FragmentationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.cpp	(revision a1d1dd8b043f6987e14d6d37973e71bd8ccad587)
+++ src/Actions/FragmentationAction/FragmentationAction.cpp	(revision 5d555048c6955ac3bda0b2cb4b3e6b20ab49880e)
@@ -42,5 +42,7 @@
 #include "Fragmentation/Exporters/ExportGraph_ToFiles.hpp"
 #include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp"
+#include "Fragmentation/Exporters/SaturatedBond.hpp"
 #include "Fragmentation/Exporters/SaturatedFragment.hpp"
+#include "Fragmentation/Exporters/SaturationDistanceMaximizer.hpp"
 #include "Fragmentation/Fragmentation.hpp"
 #include "Fragmentation/Graph.hpp"
@@ -264,4 +266,106 @@
   // create global saturation positions map
   SaturatedFragment::GlobalSaturationPositions_t globalsaturationpositions;
+  {
+    // go through each atom
+    for (World::AtomSelectionConstIterator iter = world.beginAtomSelection();
+        iter != world.endAtomSelection(); ++iter) {
+      const atom * const _atom = iter->second;
+
+      // skip hydrogens if treated special
+      const enum HydrogenTreatment treatment =  params.HowtoTreatHydrogen.get() ? ExcludeHydrogen : IncludeHydrogen;
+      if ((treatment == ExcludeHydrogen) && (_atom->getType()->getAtomicNumber() == 1)) {
+        LOG(4, "DEBUG: Skipping hydrogen atom " << *_atom);
+        continue;
+      }
+
+      // get the valence
+      unsigned int NumberOfPoints = _atom->getElement().getNoValenceOrbitals();
+      LOG(3, "DEBUG: There are " << NumberOfPoints
+          << " places to fill in in total for this atom " << *_atom << ".");
+
+      // check whether there are any bonds with degree larger than 1
+      unsigned int SumOfDegrees = 0;
+      bool PresentHigherBonds = false;
+      const BondList &bondlist = _atom->getListOfBonds();
+      for (BondList::const_iterator bonditer = bondlist.begin();
+          bonditer != bondlist.end(); ++bonditer) {
+        SumOfDegrees += (*bonditer)->getDegree();
+        PresentHigherBonds |= (*bonditer)->getDegree() > 1;
+      }
+
+      // check whether there are alphas to maximize the hydrogens distances
+      SaturationDistanceMaximizer::position_bins_t position_bins;
+      {
+        // gather all bonds and convert to SaturatedBonds
+        SaturationDistanceMaximizer::PositionContainers_t CutBonds;
+        for (BondList::const_iterator bonditer = bondlist.begin();
+            bonditer != bondlist.end(); ++bonditer) {
+          CutBonds.push_back(
+              SaturatedBond::ptr(new SaturatedBond(*(bonditer->get()), *_atom) )
+            );
+        }
+        SaturationDistanceMaximizer maximizer(CutBonds);
+        if (PresentHigherBonds) {
+          // then find best alphas
+          maximizer();
+        } else {
+          // if no higher order bonds, we simply gather the scaled positions
+        }
+        position_bins = maximizer.getAllPositionBins();
+        LOG(4, "DEBUG: Positions for atom " << *_atom << " are " << position_bins);
+      }
+
+      // convert into the desired entry in the map
+      SaturatedFragment::SaturationsPositionsPerNeighbor_t positions_per_neighbor;
+      {
+        BondList::const_iterator bonditer = bondlist.begin();
+        SaturationDistanceMaximizer::position_bins_t::const_iterator biniter =
+            position_bins.begin();
+
+        for (;bonditer != bondlist.end(); ++bonditer, ++biniter) {
+          const atom * const OtherAtom = (*bonditer)->GetOtherAtom(_atom);
+          std::pair<
+              SaturatedFragment::SaturationsPositionsPerNeighbor_t::iterator,
+              bool
+              > inserter;
+          // check whether we treat hydrogen special
+          if ((treatment == ExcludeHydrogen) && (OtherAtom->getType()->getAtomicNumber() == 1)) {
+            // if hydrogen, forget rescaled position and use original one
+            inserter =
+                positions_per_neighbor.insert(
+                    std::make_pair(
+                        OtherAtom->getId(),
+                        SaturatedFragment::SaturationsPositions_t(
+                            1, OtherAtom->getPosition() - _atom->getPosition())
+                    )
+                );
+          } else {
+            inserter =
+                positions_per_neighbor.insert(
+                    std::make_pair(
+                        OtherAtom->getId(),
+                        SaturatedFragment::SaturationsPositions_t(
+                            biniter->begin(),
+                            biniter->end())
+                    )
+                );
+          }
+          // if already pressent, add to this present list
+          ASSERT (inserter.second,
+              "FragmentationAction::performCall() - other atom "
+              +toString(*OtherAtom)+" already present?");
+        }
+        // bonditer follows nicely
+        ASSERT( biniter == position_bins.end(),
+            "FragmentationAction::performCall() - biniter is out of step, it still points at bond "
+            +toString(*biniter)+".");
+      }
+      // and insert
+      globalsaturationpositions.insert(
+          std::make_pair( _atom->getId(),
+              positions_per_neighbor
+          ));
+    }
+  }
 
   {
Index: src/Fragmentation/Exporters/SaturatedFragment.cpp
===================================================================
--- src/Fragmentation/Exporters/SaturatedFragment.cpp	(revision a1d1dd8b043f6987e14d6d37973e71bd8ccad587)
+++ src/Fragmentation/Exporters/SaturatedFragment.cpp	(revision 5d555048c6955ac3bda0b2cb4b3e6b20ab49880e)
@@ -269,20 +269,18 @@
             +toString(*OtherWalker)+" to atom "+toString(*Walker));
 
-        // get typical bond distance from elements database
-        double BondDistance = Walker->getType()->getHBondDistance(positionsiter->second.size()-1);
-        if (BondDistance < 0.) {
-          ELOG(2, "saturateAtoms() - no typical hydrogen bond distance of degree "
-              +toString(positionsiter->second.size())+" for element "
-              +toString(Walker->getType()->getName()));
-          // try bond degree 1 distance
-          BondDistance = Walker->getType()->getHBondDistance(1-1);
-          if (BondDistance < 0.) {
-            ELOG(1, "saturateAtoms() - no typical hydrogen bond distance for element "
-                +toString(Walker->getType()->getName()));
-            BondDistance = 1.;
-          }
-        }
-        ASSERT( BondDistance > 0.,
-            "SaturatedFragment::saturate() - negative bond distance");
+//        // get typical bond distance from elements database
+//        double BondDistance = Walker->getType()->getHBondDistance(positionsiter->second.size()-1);
+//        if (BondDistance < 0.) {
+//          ELOG(2, "saturateAtoms() - no typical hydrogen bond distance of degree "
+//              +toString(positionsiter->second.size())+" for element "
+//              +toString(Walker->getType()->getName()));
+//          // try bond degree 1 distance
+//          BondDistance = Walker->getType()->getHBondDistance(1-1);
+//          if (BondDistance < 0.) {
+//            ELOG(1, "saturateAtoms() - no typical hydrogen bond distance for element "
+//                +toString(Walker->getType()->getName()));
+//            BondDistance = 1.;
+//          }
+//        }
 
         // place hydrogen at each point
@@ -293,5 +291,5 @@
             positer != positionsiter->second.end(); ++positer) {
           const atom& hydrogen =
-              setHydrogenReplacement(Walker, *positer, BondDistance, father);
+              setHydrogenReplacement(Walker, *positer, 1., father);
           FullMolecule.insert(hydrogen.getId());
         }
