Index: src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
===================================================================
--- src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp	(revision 2e584e7ebd971c6cbd41f1ca6d93bb5fe7887849)
+++ src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp	(revision 18ed8c7a1d88e9db52b1b57a548546f17406a526)
@@ -63,5 +63,4 @@
 #include "Descriptors/AtomIdDescriptor.hpp"
 #include "Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp"
-#include "Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp"
 #include "Fragmentation/Summation/Containers/FragmentationResultContainer.hpp"
 #include "Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp"
@@ -78,5 +77,6 @@
 #include "Fragmentation/Summation/writeIndexedTable.hpp"
 #include "Fragmentation/Summation/writeTable.hpp"
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
+#include "Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp"
 #include "Fragmentation/Summation/Containers/VMGData.hpp"
 #include "Fragmentation/Summation/Containers/VMGDataFused.hpp"
@@ -232,4 +232,5 @@
 
 
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
 /** Print long range energy from received results.
  *
@@ -261,8 +262,11 @@
   }
 }
+#endif
 
 void appendToHomologies(
     const FragmentationShortRangeResults &shortrangeresults,
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
     const FragmentationLongRangeResults &longrangeresults,
+#endif
     const bool storeGrids
     )
@@ -311,4 +315,5 @@
     // only store sampled grids if desired
     if (storeGrids) {
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
       // obtain charge distribution
       std::map<IndexSet::ptr, std::pair< MPQCDataGridMap_t, MPQCDataGridMap_t> >::const_iterator chargeiter
@@ -338,4 +343,7 @@
 //          ++iter)
 //        *iter -= offset;
+#else
+      ELOG(1, "Long-range information in homology desired but long-range analysis capability not compiled in.");
+#endif
     }
     values.insert( std::make_pair( graph, value) );
@@ -362,5 +370,9 @@
           << ", associated energy " << iter->second.energy;
       if (iter->second.containsGrids)
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
         output  << ", and sampled grid integral " << iter->second.charge_distribution.integral();
+#else
+        output << ", and there are sampled grids but capability not compiled in";
+#endif
       output << ".";
       LOG(2, output.str());
@@ -610,5 +622,5 @@
   }
 
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
   if (DoLongrange) {
     if ( World::getInstance().getAllAtoms().size() == 0) {
@@ -651,14 +663,10 @@
   }
 #else
-  if (DoLongrange)
+  if (DoLongrange) {
     ELOG(2, "File contains long-range information but long-range analysis capability not compiled in.");
+  }
 
   // append all keysets to homology file with short-range info only (without grids)
-  {
-    std::map<JobId_t, VMGData> longrangeData;
-    FragmentationLongRangeResults longrangeresults(
-        shortrangedata,longrangeData,keysets, forcekeysets);
-    appendToHomologies(shortrangeresults, longrangeresults, false);
-  }
+  appendToHomologies(shortrangeresults, false);
 #endif
 
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision 2e584e7ebd971c6cbd41f1ca6d93bb5fe7887849)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision 18ed8c7a1d88e9db52b1b57a548546f17406a526)
@@ -72,5 +72,5 @@
 #include "Fragmentation/Summation/Containers/MPQCData.hpp"
 #include "Fragmentation/KeySetsContainer.hpp"
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
 #include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
 #include "Fragmentation/Automation/VMGFragmentController.hpp"
@@ -184,5 +184,5 @@
 #endif
 
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
   if (params.DoLongrange.get()) {
   if ( World::getInstance().getAllAtoms().size() == 0) {
Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision 2e584e7ebd971c6cbd41f1ca6d93bb5fe7887849)
+++ src/Fragmentation/Automation/Makefile.am	(revision 18ed8c7a1d88e9db52b1b57a548546f17406a526)
@@ -10,5 +10,4 @@
 	Fragmentation/Automation/MPQCFragmentController.cpp \
 	Fragmentation/Automation/SpecificFragmentController.cpp
-endif
 
 if CONDVMG
@@ -16,4 +15,6 @@
 	Fragmentation/Automation/VMGDebugGridFragmentController.cpp \
 	Fragmentation/Automation/VMGFragmentController.cpp
+endif
+
 endif
 
@@ -29,5 +30,4 @@
 	Fragmentation/Automation/SpecificFragmentController.hpp \
 	Fragmentation/Automation/SpecificFragmentController_ReceiveResultContainer_impl.hpp
-endif
 	
 if CONDVMG
@@ -35,4 +35,5 @@
 	Fragmentation/Automation/VMGDebugGridFragmentController.hpp \
 	Fragmentation/Automation/VMGFragmentController.hpp
+endif
 endif
 
Index: src/Fragmentation/Summation/Containers/FragmentationResultContainer.cpp
===================================================================
--- src/Fragmentation/Summation/Containers/FragmentationResultContainer.cpp	(revision 2e584e7ebd971c6cbd41f1ca6d93bb5fe7887849)
+++ src/Fragmentation/Summation/Containers/FragmentationResultContainer.cpp	(revision 18ed8c7a1d88e9db52b1b57a548546f17406a526)
@@ -41,5 +41,5 @@
 #include "CodePatterns/Singleton_impl.hpp"
 
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
 void FragmentationResultContainer::addFullResults(
     const KeySetsContainer &_keysets,
@@ -51,5 +51,5 @@
   OBSERVE;
   ASSERT( ResultsType == BothRanges,
-      "FragmentationResultContainer::getLongRangeResults() - mixing full and short range is not in the cards.");
+      "FragmentationResultContainer::addFullResults() - mixing full and short range is not in the cards.");
   ASSERT( _keysets.KeySets.size() == _forcekeysets.KeySets.size(),
       "FragmentationResultContainer::addFullResults() - keysets ("
@@ -80,5 +80,5 @@
   OBSERVE;
   ASSERT( (ResultsType == ShortRangeOnly) || (keysets.KeySets.empty()) ,
-      "FragmentationResultContainer::getLongRangeResults() - mixing full and short range is not in the cards.");
+      "FragmentationResultContainer::addFullResults() - mixing full and short range is not in the cards.");
   ASSERT( _keysets.KeySets.size() == _forcekeysets.KeySets.size(),
       "FragmentationResultContainer::addFullResults() - keysets ("
@@ -104,5 +104,5 @@
 }
 
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
 const FragmentationResultContainer::longrangedata_t&
 FragmentationResultContainer::getLongRangeResults() const
Index: src/Fragmentation/Summation/Containers/FragmentationResultContainer.hpp
===================================================================
--- src/Fragmentation/Summation/Containers/FragmentationResultContainer.hpp	(revision 2e584e7ebd971c6cbd41f1ca6d93bb5fe7887849)
+++ src/Fragmentation/Summation/Containers/FragmentationResultContainer.hpp	(revision 18ed8c7a1d88e9db52b1b57a548546f17406a526)
@@ -36,5 +36,5 @@
 #include "Fragmentation/Summation/Containers/MPQCData.hpp"
 #include "Fragmentation/Summation/Containers/MPQCDataMap.hpp"
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
 #include "Fragmentation/Summation/Containers/VMGData.hpp"
 #endif
@@ -63,10 +63,10 @@
   //!> typedef for short range data container
   typedef std::map<JobId_t, MPQCData> shortrangedata_t;
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
   //!> typedef for long range data container
   typedef std::map<JobId_t, VMGData> longrangedata_t;
 #endif
 
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
   /** Adds a a set of both short and long range results.
    *
@@ -128,5 +128,5 @@
     shortrangedata.clear();
     summedshortrange.clear();
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
     longrangedata.clear();
 #endif
@@ -139,5 +139,5 @@
   const shortrangedata_t& getShortRangeResults() const  { return shortrangedata; }
   const FragmentationShortRangeResults::summedshortrange_t& getShortRangeSummedResults() const  { return summedshortrange; }
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
   const longrangedata_t& getLongRangeResults() const;
 #endif
@@ -162,5 +162,5 @@
   FragmentationShortRangeResults::summedshortrange_t summedshortrange;
 
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
   //!> container for all long-range results
   std::map<JobId_t, VMGData> longrangedata;
@@ -181,5 +181,5 @@
     if (version > 1)
       ar & summedshortrange;
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
     ar & longrangedata;
 #endif
@@ -196,5 +196,5 @@
     if (version > 1)
       ar & summedshortrange;
-#ifdef HAVE_VMG
+#if defined(HAVE_JOBMARKET) && defined(HAVE_VMG)
     ar & longrangedata;
 #endif
Index: src/Fragmentation/Summation/Containers/Makefile.am
===================================================================
--- src/Fragmentation/Summation/Containers/Makefile.am	(revision 2e584e7ebd971c6cbd41f1ca6d93bb5fe7887849)
+++ src/Fragmentation/Summation/Containers/Makefile.am	(revision 18ed8c7a1d88e9db52b1b57a548546f17406a526)
@@ -5,12 +5,14 @@
 	Fragmentation/Summation/Containers/createMatrixNrLookup.cpp \
 	Fragmentation/Summation/Containers/FragmentationChargeDensity.cpp \
-	Fragmentation/Summation/Containers/FragmentationLongRangeResults.cpp \
 	Fragmentation/Summation/Containers/FragmentationResultContainer.cpp \
 	Fragmentation/Summation/Containers/FragmentationShortRangeResults.cpp \
 	Fragmentation/Summation/Containers/MPQCData.cpp
-	
+
+if CONDJOBMARKET	
 if CONDVMG
 FRAGMENTATIONCONTAINERSOURCE += \
+	Fragmentation/Summation/Containers/FragmentationLongRangeResults.cpp \
 	Fragmentation/Summation/Containers/VMGData.cpp
+endif
 endif
 
@@ -19,5 +21,4 @@
 	Fragmentation/Summation/Containers/extractJobIds.hpp \
 	Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp \
-	Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp \
 	Fragmentation/Summation/Containers/FragmentationResultContainer.hpp \
 	Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp \
@@ -26,11 +27,14 @@
 	Fragmentation/Summation/Containers/MPQCDataMap.hpp \
 	Fragmentation/Summation/Containers/MPQCData_printKeyNames.hpp
-	
+
+if CONDJOBMARKET	
 if CONDVMG
 FRAGMENTATIONCONTAINERHEADER += \
+	Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp \
 	Fragmentation/Summation/Containers/VMGData.hpp \
 	Fragmentation/Summation/Containers/VMGDataFused.hpp \
 	Fragmentation/Summation/Containers/VMGDataMap.hpp \
 	Fragmentation/Summation/Containers/VMGData_printKeyNames.hpp
+endif
 endif
 
Index: src/Jobs/Makefile.am
===================================================================
--- src/Jobs/Makefile.am	(revision 2e584e7ebd971c6cbd41f1ca6d93bb5fe7887849)
+++ src/Jobs/Makefile.am	(revision 18ed8c7a1d88e9db52b1b57a548546f17406a526)
@@ -3,5 +3,5 @@
 
 JOBSSOURCE =
-if  CONDJOBMARKET
+if CONDJOBMARKET
 else
 JOBSSOURCE += \
@@ -14,4 +14,5 @@
 	Jobs/MPQCCommandJob.cpp \
 	Jobs/MPQCJob.cpp
+if CONDJOBMARKET
 if CONDVMG
 JOBSSOURCE += \
@@ -21,4 +22,5 @@
 	Jobs/VMGJob.cpp \
 	Jobs/WindowGrid_converter.cpp
+endif
 endif
 
@@ -38,4 +40,5 @@
 	Jobs/MPQCJob.hpp \
 	Jobs/MPQCJob_binding.hpp
+if CONDJOBMARKET
 if CONDVMG
 JOBSHEADER += \
@@ -47,4 +50,5 @@
 	Jobs/VMGJob_binding.hpp \
 	Jobs/WindowGrid_converter.hpp
+endif
 endif
 
@@ -66,7 +70,9 @@
 libMolecuilderJobs_la_LIBADD = \
   libMolecuilderFragmentationSummation.la
+if CONDJOBMARKET
 if CONDVMG
 libMolecuilderJobs_la_LIBADD += \
   $(VMG_LIBS)
+endif
 endif
 
