Index: src/Fragmentation/Automation/FragmentJob.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentJob.cpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
+++ src/Fragmentation/Automation/FragmentJob.cpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
@@ -0,0 +1,55 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * FragmentJob.cpp
+ *
+ *  Created on: Oct 19, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "FragmentJob.hpp"
+
+/** Constructor for class FragmentJob.
+ *
+ */
+FragmentJob::FragmentJob() :
+  outputfile(""),
+  JobId(-1)
+{}
+
+/** Constructor for class FragmentJob.
+ *
+ * \param _outputfile configuration file for solver
+ * \param _JobId unique id of this job
+ */
+FragmentJob::FragmentJob(const std::string &_outputfile, const int _JobId) :
+  outputfile(_outputfile),
+  JobId(_JobId)
+{}
+
+/** Destructor for class FragmentJob.
+ *
+ */
+FragmentJob::~FragmentJob()
+{}
+
+/** Comparator for class FragmentJob.
+ * \param other instance to compare to
+ * \return every member variable is the same, else - is not
+ */
+bool FragmentJob::operator==(const FragmentJob &other) const
+{
+  return (outputfile == other.outputfile) && (JobId == JobId);
+}
Index: src/Fragmentation/Automation/FragmentJob.hpp
===================================================================
--- src/Fragmentation/Automation/FragmentJob.hpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
+++ src/Fragmentation/Automation/FragmentJob.hpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
@@ -0,0 +1,60 @@
+/*
+ * FragmentJob.hpp
+ *
+ *  Created on: Oct 19, 2011
+ *      Author: heber
+ */
+
+#ifndef FRAGMENTJOB_HPP_
+#define FRAGMENTJOB_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string>
+
+#include "boost/serialization/access.hpp"
+
+class StockClient;
+
+/** FragmentJob contains all information for the Worker to start the job and
+ * deliver a FragmentResult.
+ *
+ * Important is that this class is fully serializable such that it can be
+ * transfered to a scheduler (server) and be deserialized by the Worker.
+ */
+class FragmentJob
+{
+  friend class StockClient;
+public:
+  FragmentJob();
+  FragmentJob(const std::string &_outputfile, const int _JobId);
+  ~FragmentJob();
+
+  bool operator==(const FragmentJob &other) const;
+
+  bool operator!=(const FragmentJob &other) const {
+    return !(*this == other);
+  }
+
+private:
+  friend class boost::serialization::access;
+  // serialization
+  template <typename Archive>
+  void serialize(Archive& ar, const unsigned int version)
+  {
+    ar & outputfile;
+    ar & JobId;
+  }
+
+private:
+  //!> string containing the configuration file for the solver
+  std::string outputfile;
+  //!> unique id of this job (used for the temporary filename) and associating result
+  int JobId;
+};
+
+
+#endif /* FRAGMENTJOB_HPP_ */
Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision 963c3bb7ef11b28ed00b41281604dbd75f87d0d9)
+++ src/Fragmentation/Automation/Makefile.am	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
@@ -15,5 +15,6 @@
   connection.hpp \
   server.cpp \
-  stock.hpp \
+  FragmentJob.cpp \
+  FragmentJob.hpp \
   StockServer.cpp \
   StockServer.hpp
@@ -30,5 +31,6 @@
   client.cpp \
   connection.hpp \
-  stock.hpp \
+  FragmentJob.cpp \
+  FragmentJob.hpp \
   StockClient.cpp \
   StockClient.hpp
Index: src/Fragmentation/Automation/StockClient.cpp
===================================================================
--- src/Fragmentation/Automation/StockClient.cpp	(revision 963c3bb7ef11b28ed00b41281604dbd75f87d0d9)
+++ src/Fragmentation/Automation/StockClient.cpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
@@ -12,5 +12,5 @@
 #include "connection.hpp" // Must come before boost/serialization headers.
 #include <boost/serialization/vector.hpp>
-#include "stock.hpp"
+#include "FragmentJob.hpp"
 #include "StockClient.hpp"
 
@@ -43,5 +43,5 @@
     // of stocks. The connection::async_read() function will automatically
     // decode the data that is read from the underlying socket.
-    connection_.async_read(stocks_,
+    connection_.async_read(jobs_,
       boost::bind(&StockClient::handle_read, this,
       boost::asio::placeholders::error));
@@ -62,17 +62,9 @@
   {
     // Print out the data that was received.
-    for (std::size_t i = 0; i < stocks_.size(); ++i)
+    for (std::size_t i = 0; i < jobs_.size(); ++i)
     {
-    std::cout << "Stock number " << i << "\n";
-    std::cout << "  code: " << stocks_[i].code << "\n";
-    std::cout << "  name: " << stocks_[i].name << "\n";
-    std::cout << "  open_price: " << stocks_[i].open_price << "\n";
-    std::cout << "  high_price: " << stocks_[i].high_price << "\n";
-    std::cout << "  low_price: " << stocks_[i].low_price << "\n";
-    std::cout << "  last_price: " << stocks_[i].last_price << "\n";
-    std::cout << "  buy_price: " << stocks_[i].buy_price << "\n";
-    std::cout << "  buy_quantity: " << stocks_[i].buy_quantity << "\n";
-    std::cout << "  sell_price: " << stocks_[i].sell_price << "\n";
-    std::cout << "  sell_quantity: " << stocks_[i].sell_quantity << "\n";
+        std::cout << "Job number " << i << "\n";
+        std::cout << "  output: " << jobs_[i].outputfile << "\n";
+        std::cout << "  id: " << jobs_[i].JobId << "\n";
     }
   }
Index: src/Fragmentation/Automation/StockClient.hpp
===================================================================
--- src/Fragmentation/Automation/StockClient.hpp	(revision 963c3bb7ef11b28ed00b41281604dbd75f87d0d9)
+++ src/Fragmentation/Automation/StockClient.hpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
@@ -12,5 +12,5 @@
 #include <vector>
 #include "connection.hpp" // Must come before boost/serialization headers.
-#include "stock.hpp"
+#include "FragmentJob.hpp"
 
 /// Downloads stock quote information from a server.
@@ -33,5 +33,5 @@
 
   /// The data received from the server.
-  std::vector<stock> stocks_;
+  std::vector<FragmentJob> jobs_;
 };
 
Index: src/Fragmentation/Automation/StockServer.cpp
===================================================================
--- src/Fragmentation/Automation/StockServer.cpp	(revision 963c3bb7ef11b28ed00b41281604dbd75f87d0d9)
+++ src/Fragmentation/Automation/StockServer.cpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
@@ -13,5 +13,5 @@
 #include "connection.hpp" // Must come before boost/serialization headers.
 #include <boost/serialization/vector.hpp>
-#include "stock.hpp"
+#include "FragmentJob.hpp"
 
 #include "StockServer.hpp"
@@ -22,28 +22,6 @@
   )
 {
-  // Create the data to be sent to each client.
-  stock s;
-  s.code = "ABC";
-  s.name = "A Big Company";
-  s.open_price = 4.56;
-  s.high_price = 5.12;
-  s.low_price = 4.33;
-  s.last_price = 4.98;
-  s.buy_price = 4.96;
-  s.buy_quantity = 1000;
-  s.sell_price = 4.99;
-  s.sell_quantity = 2000;
-  stocks_.push_back(s);
-  s.code = "DEF";
-  s.name = "Developer Entertainment Firm";
-  s.open_price = 20.24;
-  s.high_price = 22.88;
-  s.low_price = 19.50;
-  s.last_price = 19.76;
-  s.buy_price = 19.72;
-  s.buy_quantity = 34000;
-  s.sell_price = 19.85;
-  s.sell_quantity = 45000;
-  stocks_.push_back(s);
+  FragmentJob s(std::string("test"), 1);
+  jobs_.push_back(s);
 
   // Start an accept operation for a new connection.
@@ -62,5 +40,5 @@
     // client. The connection::async_write() function will automatically
     // serialize the data structure for us.
-    conn->async_write(stocks_,
+    conn->async_write(jobs_,
       boost::bind(&StockServer::handle_write, this,
       boost::asio::placeholders::error, conn));
Index: src/Fragmentation/Automation/StockServer.hpp
===================================================================
--- src/Fragmentation/Automation/StockServer.hpp	(revision 963c3bb7ef11b28ed00b41281604dbd75f87d0d9)
+++ src/Fragmentation/Automation/StockServer.hpp	(revision 31ca5f07f01e2d94689a06092d8e5b8d84a2a909)
@@ -12,5 +12,5 @@
 #include <vector>
 #include "connection.hpp" // Must come before boost/serialization headers.
-#include "stock.hpp"
+#include "FragmentJob.hpp"
 
 /// Serves stock quote information to any client that connects to it.
@@ -33,5 +33,5 @@
 
   /// The data to be sent to each client.
-  std::vector<stock> stocks_;
+  std::vector<FragmentJob> jobs_;
 };
 
Index: src/Fragmentation/Automation/stock.hpp
===================================================================
--- src/Fragmentation/Automation/stock.hpp	(revision 963c3bb7ef11b28ed00b41281604dbd75f87d0d9)
+++ 	(revision )
@@ -1,46 +1,0 @@
-//
-// stock.hpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef SERIALIZATION_STOCK_HPP
-#define SERIALIZATION_STOCK_HPP
-
-#include <string>
-
-/// Structure to hold information about a single stock.
-struct stock
-{
-  std::string code;
-  std::string name;
-  double open_price;
-  double high_price;
-  double low_price;
-  double last_price;
-  double buy_price;
-  int buy_quantity;
-  double sell_price;
-  int sell_quantity;
-
-  template <typename Archive>
-  void serialize(Archive& ar, const unsigned int version)
-  {
-    ar & code;
-    ar & name;
-    ar & open_price;
-    ar & high_price;
-    ar & low_price;
-    ar & last_price;
-    ar & buy_price;
-    ar & buy_quantity;
-    ar & sell_price;
-    ar & sell_quantity;
-  }
-};
-
-#endif // SERIALIZATION_STOCK_HPP
