Index: src/Actions/FillAction/FillRegularGridAction.cpp
===================================================================
--- src/Actions/FillAction/FillRegularGridAction.cpp	(revision 50d49dca91aa5db281d312ca5ee0fbad52557a21)
+++ src/Actions/FillAction/FillRegularGridAction.cpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -93,5 +93,6 @@
     filler_preparator.addSurfacePredicate(
         params.SphereRadius.get(),
-        atoms);
+        atoms,
+        params.mindistance.get());
   }
   filler_preparator.addVoidPredicate(params.mindistance.get());
Index: src/Actions/FillAction/FillSurfaceAction.cpp
===================================================================
--- src/Actions/FillAction/FillSurfaceAction.cpp	(revision 50d49dca91aa5db281d312ca5ee0fbad52557a21)
+++ src/Actions/FillAction/FillSurfaceAction.cpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -132,5 +132,6 @@
     filler_preparator.addSurfacePredicate(
         params.SphereRadius.get(),
-        atoms);
+        atoms,
+        params.mindistance.get());
   }
   filler_preparator.addVoidPredicate(params.mindistance.get());
Index: src/Actions/FillAction/FillVolumeAction.cpp
===================================================================
--- src/Actions/FillAction/FillVolumeAction.cpp	(revision 50d49dca91aa5db281d312ca5ee0fbad52557a21)
+++ src/Actions/FillAction/FillVolumeAction.cpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -118,5 +118,6 @@
     filler_preparator.addSurfacePredicate(
         params.SphereRadius.get(),
-        atoms);
+        atoms,
+        params.mindistance.get());
   }
   filler_preparator.addVoidPredicate(params.mindistance.get());
Index: src/Filling/Makefile.am
===================================================================
--- src/Filling/Makefile.am	(revision 50d49dca91aa5db281d312ca5ee0fbad52557a21)
+++ src/Filling/Makefile.am	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -16,4 +16,5 @@
 	Filling/Predicates/AnyFillPredicate.cpp \
 	Filling/Predicates/FillPredicate.cpp \
+	Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.cpp \
 	Filling/Predicates/IsInsideDomain_FillPredicate.cpp \
 	Filling/Predicates/IsInsideSurface_FillPredicate.cpp \
@@ -45,4 +46,5 @@
 	Filling/Predicates/FillPredicateBase.hpp \
 	Filling/Predicates/FillPredicate_impl.hpp \
+	Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.hpp \
 	Filling/Predicates/IsInsideDomain_FillPredicate.hpp \
 	Filling/Predicates/IsInsideSurface_FillPredicate.hpp \
Index: src/Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.cpp
===================================================================
--- src/Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.cpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
+++ src/Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.cpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -0,0 +1,62 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. All rights reserved.
+ * 
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * IsCloseEnoughToSurface_FillPredicate.cpp
+ *
+ *  Created on: Feb 16, 2016
+ *      Author: heber
+ */
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include <boost/bind.hpp>
+
+#include <functional>
+
+#include "IsCloseEnoughToSurface_FillPredicate.hpp"
+
+#include "AnyFillPredicate.hpp"
+#include "FillPredicate.hpp"
+#include "IsInsideSurface_FillPredicate.hpp"
+#include "Ops_FillPredicate.hpp"
+#include "Tesselation/tesselation.hpp"
+
+FillPredicate IsCloseEnoughToSurface_FillPredicate(
+		const Tesselation &_tess,
+		const LinkedCell_deprecated &_LC,
+		const double minimum_distance)
+{
+  AnyFillPredicate::FillPredicator function =
+		  boost::bind(std::greater_equal<double>(),
+				  boost::bind(&Tesselation::GetDistanceToSurface, boost::cref(_tess), _1, &_LC),
+  	  	  	  	  minimum_distance
+		  	 );
+  FillPredicate::impl_ptr impl(new AnyFillPredicate(function));
+  return !(FillPredicate(impl) && (!IsInsideSurface_FillPredicate(_tess, _LC)));
+}
Index: src/Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.hpp
===================================================================
--- src/Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.hpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
+++ src/Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.hpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -0,0 +1,28 @@
+/*
+ * IsCloseEnoughToSurface_FillPredicate.hpp
+ *
+ *  Created on: Feb 16, 2016
+ *      Author: heber
+ */
+
+#ifndef ISCLOSEENOUGHTOSURFACE_FILLPREDICATE_HPP_
+#define ISCLOSEENOUGHTOSURFACE_FILLPREDICATE_HPP_
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "FillPredicate.hpp"
+
+class LinkedCell_deprecated;
+class Tesselation;
+
+
+FillPredicate IsCloseEnoughToSurface_FillPredicate(
+		const Tesselation &_tess,
+		const LinkedCell_deprecated &_LC,
+		const double minimum_distance);
+
+#endif /* ISCLOSEENOUGHTOSURFACE_FILLPREDICATE_HPP_ */
Index: src/Filling/Predicates/IsInsideSurface_FillPredicate.cpp
===================================================================
--- src/Filling/Predicates/IsInsideSurface_FillPredicate.cpp	(revision 50d49dca91aa5db281d312ca5ee0fbad52557a21)
+++ src/Filling/Predicates/IsInsideSurface_FillPredicate.cpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -46,5 +46,6 @@
 FillPredicate IsInsideSurface_FillPredicate(const Tesselation &_tess, const LinkedCell_deprecated &_LC)
 {
-  AnyFillPredicate::FillPredicator function = boost::bind(&Tesselation::IsInnerPoint, &_tess, _1, &_LC);
+  AnyFillPredicate::FillPredicator function =
+		  boost::bind(&Tesselation::IsInnerPoint, boost::cref(_tess), _1, &_LC);
   FillPredicate::impl_ptr impl(new AnyFillPredicate(function));
   return FillPredicate(impl);
Index: src/Filling/Preparators/BaseFillerPreparator.cpp
===================================================================
--- src/Filling/Preparators/BaseFillerPreparator.cpp	(revision 50d49dca91aa5db281d312ca5ee0fbad52557a21)
+++ src/Filling/Preparators/BaseFillerPreparator.cpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -46,4 +46,5 @@
 #include "Filling/Mesh/CubeMesh.hpp"
 #include "Filling/Mesh/MeshAdaptor.hpp"
+#include "Filling/Predicates/IsCloseEnoughToSurface_FillPredicate.hpp"
 #include "Filling/Predicates/IsInsideSurface_FillPredicate.hpp"
 #include "Filling/Predicates/IsVoidNode_FillPredicate.hpp"
@@ -85,5 +86,6 @@
 void BaseFillerPreparator::addSurfacePredicate(
     const double _radius,
-    std::vector<atom *> &_atoms)
+    std::vector<atom *> &_atoms,
+    const double minimum_distance)
 {
   // create adaptor for the selected atoms
@@ -96,5 +98,12 @@
 
   // and create predicate
-  surface_predicate = new FillPredicate( IsInsideSurface_FillPredicate( *TesselStruct, *LC ) );
+  if (minimum_distance == 0.)
+	  surface_predicate =
+			  new FillPredicate( IsInsideSurface_FillPredicate(
+					  *TesselStruct, *LC ) );
+  else
+	  surface_predicate =
+			  new FillPredicate( IsCloseEnoughToSurface_FillPredicate(
+					  *TesselStruct, *LC, minimum_distance ) );
 }
 
Index: src/Filling/Preparators/BaseFillerPreparator.hpp
===================================================================
--- src/Filling/Preparators/BaseFillerPreparator.hpp	(revision 50d49dca91aa5db281d312ca5ee0fbad52557a21)
+++ src/Filling/Preparators/BaseFillerPreparator.hpp	(revision df0c802c02abf1177a70b2bafe46af86cee53ad4)
@@ -40,5 +40,6 @@
   void addSurfacePredicate(
       const double _radius,
-      std::vector<atom *> &_atoms);
+      std::vector<atom *> &_atoms,
+      const double minimum_distance = 0.);
   void addRandomInserter(
       const double _RandAtomDisplacement,
