Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 76ff552147ff66b9fe10e30958abcb4ef05aa517)
+++ src/Actions/Makefile.am	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -89,4 +89,5 @@
   MoleculeAction/BondFileAction.cpp \
   MoleculeAction/ChangeNameAction.cpp \
+  MoleculeAction/CopyAction.cpp \
   MoleculeAction/FillWithMoleculeAction.cpp \
   MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp \
@@ -101,4 +102,5 @@
   MoleculeAction/BondFileAction.hpp \
   MoleculeAction/ChangeNameAction.hpp \
+  MoleculeAction/CopyAction.hpp \
   MoleculeAction/FillWithMoleculeAction.hpp \
   MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp \
Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision 76ff552147ff66b9fe10e30958abcb4ef05aa517)
+++ src/Actions/MapOfActions.cpp	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -63,4 +63,5 @@
 #include "Actions/CommandAction/VerboseAction.hpp"
 #include "Actions/CommandAction/VersionAction.hpp"
+#include "Actions/FragmentationAction/ConstructBondGraphAction.hpp"
 #include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
 #include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
@@ -68,4 +69,5 @@
 #include "Actions/MoleculeAction/BondFileAction.hpp"
 #include "Actions/MoleculeAction/ChangeNameAction.hpp"
+#include "Actions/MoleculeAction/CopyAction.hpp"
 #include "Actions/MoleculeAction/FillWithMoleculeAction.hpp"
 #include "Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp"
@@ -214,4 +216,5 @@
   DescriptionMap["construct-bondgraph"] = "construct the bond graph of the selected atoms";
   DescriptionMap["convex-envelope"] = "create the convex envelope for a molecule";
+  DescriptionMap["copy-molecule"] = "copies a molecule with all atoms and bonds";
   DescriptionMap["default-molname"] = "set the default name of new molecules";
   DescriptionMap["depth-first-search"] = "Depth-First Search analysis of the molecular system";
@@ -352,4 +355,5 @@
   TypeMap["construct-bondgraph"] = &typeid(void);
   TypeMap["convex-envelope"] = &typeid(void);
+  TypeMap["copy-molecule"] = &typeid(molecule);
   TypeMap["default-molname"] = &typeid(std::string);
   TypeMap["depth-first-search"] = &typeid(double);
@@ -491,4 +495,5 @@
 
   MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "bond-file") );
+  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "copy-molecule") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "change-molname") );
   MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "fill-molecule") );
@@ -560,4 +565,5 @@
   generic.insert("construct-bondgraph");
   generic.insert("convex-envelope");
+  generic.insert("copy-molecule");
 	generic.insert("default-molname");
 	generic.insert("depth-first-search");
@@ -939,4 +945,5 @@
   new CommandVersionAction();
 
+  new FragmentationConstructBondGraphAction();
   new FragmentationDepthFirstSearchAction();
   new FragmentationFragmentationAction();
@@ -945,4 +952,5 @@
   new MoleculeBondFileAction();
   new MoleculeChangeNameAction();
+  new MoleculeCopyAction();
   new MoleculeFillWithMoleculeAction();
   new MoleculeLinearInterpolationofTrajectoriesAction();
Index: src/Actions/MoleculeAction/CopyAction.cpp
===================================================================
--- src/Actions/MoleculeAction/CopyAction.cpp	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
+++ src/Actions/MoleculeAction/CopyAction.cpp	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+/*
+ * CopyAction.cpp
+ *
+ *  Created on: May 10, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "Helpers/MemDebug.hpp"
+
+#include "Helpers/Log.hpp"
+#include "Helpers/Verbose.hpp"
+#include "LinearAlgebra/Vector.hpp"
+#include "atom.hpp"
+#include "bond.hpp"
+#include "molecule.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+using namespace std;
+
+#include "Actions/MoleculeAction/CopyAction.hpp"
+
+// and construct the stuff
+#include "CopyAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr MoleculeCopyAction::performCall() {
+  molecule *copy = NULL;
+
+  // obtain information
+  getParametersfromValueStorage();
+
+  copy = params.mol->CopyMolecule();
+  Vector *Center = params.mol->DetermineCenterOfAll();
+  *Center *= -1.;
+  *Center += params.position;
+  copy->Translate(Center);
+  delete(Center);
+
+  return Action::state_ptr(new MoleculeCopyState(copy,params));
+}
+
+Action::state_ptr MoleculeCopyAction::performUndo(Action::state_ptr _state) {
+  MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get());
+
+  for (molecule::iterator AtomRunner = state->copy->begin(); !state->copy->empty(); AtomRunner = state->copy->begin()) {
+    for(BondList::iterator BondRunner = (*AtomRunner)->ListOfBonds.begin(); !(*AtomRunner)->ListOfBonds.empty(); BondRunner = (*AtomRunner)->ListOfBonds.begin())
+      delete(*BondRunner);
+    atom *Walker = *AtomRunner;
+    state->copy->erase(AtomRunner);
+    World::getInstance().destroyAtom(Walker);
+  }
+  World::getInstance().destroyMolecule(state->copy);
+
+  return Action::state_ptr(_state);
+}
+
+Action::state_ptr MoleculeCopyAction::performRedo(Action::state_ptr _state){
+  MoleculeCopyState *state = assert_cast<MoleculeCopyState*>(_state.get());
+
+  molecule *copy = state->params.mol->CopyMolecule();
+  Vector *Center = state->params.mol->DetermineCenterOfAll();
+  *Center *= -1.;
+  *Center += state->params.position;
+  copy->Translate(Center);
+  delete(Center);
+
+  return Action::state_ptr(new MoleculeCopyState(copy,state->params));
+}
+
+bool MoleculeCopyAction::canUndo() {
+  return true;
+}
+
+bool MoleculeCopyAction::shouldUndo() {
+  return true;
+}
+
+const string MoleculeCopyAction::getName() {
+  return NAME;
+}
+/** =========== end of function ====================== */
Index: src/Actions/MoleculeAction/CopyAction.def
===================================================================
--- src/Actions/MoleculeAction/CopyAction.def	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
+++ src/Actions/MoleculeAction/CopyAction.def	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -0,0 +1,25 @@
+/*
+ * CopyAction.def
+ *
+ *  Created on: Aug 26, 2010
+ *      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
+#define paramtypes (molecule *) (Vector)
+#define paramtokens (MoleculeCopyAction::NAME) ("position")
+#define paramreferences (mol) (position)
+
+#define statetypes (molecule *)
+#define statereferences (copy)
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Molecule
+#define ACTIONNAME Copy
+#define TOKEN "copy-molecule"
+
Index: src/Actions/MoleculeAction/CopyAction.hpp
===================================================================
--- src/Actions/MoleculeAction/CopyAction.hpp	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
+++ src/Actions/MoleculeAction/CopyAction.hpp	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -0,0 +1,16 @@
+/*
+ * CopyAction.hpp
+ *
+ *  Created on: May 10, 2010
+ *      Author: heber
+ */
+
+#ifndef COPYACTION_HPP
+#define COPYACTION_HPP
+
+#include "Actions/Action.hpp"
+
+#include "CopyAction.def"
+#include "Action_impl_header.hpp"
+
+#endif // COPYACTION_HPP
Index: tests/regression/Molecules/11/post/test-copy.xyz
===================================================================
--- tests/regression/Molecules/11/post/test-copy.xyz	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
+++ tests/regression/Molecules/11/post/test-copy.xyz	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -0,0 +1,24 @@
+22
+	Created by molecuilder on Fri Aug  6 15:40:35 2010
+H	9.78209	2.64589	2.64589
+H	9.78209	2.64589	4.42589
+H	10.672	3.90454	3.53589
+H	8.53279	4.78789	2.64589
+H	8.53279	4.78789	4.42589
+H	6.39363	3.90454	3.53589
+H	7.28359	2.64589	2.64589
+H	7.28359	2.64589	4.42589
+C	9.78209	3.27519	3.53589
+C	8.53279	4.15859	3.53589
+C	7.28359	3.27519	3.53589
+H	1.24927	-0.870236	9.11
+H	1.24927	-0.870236	10.89
+H	2.13918	0.388414	10
+H	-3.18182e-05	1.27176	9.11
+H	-3.18182e-05	1.27176	10.89
+H	-2.13919	0.388414	10
+H	-1.24923	-0.870236	9.11
+H	-1.24923	-0.870236	10.89
+C	1.24927	-0.240936	10
+C	-3.18182e-05	0.642464	10
+C	-1.24923	-0.240936	10
Index: tests/regression/Molecules/11/pre/test.xyz
===================================================================
--- tests/regression/Molecules/11/pre/test.xyz	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
+++ tests/regression/Molecules/11/pre/test.xyz	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -0,0 +1,13 @@
+11
+	Created by molecuilder on Fri Aug  6 15:40:35 2010
+H	9.78209	2.64589	2.64589
+H	9.78209	2.64589	4.42589
+H	10.672	3.90454	3.53589
+H	8.53279	4.78789	2.64589
+H	8.53279	4.78789	4.42589
+H	6.39363	3.90454	3.53589
+H	7.28359	2.64589	2.64589
+H	7.28359	2.64589	4.42589
+C	9.78209	3.27519	3.53589
+C	8.53279	4.15859	3.53589
+C	7.28359	3.27519	3.53589
Index: tests/regression/testsuite-molecules.at
===================================================================
--- tests/regression/testsuite-molecules.at	(revision 76ff552147ff66b9fe10e30958abcb4ef05aa517)
+++ tests/regression/testsuite-molecules.at	(revision 1a7fd2c0335923642805cc4cb8ae59ca58748ad8)
@@ -102,2 +102,19 @@
 AT_CLEANUP
 
+# 11. copy molecule
+AT_SETUP([Molecules - Copy molecule])
+AT_KEYWORDS([Molecules])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz test-copy.xyz], 0)
+AT_CHECK([../../molecuilder -i test-copy.xyz -e ${abs_top_srcdir}/src/ --copy-molecule 0 --position "0,0,10"], 0, [stdout], [stderr])
+AT_CHECK([diff test-copy.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/post/test-copy.xyz], 0, [ignore], [ignore])
+AT_CLEANUP
+
+AT_SETUP([Molecules - Copy molecule with Undo/Redo])
+AT_KEYWORDS([Molecules])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz test-copy.xyz], 0)
+AT_CHECK([../../molecuilder -i test-copy.xyz -e ${abs_top_srcdir}/src/ --copy-molecule 0 --position "0,0,10" --undo], 0, [stdout], [stderr])
+AT_CHECK([diff test-copy.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz], 0, [ignore], [ignore])
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz test-copy.xyz], 0)
+AT_CHECK([../../molecuilder -i test-copy.xyz -e ${abs_top_srcdir}/src/ --copy-molecule 0 --position "0,0,10" --undo --redo], 0, [stdout], [stderr])
+AT_CHECK([diff test-copy.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/post/test-copy.xyz], 0, [ignore], [ignore])
+AT_CLEANUP
