Index: src/Fragmentation/Automation/VMGFragmentController.cpp
===================================================================
--- src/Fragmentation/Automation/VMGFragmentController.cpp	(revision cd24ba367ef2cf8232c46639fbd66b0f073f2af6)
+++ src/Fragmentation/Automation/VMGFragmentController.cpp	(revision a3d08c372d5b2c9ae144c7badc0018ddcb2271a7)
@@ -88,4 +88,54 @@
     increased_nfc = 3;
   return increased_nfc;
+}
+
+void VMGFragmentController::getFullPositions(
+    std::vector< std::vector<double> > &positions,
+    std::vector<double> &charges,
+    const bool _UseImplicitCharges,
+    const bool _DoValenceOnly)
+{
+  /// \note we cannot use the summed up Fragment here, as the saturation hydrogens
+  /// are in the way and cannot be sorted out properly/in a simple fashion.
+  const World &world = const_cast<const World &>(World::getInstance());
+  const ParticleRegistry &registry = const_cast<const ParticleRegistry &>(ParticleRegistry::getInstance());
+  {
+    const World::ConstAtomComposite &atoms = world.getAllAtoms();
+    positions.reserve(atoms.size());
+    charges.reserve(atoms.size());
+    std::vector<double> position(3, 0.);
+    for (World::ConstAtomComposite::const_iterator iter = atoms.begin();
+        iter != atoms.end(); ++iter) {
+      // set position for this atom
+      const Vector &pos = (*iter)->getPosition();
+      // convert positions to atomic length units
+      for (size_t i=0;i<3;++i)
+        position[i] = pos[i]/AtomicLengthToAngstroem;
+
+      // use partial charges ...
+      const atomId_t atomid = (*iter)->getId();
+      if ((!world.isAtomSelected(atomid)) && (_UseImplicitCharges)) {
+        // ... for all unselected particles ...
+        std::string particlename = (*iter)->getParticleName();
+        if (particlename.empty())
+          particlename = (*iter)->getElement().getSymbol();
+        if (registry.isPresentByName(particlename)) {
+          // ... that are present in ParticleRegistry
+          const Particle * const particle = registry.getByName(particlename);
+          LOG(3, "DEBUG: Using implicit charge " << particle->charge << " of particle "
+              << particle->getName() << " for atom " << atomid);
+          positions.push_back(position);
+          charges.push_back(particle->charge);
+        }
+      } else {
+        double charge = (*iter)->getElement().getAtomicNumber();
+        // subtract core electron charge from nuclei charge if only valence sampled
+        if (_DoValenceOnly == MPQCData::DoSampleValenceOnly)
+          charge -= getCoreElectrons(charge);
+        positions.push_back(position);
+        charges.push_back((double)charge);
+      }
+    }
+  }
 }
 
@@ -141,48 +191,8 @@
 
   /// prepare positions and charges of full system
-  /// \note we cannot use the summed up Fragment here, as the saturation hydrogens
-  /// are in the way and cannot be sorted out properly/in a simple fashion.
   std::vector< std::vector<double> > positions;
   std::vector<double> charges;
-  const World &world = const_cast<const World &>(World::getInstance());
-  const ParticleRegistry &registry = const_cast<const ParticleRegistry &>(ParticleRegistry::getInstance());
-  {
-    const World::ConstAtomComposite &atoms = world.getAllAtoms();
-    positions.reserve(atoms.size());
-    charges.reserve(atoms.size());
-    std::vector<double> position(3, 0.);
-    for (World::ConstAtomComposite::const_iterator iter = atoms.begin();
-        iter != atoms.end(); ++iter) {
-      // set position for this atom
-      const Vector &pos = (*iter)->getPosition();
-      // convert positions to atomic length units
-      for (size_t i=0;i<3;++i)
-        position[i] = pos[i]/AtomicLengthToAngstroem;
-
-      // use partial charges ...
-      const atomId_t atomid = (*iter)->getId();
-      if ((!world.isAtomSelected(atomid)) && (_UseImplicitCharges)) {
-        // ... for all unselected particles ...
-        std::string particlename = (*iter)->getParticleName();
-        if (particlename.empty())
-          particlename = (*iter)->getElement().getSymbol();
-        if (registry.isPresentByName(particlename)) {
-          // ... that are present in ParticleRegistry
-          const Particle * const particle = registry.getByName(particlename);
-          LOG(3, "DEBUG: Using implicit charge " << particle->charge << " of particle "
-              << particle->getName() << " for atom " << atomid);
-          positions.push_back(position);
-          charges.push_back(particle->charge);
-        }
-      } else {
-        double charge = (*iter)->getElement().getAtomicNumber();
-        // subtract core electron charge from nuclei charge if only valence sampled
-        if (_DoValenceOnly == MPQCData::DoSampleValenceOnly)
-          charge -= getCoreElectrons(charge);
-        positions.push_back(position);
-        charges.push_back((double)charge);
-      }
-    }
-  }
+  getFullPositions(positions, charges, _UseImplicitCharges, _DoValenceOnly);
+
   /// and submit full job
   for(std::vector<SamplingGrid>::const_iterator iter = full_sampled_grid.begin();
Index: src/Fragmentation/Automation/VMGFragmentController.hpp
===================================================================
--- src/Fragmentation/Automation/VMGFragmentController.hpp	(revision cd24ba367ef2cf8232c46639fbd66b0f073f2af6)
+++ src/Fragmentation/Automation/VMGFragmentController.hpp	(revision a3d08c372d5b2c9ae144c7badc0018ddcb2271a7)
@@ -92,4 +92,17 @@
   }
 
+  /** Helper function to get at the whole set of nuclei positions.
+   *
+   * \param positions contains positions on return
+   * \param charges contains charges on return
+   * \param _UseImplicitCharges whether to use implicit charges or not
+   * \param _DoValenceOnly whether just valency has been sampled
+   */
+  static void getFullPositions(
+      std::vector< std::vector<double> > &positions,
+      std::vector<double> &charges,
+      const bool _UseImplicitCharges,
+      const bool _DoValenceOnly);
+
 private:
   //!> type-specific result container
