diff --git a/src/ComputeForce.h b/src/ComputeForce.h
index 8270fd5f6062ade18bc4ba80942ea12576ff2f01..a523404f3cd5abf04af60cb35df4bd3ea6eed1b1 100644
--- a/src/ComputeForce.h
+++ b/src/ComputeForce.h
@@ -28,20 +28,28 @@
 #include "GPUManager.h"
 
 // #include <map>
-#include <boost/unordered_map.hpp>
+
 #include <cstdio>
 // #include <cuda_runtime.h>
 #include <thrust/transform_reduce.h>	// thrust::reduce
 #include <thrust/functional.h>				// thrust::plus
 
+#ifdef USE_BOOST
+#include <boost/unordered_map.hpp>
+typedef boost::unordered_map<String,unsigned int> XpotMap;
 inline std::size_t hash_value(String const& s) {
     if (s.length() == 0) return 0;
-    // return hash_value(s.val());
     return boost::hash_range(s.val(), s.val()+s.length());
 }
+#else
+#include <map>
+typedef std::map<String,unsigned int> XpotMap;
+inline std::size_t hash_value(String const& s) {
+    if (s.length() == 0) return 0;
+    return hash_value(s.val());
+}
+#endif
 
-typedef boost::unordered_map<String,unsigned int> XpotMap;
-// typedef std::map<String,unsigned int> XpotMap;
 
 
 const unsigned int NUM_THREADS = 256;
diff --git a/src/Configuration.h b/src/Configuration.h
index 55b0ad2f11027a2a0e6cb6f5343ef34dd9b7f313..85ae13f3d33d00e885bc84b3aa9ead13d6fdf6cf 100644
--- a/src/Configuration.h
+++ b/src/Configuration.h
@@ -251,7 +251,6 @@ public:
 	int numProductPotentials;
 	bool readProductPotentialsFromFile;
         ProductPotentialConf* productPotentials;
-        // boost::unordered_map<String, unsigned int> simple_potential_ids;
 	XpotMap simple_potential_ids;
         std::vector<SimplePotential> simple_potentials;
 
diff --git a/src/Makefile b/src/Makefile
index 23b9905cb6909d6423792c5843afd42521d04667..2ada08a70a232651b7218a14c144816534448e0a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -66,6 +66,10 @@ $(foreach SM,$(SMPTXS), $(eval NV_FLAGS += -gencode arch=compute_$(SM),code=comp
 NVLD_FLAGS := $(NV_FLAGS) --device-link 
 LD_FLAGS = -L$(LIBRARY) -lcurand -lcudart -lcudadevrt -Wl,-rpath,$(LIBRARY)
 
+ifdef USE_BOOST
+	CC_FLAGS += -DUSE_BOOST
+endif
+
 ### Sources
 CC_SRC := $(wildcard *.cpp)
 CC_SRC := $(filter-out arbd.cpp, $(CC_SRC))