Index: src/Jobs/Grid/SamplingGrid.cpp
===================================================================
--- src/Jobs/Grid/SamplingGrid.cpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
+++ src/Jobs/Grid/SamplingGrid.cpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
@@ -0,0 +1,67 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * SamplingGrid.cpp
+ *
+ *  Created on: 25.07.2012
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// include headers that implement a archive in simple text format
+// otherwise BOOST_CLASS_EXPORT_IMPLEMENT has no effect
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Jobs/Grid/SamplingGrid.hpp"
+
+
+SamplingGrid::SamplingGrid(const double _begin[3],
+    const double _size,
+    const int _level,
+    const std::vector<double> &_sampled_grid) :
+  SamplingGridProperties(_begin, _size, _level),
+  sampled_grid(_sampled_grid)
+{}
+
+SamplingGrid::SamplingGrid(const SamplingGrid &_grid) :
+  SamplingGridProperties(_grid),
+  sampled_grid(_grid.sampled_grid)
+{}
+
+SamplingGrid::SamplingGrid(const SamplingGridProperties &_props) :
+  SamplingGridProperties(_props)
+{}
+
+SamplingGrid::~SamplingGrid()
+{}
+
+// we need to explicitly instantiate the serialization functions as
+// its is only serialized through its base class FragmentJob
+BOOST_CLASS_EXPORT_IMPLEMENT(SamplingGrid)
Index: src/Jobs/Grid/SamplingGrid.hpp
===================================================================
--- src/Jobs/Grid/SamplingGrid.hpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
+++ src/Jobs/Grid/SamplingGrid.hpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
@@ -0,0 +1,83 @@
+/*
+ * SamplingGrid.hpp
+ *
+ *  Created on: 25.07.2012
+ *      Author: heber
+ */
+
+#ifndef SAMPLINGGRID_HPP_
+#define SAMPLINGGRID_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <vector>
+
+#include "boost/serialization/export.hpp"
+#include "boost/serialization/vector.hpp"
+
+#include "Jobs/Grid/SamplingGridProperties.hpp"
+
+class MPQCData;
+
+/** This class stores a sample function on a three-dimensional grid.
+ *
+ */
+class SamplingGrid : public SamplingGridProperties {
+public:
+  /** Constructor for class SamplingGrid.
+   *
+   * \param _begin offset for grid
+   * \param _size edge length of grid
+   * \param _level number of grid points in \f$2^{\text{level}}\f$
+   * \param _sampled_grid sample points
+   */
+  SamplingGrid(const double _begin[3],
+      const double _size,
+      const int _level,
+      const std::vector<double> &_sampled_grid);
+
+  /** Copy constructor for class SamplingGrid.
+   *
+   * \param _grid grid to copy
+   */
+  SamplingGrid(const SamplingGrid &_grid);
+
+  /** Copy constructor for class SamplingGrid from SamplingGridProperties.
+   *
+   * \param _props properties to copy
+   */
+  SamplingGrid(const SamplingGridProperties &_props);
+
+  /** default cstor.
+   */
+  SamplingGrid()
+  {}
+
+  virtual ~SamplingGrid();
+
+public:
+  //!> sample points
+  std::vector< double > sampled_grid;
+
+private:
+  friend class MPQCData;
+
+  friend class boost::serialization::access;
+  // serialization
+  template <typename Archive>
+  void serialize(Archive& ar, const unsigned int version)
+  {
+    ar & boost::serialization::base_object<SamplingGridProperties>(*this);
+    ar & const_cast< std::vector<double> &>(sampled_grid);
+  }
+
+};
+
+// we need to give this class a unique key for serialization
+// its is only serialized through its base class FragmentJob
+BOOST_CLASS_EXPORT_KEY(SamplingGrid)
+
+#endif /* SAMPLINGGRID_HPP_ */
Index: src/Jobs/Grid/SamplingGridProperties.cpp
===================================================================
--- src/Jobs/Grid/SamplingGridProperties.cpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
+++ src/Jobs/Grid/SamplingGridProperties.cpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
@@ -0,0 +1,76 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * SamplingGrid.cpp
+ *
+ *  Created on: 25.07.2012
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// include headers that implement a archive in simple text format
+// otherwise BOOST_CLASS_EXPORT_IMPLEMENT has no effect
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Jobs/Grid/SamplingGridProperties.hpp"
+
+SamplingGridProperties::SamplingGridProperties(
+    const double _begin[3],
+    const double _size,
+    const int _level) :
+  size(_size),
+  level(_level)
+{
+  for(size_t i=0; i<3; ++i)
+    begin[i] = _begin[i];
+}
+
+SamplingGridProperties::SamplingGridProperties(const SamplingGridProperties &_props) :
+  size(_props.size),
+  level(_props.level)
+{
+  for(size_t i=0; i<3; ++i)
+    begin[i] = _props.begin[i];
+}
+
+SamplingGridProperties::SamplingGridProperties() :
+  size(0.),
+  level(0)
+{
+  for(size_t i=0; i<3; ++i)
+    begin[i] = 0.;
+}
+
+SamplingGridProperties::~SamplingGridProperties()
+{}
+
+// we need to explicitly instantiate the serialization functions as
+// its is only serialized through its base class FragmentJob
+BOOST_CLASS_EXPORT_IMPLEMENT(SamplingGridProperties)
Index: src/Jobs/Grid/SamplingGridProperties.hpp
===================================================================
--- src/Jobs/Grid/SamplingGridProperties.hpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
+++ src/Jobs/Grid/SamplingGridProperties.hpp	(revision 28c025c7f16461a5e282e398e0048ebf27c7deec)
@@ -0,0 +1,75 @@
+/*
+ * SamplingGridProperties.hpp
+ *
+ *  Created on: 25.07.2012
+ *      Author: heber
+ */
+
+#ifndef SAMPLINGGRIDPROPERTIES_HPP_
+#define SAMPLINGGRIDPROPERTIES_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "boost/serialization/export.hpp"
+#include "boost/serialization/array.hpp"
+
+/** This class stores a sample function on a three-dimensional grid.
+ *
+ */
+class SamplingGridProperties {
+public:
+  /** Constructor for class SamplingGridProperties.
+   *
+   * \param _begin offset of grid
+   * \param _size edge length of cubic(!) domain
+   * \param _level number of gridpoints as \f$2^{\text{level}}\f$
+   */
+  SamplingGridProperties(
+      const double _begin[3],
+      const double _size,
+      const int _level);
+
+  /** Copy constructor for class SamplingGridProperties.
+   *
+   * \param _props instance to copy from
+   */
+  SamplingGridProperties(const SamplingGridProperties &_props);
+
+  /** Default constructor.
+   */
+  SamplingGridProperties();
+
+  virtual ~SamplingGridProperties();
+
+public:
+  //!> offset of grid
+  double begin[3];
+  //!> size of grid, i.e. edge length of cubic(!) domain
+  double size;
+  //!> level, i.e. \f$2^{\text{level}}\f$ grid points per axis
+  int level;
+
+private:
+
+  friend class boost::serialization::access;
+  // serialization
+  template <typename Archive>
+  void serialize(Archive& ar, const unsigned int version)
+  {
+    int i;
+    for (i=0; i<3; ++i)
+      ar & begin[i];
+    ar & size;
+    ar & level;
+  }
+
+};
+
+// we need to give this class a unique key for serialization
+// its is only serialized through its base class FragmentJob
+BOOST_CLASS_EXPORT_KEY(SamplingGridProperties)
+
+#endif /* SAMPLINGGRIDPROPERTIES_HPP_ */
