Index: configure.ac
===================================================================
--- configure.ac	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ configure.ac	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -156,4 +156,5 @@
 BOOST_ARRAY
 BOOST_BIND
+BOOST_CAST
 BOOST_CONVERSION
 BOOST_EXCEPTION
Index: m4/boost.m4
===================================================================
--- m4/boost.m4	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ m4/boost.m4	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -490,4 +490,9 @@
 [BOOST_FIND_HEADER([boost/bind.hpp])])
 
+# BOOST_CAST()
+# ------------
+# Look for Boost.Cast
+BOOST_DEFUN([Cast],
+[BOOST_FIND_HEADER([boost/cast.hpp])])
 
 # BOOST_CONVERSION()
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -545,5 +545,7 @@
 
     // Phase Two: add MPQCJobs and send
-    mpqccontroller.addJobsFromQueue();
+    const size_t NoJobs = mpqccontroller.addJobsFromQueue(
+        params.DoLongrange.get() ? MPQCData::DoSampleDensity : MPQCData::DontSampleDensity);
+    LOG(1, "INFO: Added " << NoJobs << " from FragmentJobsQueue.");
     mpqccontroller.run();
 
Index: src/Fragmentation/Automation/MPQCFragmentController.cpp
===================================================================
--- src/Fragmentation/Automation/MPQCFragmentController.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Fragmentation/Automation/MPQCFragmentController.cpp	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -41,4 +41,5 @@
 #include "MPQCFragmentController.hpp"
 
+#include <boost/cast.hpp>
 #include <boost/filesystem/operations.hpp>
 
@@ -50,5 +51,5 @@
 #include "World.hpp"
 
-bool MPQCFragmentController::addJobsFromQueue()
+bool MPQCFragmentController::addJobsFromQueue(const MPQCData::DoLongrange_t _DoLongrange)
 {
   // give them all valid ids
@@ -57,4 +58,6 @@
       jobiter != newjobs.end();
       ++jobiter) {
+    MPQCJob *job = boost::polymorphic_downcast<MPQCJob *>(jobiter->get());
+    job->DoLongrange = _DoLongrange;
     changeJobId((*jobiter), getAvailableId());
   }
Index: src/Fragmentation/Automation/MPQCFragmentController.hpp
===================================================================
--- src/Fragmentation/Automation/MPQCFragmentController.hpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Fragmentation/Automation/MPQCFragmentController.hpp	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -41,7 +41,8 @@
   /** Command Controller to fill its hold of jobs from FragmentJobQueue.
    *
+   * \param _DoSampleDensity whether to actually sample the resulting electronic density
    * \return true - jobs obtained, false - queue empty
    */
-  bool addJobsFromQueue();
+  bool addJobsFromQueue(const MPQCData::DoLongrange_t _DoLongrange);
 
   /** Get results map of calculated jobs.
Index: src/Jobs/MPQCData.cpp
===================================================================
--- src/Jobs/MPQCData.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Jobs/MPQCData.cpp	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -44,8 +44,10 @@
 
 MPQCData::MPQCData(const SamplingGridProperties &_props) :
+  DoLongrange(DontSampleDensity),
   sampled_grid(_props)
 {}
 
-MPQCData::MPQCData()
+MPQCData::MPQCData() :
+  DoLongrange(DontSampleDensity)
 {}
 
Index: src/Jobs/MPQCData.hpp
===================================================================
--- src/Jobs/MPQCData.hpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Jobs/MPQCData.hpp	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -79,4 +79,11 @@
   std::vector< vector_type  > forces;
 
+  //!> whether to actually sample the density
+  enum DoLongrange_t {
+    DontSampleDensity=0,
+    DoSampleDensity=1
+  };
+  DoLongrange_t DoLongrange;
+
   /// Density
   SamplingGrid sampled_grid;
@@ -118,4 +125,5 @@
     ar & forces;
     ar & sampled_grid;
+    ar & DoLongrange;
     ar & positions;
     ar & charges;
Index: src/Jobs/MPQCJob.cpp
===================================================================
--- src/Jobs/MPQCJob.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Jobs/MPQCJob.cpp	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -46,5 +46,4 @@
 
 #include "CodePatterns/Assert.hpp"
-#include "Jobs/MPQCData.hpp"
 
 
@@ -56,4 +55,5 @@
     const int _level) :
   FragmentJob(_JobId),
+  DoLongrange(MPQCData::DontSampleDensity),
   inputfile(_inputfile),
   grid(_begin, _end, _level)
@@ -64,5 +64,6 @@
 
 MPQCJob::MPQCJob() :
-  FragmentJob(JobId::IllegalJob)
+  FragmentJob(JobId::IllegalJob),
+  DoLongrange(MPQCData::DontSampleDensity)
 {}
 
Index: src/Jobs/MPQCJob.hpp
===================================================================
--- src/Jobs/MPQCJob.hpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Jobs/MPQCJob.hpp	(revision 503acc1d5410844da8877333a7e128ad0a2ab6ee)
@@ -20,4 +20,5 @@
 
 #include "Jobs/Grid/SamplingGridProperties.hpp"
+#include "Jobs/MPQCData.hpp"
 
 #include <string>
@@ -39,4 +40,7 @@
   FragmentResult::ptr Work();
 
+  //!> whether to actually sample the density
+  MPQCData::DoLongrange_t DoLongrange;
+
 private:
   //!> contents of inputfile
@@ -56,4 +60,5 @@
   {
     ar & boost::serialization::base_object<FragmentJob>(*this);
+    ar & DoLongrange;
     ar & const_cast<std::string &>(inputfile);
     ar & const_cast<SamplingGridProperties &>(grid);
