Index: src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
===================================================================
--- src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp	(revision 1e1098614112b1d75c8d4c6e30e2cf32591c0286)
+++ src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -220,24 +220,4 @@
 }
 
-void parseHomologiesFromFile(
-    const boost::filesystem::path &homology_file
-    )
-{
-  HomologyContainer &homology_container = World::getInstance().getHomologies();
-  if (boost::filesystem::exists(homology_file)) {
-    std::ifstream returnstream(homology_file.string().c_str());
-    if (returnstream.good()) {
-      boost::archive::text_iarchive ia(returnstream);
-      ia >> homology_container;
-    } else {
-      ELOG(2, "Failed to parse from " << homology_file.string() << ".");
-    }
-    returnstream.close();
-  } else {
-    LOG(2, "Could not open " << homology_file.string()
-        << ", creating empty container.");
-  }
-}
-
 void appendToHomologies(
     const FragmentationShortRangeResults &shortrangeresults,
@@ -306,27 +286,4 @@
     }
   }
-}
-
-bool writeHomologiesToFile(
-    const boost::filesystem::path &homology_file
-    )
-{
-  /// store homology container again
-  HomologyContainer &homology_container = World::getInstance().getHomologies();
-  std::ofstream outputstream(homology_file.string().c_str());
-  if (outputstream.good()) { // check if opened
-    boost::archive::text_oarchive oa(outputstream);
-    oa << homology_container;
-    if (outputstream.fail()) { // check if correctly written
-      LOG(1, "Failed to write to file " << homology_file.string() << ".");
-      return false;
-    } else
-      outputstream.close();
-  } else {
-    LOG(1, "Failed to open file " << homology_file.string()
-        << " for writing.");
-    return false;
-  }
-  return true;
 }
 
@@ -427,14 +384,4 @@
     // append all keysets to homology file
     appendToHomologies(shortrangeresults, longrangeresults);
-    if (!params.homology_file.get().empty()) {
-      const boost::filesystem::path &homology_file = params.homology_file.get();
-      if (homology_file.string() != "") {
-        LOG(1, "INFO: Parsing HomologyGraphs from file " << homology_file.string() << ".");
-        parseHomologiesFromFile(homology_file);
-        LOG(1, "INFO: Appending HomologyGraphs to file " << homology_file.string() << ".");
-        if (!writeHomologiesToFile(homology_file))
-          return Action::failure;
-      }
-    }
   }
 #else
Index: src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.def
===================================================================
--- src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.def	(revision 1e1098614112b1d75c8d4c6e30e2cf32591c0286)
+++ src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.def	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -10,16 +10,14 @@
 
 #include "Parameters/Validators/DummyValidator.hpp"
-#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
 
 // 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, use (NOPARAM_DEFAULT) for each (undefined) default value
-#define paramtypes (boost::filesystem::path)(boost::filesystem::path)
-#define paramtokens ("homology-file")("fragment-resultfile")
-#define paramdescriptions ("path to file containing homology container to append to")("parse fragment results from the given file")
-#define paramdefaults (PARAM_DEFAULT(""))(PARAM_DEFAULT(""))
-#define paramreferences (homology_file)(resultsfile)
+#define paramtypes (boost::filesystem::path)
+#define paramtokens ("fragment-resultfile")
+#define paramdescriptions ("parse fragment results from the given file")
+#define paramdefaults (PARAM_DEFAULT(""))
+#define paramreferences (resultsfile)
 #define paramvalids \
-(DummyValidator< boost::filesystem::path >()) \
 (DummyValidator< boost::filesystem::path >())
 
Index: src/Actions/FragmentationAction/FitPotentialAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FitPotentialAction.cpp	(revision 1e1098614112b1d75c8d4c6e30e2cf32591c0286)
+++ src/Actions/FragmentationAction/FitPotentialAction.cpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -152,5 +152,5 @@
     LOG(0, "STATUS: I'm training now a set of potentials parsed from "
         << params.potential_file.get().string() << " on a fragment "
-        << fragmentnumbers << " on data from " << params.homology_file.get() << ".");
+        << fragmentnumbers << " on data from World's homologies.");
 
   } else {
@@ -168,6 +168,5 @@
 
       LOG(0, "STATUS: I'm training now a " << params.potentialtype.get()
-          << " potential on charges " << chargenumbers << " on data from "
-          << params.homology_file.get() << ".");
+          << " potential on charges " << chargenumbers << " on data from World's homologies.");
 
       // register desired potential and an additional constant one
@@ -186,19 +185,5 @@
 
   // parse homologies into container
-  HomologyContainer homologies;
-  if (boost::filesystem::exists(params.homology_file.get())) {
-    std::ifstream returnstream(params.homology_file.get().string().c_str());
-    if (returnstream.good()) {
-      boost::archive::text_iarchive ia(returnstream);
-      ia >> homologies;
-    } else {
-      ELOG(0, "Failed to parse from " << params.homology_file.get().string() << ".");
-      return Action::failure;
-    }
-    returnstream.close();
-  } else {
-    ELOG(0, params.homology_file.get() << " does not exist.");
-    return Action::failure;
-  }
+  HomologyContainer &homologies = World::getInstance().getHomologies();
 
   // first we try to look into the HomologyContainer
Index: src/Actions/FragmentationAction/FitPotentialAction.def
===================================================================
--- src/Actions/FragmentationAction/FitPotentialAction.def	(revision 1e1098614112b1d75c8d4c6e30e2cf32591c0286)
+++ src/Actions/FragmentationAction/FitPotentialAction.def	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -23,11 +23,10 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
-#define paramtypes (boost::filesystem::path)(boost::filesystem::path)(std::string)(boost::filesystem::path)(std::vector<const element *>)(std::vector<const element *>)(unsigned int)
-#define paramtokens ("homology-file")("training-file")("potential-type")("potential-file")("potential-charges")("fragment-charges")("take-best-of")
-#define paramdescriptions ("homology file to parse")("optional file to write training data to")("potential type to fit")("potential file specifying multiple potentials to fit")("charges specifying the potential")("charges specifying the fragment")("take the best among this many approximations")
-#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(""))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(3))
-#define paramreferences (homology_file)(training_file)(potentialtype)(potential_file)(charges)(fragment)(best_of_howmany)
+#define paramtypes (boost::filesystem::path)(std::string)(boost::filesystem::path)(std::vector<const element *>)(std::vector<const element *>)(unsigned int)
+#define paramtokens ("training-file")("potential-type")("potential-file")("potential-charges")("fragment-charges")("take-best-of")
+#define paramdescriptions ("optional file to write training data to")("potential type to fit")("potential file specifying multiple potentials to fit")("charges specifying the potential")("charges specifying the fragment")("take the best among this many approximations")
+#define paramdefaults (PARAM_DEFAULT(""))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(3))
+#define paramreferences (training_file)(potentialtype)(potential_file)(charges)(fragment)(best_of_howmany)
 #define paramvalids \
-(FilePresentValidator()) \
 (DummyValidator<boost::filesystem::path>()) \
 (EmptyStringValidator() || PotentialTypeValidator()) \
Index: src/Actions/FragmentationAction/ParseHomologiesAction.cpp
===================================================================
--- src/Actions/FragmentationAction/ParseHomologiesAction.cpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
+++ src/Actions/FragmentationAction/ParseHomologiesAction.cpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -0,0 +1,108 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2013 Frederik Heber. 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/>.
+ */
+
+/*
+ * ParseHomologiesAction.cpp
+ *
+ *  Created on: Jun 24, 2013
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// include headers that implement a archive in simple text format
+// and before MemDebug due to placement new
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include <iostream>
+
+#include "CodePatterns/Log.hpp"
+
+#include "Fragmentation/Homology/HomologyContainer.hpp"
+#include "World.hpp"
+
+#include "Actions/FragmentationAction/ParseHomologiesAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "ParseHomologiesAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+
+void parseHomologiesFromFile(
+    const boost::filesystem::path &homology_file
+    )
+{
+  HomologyContainer &homology_container = World::getInstance().getHomologies();
+  if (boost::filesystem::exists(homology_file)) {
+    std::ifstream returnstream(homology_file.string().c_str());
+    if (returnstream.good()) {
+      boost::archive::text_iarchive ia(returnstream);
+      ia >> homology_container;
+    } else {
+      ELOG(2, "Failed to parse from " << homology_file.string() << ".");
+    }
+    returnstream.close();
+  } else {
+    LOG(2, "Could not open " << homology_file.string()
+        << ", creating empty container.");
+  }
+}
+
+Action::state_ptr FragmentationParseHomologiesAction::performCall()
+{
+  // append all keysets to homology file
+  if (!params.homology_file.get().empty()) {
+    const boost::filesystem::path &homology_file = params.homology_file.get();
+    if (homology_file.string() != "") {
+      LOG(1, "INFO: Parsing HomologyGraphs from file " << homology_file.string() << ".");
+      parseHomologiesFromFile(homology_file);
+      return Action::success;
+    }
+  }
+
+  return Action::failure;
+}
+
+Action::state_ptr FragmentationParseHomologiesAction::performUndo(Action::state_ptr _state) {
+  return Action::success;
+}
+
+Action::state_ptr FragmentationParseHomologiesAction::performRedo(Action::state_ptr _state){
+  return Action::success;
+}
+
+bool FragmentationParseHomologiesAction::canUndo() {
+  return false;
+}
+
+bool FragmentationParseHomologiesAction::shouldUndo() {
+  return false;
+}
+/** =========== end of function ====================== */
Index: src/Actions/FragmentationAction/ParseHomologiesAction.def
===================================================================
--- src/Actions/FragmentationAction/ParseHomologiesAction.def	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
+++ src/Actions/FragmentationAction/ParseHomologiesAction.def	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -0,0 +1,35 @@
+/*
+ * ParseHomologiesAction.def
+ *
+ *  Created on: Jun 24, 2013
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
+
+// 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, use (NOPARAM_DEFAULT) for each (undefined) default value
+#define paramtypes (boost::filesystem::path)
+#define paramtokens ("parse-homologies")
+#define paramdescriptions ("path to file containing homology container to parse")
+#define paramdefaults (NOPARAM_DEFAULT)
+#define paramreferences (homology_file)
+#define paramvalids \
+(FilePresentValidator())
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Fragmentation
+#define MENUNAME "fragmentation"
+#define MENUPOSITION 7
+#define ACTIONNAME ParseHomologies
+#define TOKEN "parse-homologies"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "parses homologies present in a file into World's container"
+#undef SHORTFORM
Index: src/Actions/FragmentationAction/ParseHomologiesAction.hpp
===================================================================
--- src/Actions/FragmentationAction/ParseHomologiesAction.hpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
+++ src/Actions/FragmentationAction/ParseHomologiesAction.hpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -0,0 +1,22 @@
+/*
+ * ParseHomologiesAction.hpp
+ *
+ *  Created on: Jun 24, 2013
+ *      Author: heber
+ */
+
+#ifndef PARSEHOMOLOGIESACTION_HPP_
+#define PARSEHOMOLOGIESACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "ParseHomologiesAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* PARSEHOMOLOGIESACTION_HPP_ */
Index: src/Actions/FragmentationAction/SaveHomologiesAction.cpp
===================================================================
--- src/Actions/FragmentationAction/SaveHomologiesAction.cpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
+++ src/Actions/FragmentationAction/SaveHomologiesAction.cpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -0,0 +1,110 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2013 Frederik Heber. 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/>.
+ */
+
+/*
+ * SaveHomologiesAction.cpp
+ *
+ *  Created on: Jun 24, 2013
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// include headers that implement a archive in simple text format
+// and before MemDebug due to placement new
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include <iostream>
+
+#include "CodePatterns/Log.hpp"
+
+#include "Fragmentation/Homology/HomologyContainer.hpp"
+#include "World.hpp"
+
+#include "Actions/FragmentationAction/SaveHomologiesAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "SaveHomologiesAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+
+bool writeHomologiesToFile(
+    const boost::filesystem::path &homology_file
+    )
+{
+  /// store homology container again
+  HomologyContainer &homology_container = World::getInstance().getHomologies();
+  std::ofstream outputstream(homology_file.string().c_str());
+  if (outputstream.good()) { // check if opened
+    boost::archive::text_oarchive oa(outputstream);
+    oa << homology_container;
+    if (outputstream.fail()) { // check if correctly written
+      LOG(1, "Failed to write to file " << homology_file.string() << ".");
+      return false;
+    } else
+      outputstream.close();
+  } else {
+    LOG(1, "Failed to open file " << homology_file.string()
+        << " for writing.");
+    return false;
+  }
+  return true;
+}
+
+Action::state_ptr FragmentationSaveHomologiesAction::performCall()
+{
+  if (!params.homology_file.get().empty()) {
+    const boost::filesystem::path &homology_file = params.homology_file.get();
+    if (homology_file.string() != "") {
+      LOG(1, "INFO: Appending HomologyGraphs to file " << homology_file.string() << ".");
+      if (!writeHomologiesToFile(homology_file))
+        return Action::failure;
+    }
+  }
+
+  return Action::success;
+}
+
+Action::state_ptr FragmentationSaveHomologiesAction::performUndo(Action::state_ptr _state) {
+  return Action::success;
+}
+
+Action::state_ptr FragmentationSaveHomologiesAction::performRedo(Action::state_ptr _state){
+  return Action::success;
+}
+
+bool FragmentationSaveHomologiesAction::canUndo() {
+  return false;
+}
+
+bool FragmentationSaveHomologiesAction::shouldUndo() {
+  return false;
+}
+/** =========== end of function ====================== */
Index: src/Actions/FragmentationAction/SaveHomologiesAction.def
===================================================================
--- src/Actions/FragmentationAction/SaveHomologiesAction.def	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
+++ src/Actions/FragmentationAction/SaveHomologiesAction.def	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -0,0 +1,37 @@
+/*
+ * SaveHomologiesAction.def
+ *
+ *  Created on: Jun 24, 2013
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include <boost/filesystem/path.hpp>
+
+#include "Parameters/Validators/DummyValidator.hpp"
+
+// 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, use (NOPARAM_DEFAULT) for each (undefined) default value
+#define paramtypes (boost::filesystem::path)
+#define paramtokens ("save-homologies")
+#define paramdescriptions ("path to file containing homology container to parse")
+#define paramdefaults (PARAM_DEFAULT(""))
+#define paramreferences (homology_file)
+#define paramvalids \
+(DummyValidator< boost::filesystem::path >())
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Fragmentation
+#define MENUNAME "fragmentation"
+#define MENUPOSITION 8
+#define ACTIONNAME SaveHomologies
+#define TOKEN "save-homologies"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "saves homologies present in World's container to file"
+#undef SHORTFORM
Index: src/Actions/FragmentationAction/SaveHomologiesAction.hpp
===================================================================
--- src/Actions/FragmentationAction/SaveHomologiesAction.hpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
+++ src/Actions/FragmentationAction/SaveHomologiesAction.hpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -0,0 +1,22 @@
+/*
+ * SaveHomologiesAction.hpp
+ *
+ *  Created on: Jun 24, 2013
+ *      Author: heber
+ */
+
+#ifndef SAVEHOMOLOGIESACTION_HPP_
+#define SAVEHOMOLOGIESACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "SaveHomologiesAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* SAVEHOMOLOGIESACTION_HPP_ */
Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision 1e1098614112b1d75c8d4c6e30e2cf32591c0286)
+++ src/Actions/GlobalListOfActions.hpp	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -124,4 +124,6 @@
   (FragmentationAnalyseFragmentationResults) \
   (FragmentationFragmentation) \
+  (FragmentationParseHomologies) \
+  (FragmentationSaveHomologies) \
   (FragmentationStoreSaturatedFragment) \
   (FillRegularGrid) \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 1e1098614112b1d75c8d4c6e30e2cf32591c0286)
+++ src/Actions/Makefile.am	(revision d449a911351285dfadb3bf83fce8de1f70c0d435)
@@ -213,14 +213,20 @@
 
 FRAGMENTATIONACTIONSOURCE = \
+  Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp \
   Actions/FragmentationAction/FragmentationAction.cpp \
-  Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp \
+  Actions/FragmentationAction/ParseHomologiesAction.cpp \
+  Actions/FragmentationAction/SaveHomologiesAction.cpp \
   Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp
 FRAGMENTATIONACTIONHEADER = \
+  Actions/FragmentationAction/AnalyseFragmentationResultsAction.hpp \
   Actions/FragmentationAction/FragmentationAction.hpp \
-  Actions/FragmentationAction/AnalyseFragmentationResultsAction.hpp \
+  Actions/FragmentationAction/ParseHomologiesAction.hpp \
+  Actions/FragmentationAction/SaveHomologiesAction.hpp \
   Actions/FragmentationAction/StoreSaturatedFragmentAction.hpp
 FRAGMENTATIONACTIONDEFS = \
+  Actions/FragmentationAction/AnalyseFragmentationResultsAction.def \
   Actions/FragmentationAction/FragmentationAction.def \
-  Actions/FragmentationAction/AnalyseFragmentationResultsAction.def \
+  Actions/FragmentationAction/ParseHomologiesAction.def \
+  Actions/FragmentationAction/SaveHomologiesAction.def \
   Actions/FragmentationAction/StoreSaturatedFragmentAction.def
 
