Index: src/Actions/ActionQueue.cpp
===================================================================
--- src/Actions/ActionQueue.cpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
+++ src/Actions/ActionQueue.cpp	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
@@ -96,7 +96,10 @@
       iter != queue.end();
       ++iter) {
-    if (iter != queue.begin())
-      output << " ";
-    (*iter)->outputAsCLI(output);
+    // skip store-session in printed list
+    if ((*iter)->getName() != std::string("store-session")) {
+      if (iter != queue.begin())
+        output << " ";
+      (*iter)->outputAsCLI(output);
+    }
   }
   output << std::endl;
Index: src/Actions/CommandAction/StoreSessionAction.cpp
===================================================================
--- src/Actions/CommandAction/StoreSessionAction.cpp	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
+++ src/Actions/CommandAction/StoreSessionAction.cpp	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
@@ -0,0 +1,80 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * StoreSessionAction.cpp
+ *
+ *  Created on: Aug 23, 2013
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Log.hpp"
+
+#include <fstream>
+
+#include "Actions/CommandAction/StoreSessionAction.hpp"
+#include "Actions/ActionQueue.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "StoreSessionAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+ActionState::ptr CommandStoreSessionAction::performCall() {
+
+  LOG(1, "INFO: Storing session to file " << params.filename.get().string());
+
+  std::ofstream output(params.filename.get().string().c_str(), std::fstream::app);
+  ActionQueue::getInstance().outputAsCLI(output);
+  output.close();
+
+  return Action::success;
+}
+
+ActionState::ptr CommandStoreSessionAction::performUndo(ActionState::ptr _state) {
+//  CommandStoreSessionState *state = assert_cast<CommandStoreSessionState*>(_state.get());
+
+  return _state;
+}
+
+ActionState::ptr CommandStoreSessionAction::performRedo(ActionState::ptr _state){
+  //  CommandStoreSessionState *state = assert_cast<CommandStoreSessionState*>(_state.get());
+
+    return _state;
+}
+
+bool CommandStoreSessionAction::canUndo() {
+  return false;
+}
+
+bool CommandStoreSessionAction::shouldUndo() {
+  return false;
+}
+/** =========== end of function ====================== */
Index: src/Actions/CommandAction/StoreSessionAction.def
===================================================================
--- src/Actions/CommandAction/StoreSessionAction.def	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
+++ src/Actions/CommandAction/StoreSessionAction.def	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
@@ -0,0 +1,37 @@
+/*
+ * StoreSessionAction.def
+ *
+ *  Created on: Aug 23, 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 ("store-session")
+#define paramdescriptions ("filename to store session to")
+#undef paramdefaults
+#define paramreferences (filename)
+#define paramvalids \
+(DummyValidator< boost::filesystem::path >())
+
+#define statetypes (unsigned int)
+#define statereferences (oldverbosity)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Command
+#define MENUNAME "command"
+#define MENUPOSITION 5
+#define ACTIONNAME StoreSession
+#define TOKEN "store-session"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "stores the current session as a sequence of actions"
+#undef SHORTFORM
Index: src/Actions/CommandAction/StoreSessionAction.hpp
===================================================================
--- src/Actions/CommandAction/StoreSessionAction.hpp	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
+++ src/Actions/CommandAction/StoreSessionAction.hpp	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
@@ -0,0 +1,22 @@
+/*
+ * StoreSessionAction.hpp
+ *
+ *  Created on: Aug 22, 2013
+ *      Author: heber
+ */
+
+#ifndef STORESESSIONACTION_HPP_
+#define STORESESSIONACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "StoreSessionAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* STORESESSIONACTION_HPP_ */
Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
+++ src/Actions/GlobalListOfActions.hpp	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
@@ -44,11 +44,14 @@
   (TesselationConvexEnvelope) \
   (CommandElementDb) \
-  (CommandVerbose) \
-  (CommandWarranty) \
-  (CommandVersion) \
+  (CommandBondLengthTable) \
+  (CommandFastParsing) \
   (CommandHelp) \
   (CommandHelpRedistribute) \
-  (CommandBondLengthTable) \
-  (CommandFastParsing) \
+  (CommandSetRandomNumbersEngine) \
+  (CommandSetRandomNumbersDistribution) \
+  (CommandStoreSession) \
+  (CommandVerbose) \
+  (CommandVersion) \
+  (CommandWarranty) \
   (ParserSetTremoloAtomdata) \
   (ParserParseTremoloPotentials) \
@@ -66,6 +69,4 @@
   (AnalysisMolecularVolume) \
   (AnalysisPrincipalAxisSystem) \
-  (CommandSetRandomNumbersEngine) \
-  (CommandSetRandomNumbersDistribution) \
   (Undo) \
   (AtomSaveSelectedAtoms) \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 46b181b75fcf35315b1a48e596f52f7cf2388766)
+++ src/Actions/Makefile.am	(revision bad5892f291d8daf3db1451bbb7b43e57a1b3f40)
@@ -186,4 +186,5 @@
   Actions/CommandAction/HelpAction.cpp \
   Actions/CommandAction/HelpRedistributeAction.cpp \
+  Actions/CommandAction/StoreSessionAction.cpp \
   Actions/CommandAction/VerboseAction.cpp \
   Actions/CommandAction/VersionAction.cpp \
@@ -195,4 +196,5 @@
   Actions/CommandAction/HelpAction.hpp \
   Actions/CommandAction/HelpRedistributeAction.hpp \
+  Actions/CommandAction/StoreSessionAction.hpp \
   Actions/CommandAction/VerboseAction.hpp \
   Actions/CommandAction/VersionAction.hpp \
@@ -204,4 +206,5 @@
   Actions/CommandAction/HelpAction.def \
   Actions/CommandAction/HelpRedistributeAction.def \
+  Actions/CommandAction/StoreSessionAction.def \
   Actions/CommandAction/VerboseAction.def \
   Actions/CommandAction/VersionAction.def \
