Index: src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp
===================================================================
--- src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp	(revision e45c1db4f33537aab8e2a1b4716c0deefcc700ec)
+++ src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp	(revision 7951b9d3df66de816abcb21f059cd10414a9d20a)
@@ -55,6 +55,9 @@
   output.open(params.outputname.get().string().c_str());
   binoutput.open(params.binoutputname.get().string().c_str());
-  molecule *surfacemol = const_cast<molecule *>(params.Boundary.get());
-  ASSERT(surfacemol != NULL, "No molecule specified for SurfaceCorrelation.");
+
+  // check for selected molecules and create surfaces from them
+  std::vector<atom *> atoms(World::getInstance().getSelectedAtoms());
+  LinkedCell_deprecated * LCList = NULL;
+  Tesselation * TesselStruct = NULL;
   const double radius = 4.;
   double LCWidth = 20.;
@@ -65,14 +68,19 @@
       LCWidth = 2.*radius;
   }
+  if ( atoms.size() == 0) {
+    ELOG(1, "You have not select any atoms.");
+    return Action::failure;
+  }
+  // create adaptor for the selected atoms
+  PointCloudAdaptor< std::vector<atom *> > cloud(&atoms, std::string("Selected atoms"));
 
-  // get the boundary
-  class Tesselation *TesselStruct = NULL;
-  const LinkedCell_deprecated *LCList = NULL;
-  // find biggest molecule
+  // create tesselation
+  LCList = new LinkedCell_deprecated(cloud, 2.*radius);
+  TesselStruct = new Tesselation;
+  (*TesselStruct)(cloud, radius);
+
+  // correlate
   std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules();
   std::cout << "There are " << molecules.size() << " selected molecules." << std::endl;
-  PointCloudAdaptor<molecule> cloud(surfacemol, surfacemol->name);
-  LCList = new LinkedCell_deprecated(cloud, LCWidth);
-  FindNonConvexBorder(surfacemol, TesselStruct, LCList, radius, NULL);
   CorrelationToSurfaceMap *surfacemap = NULL;
   if (params.periodic.get())
Index: src/Actions/AnalysisAction/SurfaceCorrelationAction.def
===================================================================
--- src/Actions/AnalysisAction/SurfaceCorrelationAction.def	(revision e45c1db4f33537aab8e2a1b4716c0deefcc700ec)
+++ src/Actions/AnalysisAction/SurfaceCorrelationAction.def	(revision 7951b9d3df66de816abcb21f059cd10414a9d20a)
@@ -15,9 +15,9 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
-#define paramtypes (std::vector<const element *>)(const molecule *)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
-#define paramreferences (elements)(Boundary)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
-#define paramtokens ("elements")("molecule-by-id")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
-#define paramdescriptions ("set of elements")("index of a molecule")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
-#define paramdefaults (NODEFAULT)(NODEFAULT)(NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
+#define paramtypes (std::vector<const element *>)(double)(double)(double)(boost::filesystem::path)(boost::filesystem::path)(bool)
+#define paramreferences (elements)(BinStart)(BinWidth)(BinEnd)(outputname)(binoutputname)(periodic)
+#define paramtokens ("elements")("bin-start")("bin-width")("bin-end")("output-file")("bin-output-file")("periodic")
+#define paramdescriptions ("set of elements")("start of the first bin")("width of the bins")("start of the last bin")("name of the output file")("name of the bin output file")("system is constraint to periodic boundary conditions")
+#define paramdefaults (NODEFAULT)(NODEFAULT)("0.5")(NODEFAULT)(NODEFAULT)(NODEFAULT)("0")
 
 // some defines for all the names, you may use ACTION, STATE and PARAMS
Index: tests/regression/Analysis/SurfaceCorrelation/testsuite-analysis-surface-correlation.at
===================================================================
--- tests/regression/Analysis/SurfaceCorrelation/testsuite-analysis-surface-correlation.at	(revision e45c1db4f33537aab8e2a1b4716c0deefcc700ec)
+++ tests/regression/Analysis/SurfaceCorrelation/testsuite-analysis-surface-correlation.at	(revision 7951b9d3df66de816abcb21f059cd10414a9d20a)
@@ -5,5 +5,5 @@
 
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/SurfaceCorrelation/pre/test.conf .], 0)
-AT_CHECK([../../molecuilder -i test.conf  -v 3 -I --select-all-molecules --unselect-molecules-by-formula C3H8 --surface-correlation --elements 1 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-width 1. --bin-end 20 --molecule-by-id 0], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder -i test.conf  -v 3 -I --select-molecule-by-id 0 --select-molecules-atoms --unselect-all-molecules --select-all-molecules --unselect-molecules-by-formula C3H8 --surface-correlation --elements 1 --output-file output.csv --bin-output-file bin_output.csv --bin-start 0 --bin-width 1. --bin-end 20], 0, [stdout], [stderr])
 AT_CHECK([fgrep "Begin of CorrelationToSurface" stdout], 0, [ignore], [ignore])
 #AT_CHECK([file=output.csv; diff $file ${abs_top_srcdir}/tests/regression/Analysis/SurfaceCorrelation/post/output.csv], 0, [ignore], [ignore])
