Index: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision 6ff62c8bb90891ea66dfc4882a5f7298de44ba0c)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision 10f0cb73e0cc1105d7dc5360f9c6409f9674a51e)
@@ -163,5 +163,6 @@
         near_field_cells,
         interpolation_degree,
-        params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly))
+        params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
+        params.DoPrintDebug.get()))
       // can't use the summed up fragment due to saturation hydrogens
 //      summedChargeDensity.getFragment(),
@@ -178,17 +179,19 @@
   }
 
-  std::map<JobId_t, std::string> debugData;
-  {
-    if (!full_sample.empty()) {
-      // create debug jobs for each level to print the summed-up potential to vtk files
-      VMGDebugGridFragmentController debugcontroller(io_service);
-      debugcontroller.setHost(params.host.get());
-      debugcontroller.setPort(params.port.get());
-      debugcontroller.requestIds(full_sample.size());
-      if (!debugcontroller.createDebugJobs(full_sample))
-        return Action::failure;
-      debugcontroller.waitforResults(full_sample.size());
-      debugcontroller.getResults(debugData);
-      Exitflag += debugcontroller.getExitflag();
+  if (params.DoPrintDebug.get()) {
+    std::map<JobId_t, std::string> debugData;
+    {
+      if (!full_sample.empty()) {
+        // create debug jobs for each level to print the summed-up potential to vtk files
+        VMGDebugGridFragmentController debugcontroller(io_service);
+        debugcontroller.setHost(params.host.get());
+        debugcontroller.setPort(params.port.get());
+        debugcontroller.requestIds(full_sample.size());
+        if (!debugcontroller.createDebugJobs(full_sample))
+          return Action::failure;
+        debugcontroller.waitforResults(full_sample.size());
+        debugcontroller.getResults(debugData);
+        Exitflag += debugcontroller.getExitflag();
+      }
     }
   }
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.def
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision 6ff62c8bb90891ea66dfc4882a5f7298de44ba0c)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision 10f0cb73e0cc1105d7dc5360f9c6409f9674a51e)
@@ -18,9 +18,9 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
-#define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)(bool)
-#define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("fragment-resultfile")("DoValenceOnly")
-#define paramdescriptions ("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("parse fragment results from the given file")("whether the sampling uses only the valence electron and nuclei charge") 
-#define paramdefaults (PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))(PARAM_DEFAULT("0"))
-#define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(resultsfile)(DoValenceOnly)
+#define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)(bool)(bool)
+#define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("fragment-resultfile")("DoValenceOnly")("DoPrintDebug")
+#define paramdescriptions ("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("parse fragment results from the given file")("whether the sampling uses only the valence electron and nuclei charge")("whether to print grids for debug visualization") 
+#define paramdefaults (PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))
+#define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(resultsfile)(DoValenceOnly)(DoPrintDebug)
 #define paramvalids \
 (DummyValidator< std::string >()) \
@@ -32,4 +32,5 @@
 (DummyValidator< bool >()) \
 (DummyValidator< boost::filesystem::path >()) \
+(DummyValidator< bool >()) \
 (DummyValidator< bool >())
 
