Index: src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp
===================================================================
--- src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp	(revision eee966fe34197e1773f114db10205f2b7ad6f78e)
+++ src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp	(revision eee966fe34197e1773f114db10205f2b7ad6f78e)
@@ -0,0 +1,134 @@
+/*
+ * 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.
+ */
+
+/*
+ * FillVoidWithMoleculeAction.cpp
+ *
+ *  Created on: May 10, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "Helpers/MemDebug.hpp"
+
+#include "atom.hpp"
+#include "bondgraph.hpp"
+#include "boundary.hpp"
+#include "config.hpp"
+#include "molecule.hpp"
+#include "Helpers/Verbose.hpp"
+#include "World.hpp"
+
+#include "Parser/MpqcParser.hpp"
+#include "Parser/PcpParser.hpp"
+#include "Parser/PdbParser.hpp"
+#include "Parser/TremoloParser.hpp"
+#include "Parser/XyzParser.hpp"
+#include "Parser/FormatParserStorage.hpp"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+#include "Actions/MoleculeAction/FillVoidWithMoleculeAction.hpp"
+
+// and construct the stuff
+#include "FillVoidWithMoleculeAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr MoleculeFillVoidWithMoleculeAction::performCall() {
+
+  // obtain information
+  getParametersfromValueStorage();
+
+  DoLog(1) && (Log() << Verbose(1) << "Filling Box with water molecules, lengths(" << params.lengths[0] << "," << params.lengths[1] << "," << params.lengths[2] << "), distances (" << params.distances[0] << "," << params.distances[1] << "," << params.distances[2] << "), DoRotate " << params.DoRotate << "." << endl);
+  // construct water molecule
+  molecule *filler = World::getInstance().createMolecule();
+  std::string FilenameSuffix = params.fillername.substr(params.fillername.find_last_of('.')+1, params.fillername.length());
+  ifstream input;
+  input.open(params.fillername.c_str());
+  switch (FormatParserStorage::getInstance().getTypeFromSuffix(FilenameSuffix)) {
+    case mpqc:
+      {
+        MpqcParser mpqcparser;
+        mpqcparser.load(&input);
+        break;
+      }
+    case pcp:
+      {
+        PcpParser pcpparser;
+        pcpparser.load(&input);
+        break;
+      }
+    case pdb:
+      {
+        PdbParser pdbparser;
+        pdbparser.load(&input);
+        break;
+      }
+    case tremolo:
+      {
+        TremoloParser tremoloparser;
+        tremoloparser.load(&input);
+        break;
+      }
+    case xyz:
+      {
+        XyzParser xyzparser;
+        xyzparser.load(&input);
+        break;
+      }
+    default:
+      DoeLog(0) && (eLog()<< Verbose(0) << "Could not parse filler molecule from " << params.fillername << "." << endl);
+      break;
+  }
+  World::MoleculeIterator iter = World::getInstance().getMoleculeIter();
+  for (; iter != World::getInstance().moleculeEnd(); ++iter)
+    filler = *iter; // get last molecule
+  filler->SetNameFromFilename(params.fillername.c_str());
+  World::getInstance().getConfig()->BG->ConstructBondGraph(filler);
+
+  // call routine
+  double distance[NDIM];
+  for (int i=0;i<NDIM;i++)
+    distance[i] = params.distances[i];
+  FillVoidWithMolecule(filler, *(World::getInstance().getConfig()), distance, params.lengths[0], params.lengths[1], params.lengths[2], params.DoRotate);
+
+  return Action::success;
+}
+
+Action::state_ptr MoleculeFillVoidWithMoleculeAction::performUndo(Action::state_ptr _state) {
+//  MoleculeFillVoidWithMoleculeState *state = assert_cast<MoleculeFillVoidWithMoleculeState*>(_state.get());
+
+//  string newName = state->mol->getName();
+//  state->mol->setName(state->lastName);
+
+  return Action::failure;
+}
+
+Action::state_ptr MoleculeFillVoidWithMoleculeAction::performRedo(Action::state_ptr _state){
+  // Undo and redo have to do the same for this action
+  return performUndo(_state);
+}
+
+bool MoleculeFillVoidWithMoleculeAction::canUndo() {
+  return false;
+}
+
+bool MoleculeFillVoidWithMoleculeAction::shouldUndo() {
+  return false;
+}
+
+const string MoleculeFillVoidWithMoleculeAction::getName() {
+  return NAME;
+}
+/** =========== end of function ====================== */
Index: src/Actions/MoleculeAction/FillVoidWithMoleculeAction.def
===================================================================
--- src/Actions/MoleculeAction/FillVoidWithMoleculeAction.def	(revision eee966fe34197e1773f114db10205f2b7ad6f78e)
+++ src/Actions/MoleculeAction/FillVoidWithMoleculeAction.def	(revision eee966fe34197e1773f114db10205f2b7ad6f78e)
@@ -0,0 +1,26 @@
+/*
+ * FillVoidWithMoleculeAction.def
+ *
+ *  Created on: Aug 26, 2010
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include "LinearAlgebra/Vector.hpp"
+class MoleculeListClass;
+
+// i.e. there is an integer with variable name Z that can be found in
+// ValueStorage by the token "Z" -> first column: int, Z, "Z"
+// "undefine" if no parameters are required
+#define paramtypes (std::string) (Vector) (Vector) (bool)
+#define paramtokens (MoleculeFillVoidWithMoleculeAction::NAME) ("distances") ("lengths") ("DoRotate")
+#define paramreferences (fillername) (distances) (lengths) (DoRotate)
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Molecule
+#define ACTIONNAME FillVoidWithMolecule
+#define TOKEN "fill-void"
+
Index: src/Actions/MoleculeAction/FillVoidWithMoleculeAction.hpp
===================================================================
--- src/Actions/MoleculeAction/FillVoidWithMoleculeAction.hpp	(revision eee966fe34197e1773f114db10205f2b7ad6f78e)
+++ src/Actions/MoleculeAction/FillVoidWithMoleculeAction.hpp	(revision eee966fe34197e1773f114db10205f2b7ad6f78e)
@@ -0,0 +1,16 @@
+/*
+ * FillVoidWithMoleculeAction.hpp
+ *
+ *  Created on: May 10, 2010
+ *      Author: heber
+ */
+
+#ifndef FILLVOIDWITHMOLECULEACTION_HPP
+#define FILLVOIDWITHMOLECULEACTION_HPP
+
+#include "Actions/Action.hpp"
+
+#include "FillVoidWithMoleculeAction.def"
+#include "Action_impl_header.hpp"
+
+#endif // FILLVOIDWITHMOLECULEACTION_HPP
