Index: src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.cpp
===================================================================
--- src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.cpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
+++ src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.cpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+/*
+ * SetRandomNumbersDistribution.cpp
+ *
+ *  Created on: Jan 01, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Log.hpp"
+#include "molecule.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "World.hpp"
+
+#include "RandomNumbers/RandomNumberGeneratorFactory.hpp"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+using namespace std;
+
+#include "SetRandomNumbersDistributionAction.hpp"
+
+// and construct the stuff
+#include "SetRandomNumbersDistributionAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr CommandSetRandomNumbersDistributionAction::performCall() {
+  // obtain information
+  getParametersfromValueStorage();
+
+  CommandSetRandomNumbersDistributionState *state =
+      new CommandSetRandomNumbersDistributionState(
+          RandomNumberGeneratorFactory::getInstance().getDistribution(),
+          params);
+  RandomNumberGeneratorFactory::getInstance().setDistribution(params.distribution_type);
+
+  DoLog(0) && (Log() << Verbose(0) << "Distribution of random number generator is now: "
+      << RandomNumberGeneratorFactory::getInstance().getDistribution() << std::endl);
+
+  return Action::state_ptr(state);
+}
+
+Action::state_ptr CommandSetRandomNumbersDistributionAction::performUndo(Action::state_ptr _state) {
+  CommandSetRandomNumbersDistributionState *state = assert_cast<CommandSetRandomNumbersDistributionState*>(_state.get());
+
+  CommandSetRandomNumbersDistributionState *newstate =
+      new CommandSetRandomNumbersDistributionState(
+          RandomNumberGeneratorFactory::getInstance().getDistribution(),
+          state->params);
+  RandomNumberGeneratorFactory::getInstance().setDistribution(state->old_distribution_type);
+
+  DoLog(0) && (Log() << Verbose(0) << "Distribution of random number generator is undone to: "
+      << RandomNumberGeneratorFactory::getInstance().getDistribution() << std::endl);
+
+  return Action::state_ptr(newstate);
+}
+
+Action::state_ptr CommandSetRandomNumbersDistributionAction::performRedo(Action::state_ptr _state){
+  return performUndo(_state);
+}
+
+bool CommandSetRandomNumbersDistributionAction::canUndo() {
+  return true;
+}
+
+bool CommandSetRandomNumbersDistributionAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.def
===================================================================
--- src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.def	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
+++ src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.def	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
@@ -0,0 +1,33 @@
+/*
+ * SetRandomNumbersDistributionAction.def
+ *
+ *  Created on: Jan 01, 2011
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+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, use (NODEFAULT) for each (undefined) default value
+#define paramtypes (std::string)
+#define paramtokens ("set-random-number-distribution")
+#define paramdescriptions ("name of the distribution from boost::random")
+#undef paramdefaults
+#define paramreferences (distribution_type)
+
+#define statetypes (std::string)
+#define statereferences (old_distribution_type)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Command
+#define MENUNAME "command"
+#define MENUPOSITION 1
+#define ACTIONNAME SetRandomNumbersDistribution
+#define TOKEN "set-random-number-distribution"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "specify the  distribution to use henceforth"
+#undef SHORTFORM
Index: src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.hpp
===================================================================
--- src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.hpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
+++ src/Actions/RandomNumbersAction/SetRandomNumbersDistributionAction.hpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
@@ -0,0 +1,22 @@
+/*
+ * SetRandomNumbersDistributionAction.hpp
+ *
+ *  Created on: Jan 01, 2011
+ *      Author: heber
+ */
+
+#ifndef SETRANDOMNUMBERSDISTRIBUTIONACTION_HPP
+#define SETRANDOMNUMBERSDISTRIBUTIONACTION_HPP
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "SetRandomNumbersDistributionAction.def"
+#include "Action_impl_header.hpp"
+
+#endif // SETRANDOMNUMBERSDISTRIBUTIONACTION_HPP
Index: src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.cpp
===================================================================
--- src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.cpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
+++ src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.cpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+/*
+ * SetRandomNumbersEngine.cpp
+ *
+ *  Created on: Jan 01, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Log.hpp"
+#include "molecule.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "World.hpp"
+
+#include "RandomNumbers/RandomNumberGeneratorFactory.hpp"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+using namespace std;
+
+#include "SetRandomNumbersEngineAction.hpp"
+
+// and construct the stuff
+#include "SetRandomNumbersEngineAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr CommandSetRandomNumbersEngineAction::performCall() {
+  // obtain information
+  getParametersfromValueStorage();
+
+  CommandSetRandomNumbersEngineState *state =
+      new CommandSetRandomNumbersEngineState(
+          RandomNumberGeneratorFactory::getInstance().getEngine(),
+          params);
+  RandomNumberGeneratorFactory::getInstance().setEngine(params.engine_type);
+
+  DoLog(0) && (Log() << Verbose(0) << "Engine of random number generator is now: "
+      << RandomNumberGeneratorFactory::getInstance().getEngine() << std::endl);
+
+  return Action::state_ptr(state);
+}
+
+Action::state_ptr CommandSetRandomNumbersEngineAction::performUndo(Action::state_ptr _state) {
+  CommandSetRandomNumbersEngineState *state = assert_cast<CommandSetRandomNumbersEngineState*>(_state.get());
+
+  CommandSetRandomNumbersEngineState *newstate =
+      new CommandSetRandomNumbersEngineState(
+          RandomNumberGeneratorFactory::getInstance().getEngine(),
+          state->params);
+  RandomNumberGeneratorFactory::getInstance().setEngine(state->old_engine_type);
+
+  DoLog(0) && (Log() << Verbose(0) << "Engine of random number generator is undone to: "
+      << RandomNumberGeneratorFactory::getInstance().getEngine() << std::endl);
+
+  return Action::state_ptr(newstate);
+}
+
+Action::state_ptr CommandSetRandomNumbersEngineAction::performRedo(Action::state_ptr _state){
+  return performUndo(_state);
+}
+
+bool CommandSetRandomNumbersEngineAction::canUndo() {
+  return true;
+}
+
+bool CommandSetRandomNumbersEngineAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.def
===================================================================
--- src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.def	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
+++ src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.def	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
@@ -0,0 +1,33 @@
+/*
+ * SetRandomNumbersEngineAction.def
+ *
+ *  Created on: Jan 01, 2011
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+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, use (NODEFAULT) for each (undefined) default value
+#define paramtypes (std::string)
+#define paramtokens ("set-random-number-engine")
+#define paramdescriptions ("name of the pseudo-random engine from boost::random")
+#undef paramdefaults
+#define paramreferences (engine_type)
+
+#define statetypes (std::string)
+#define statereferences (old_engine_type)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Command
+#define MENUNAME "command"
+#define MENUPOSITION 1
+#define ACTIONNAME SetRandomNumbersEngine
+#define TOKEN "set-random-number-engine"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "specify the (pseudo)-random number engine to use henceforth"
+#undef SHORTFORM
Index: src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.hpp
===================================================================
--- src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.hpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
+++ src/Actions/RandomNumbersAction/SetRandomNumbersEngineAction.hpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
@@ -0,0 +1,22 @@
+/*
+ * SetRandomNumbersEngineAction.hpp
+ *
+ *  Created on: Jan 01, 2011
+ *      Author: heber
+ */
+
+#ifndef SETRANDOMNUMBERSENGINEACTION_HPP
+#define SETRANDOMNUMBERSENGINEACTION_HPP
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "SetRandomNumbersEngineAction.def"
+#include "Action_impl_header.hpp"
+
+#endif // SETRANDOMNUMBERSENGINEACTION_HPP
