Index: src/Actions/AnalysisAction/CalculateMolarMassAction.cpp
===================================================================
--- src/Actions/AnalysisAction/CalculateMolarMassAction.cpp	(revision 55f299a96cda2fac6f625bb867138422ecaec949)
+++ src/Actions/AnalysisAction/CalculateMolarMassAction.cpp	(revision 55f299a96cda2fac6f625bb867138422ecaec949)
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+/*
+ * CalculateMolarMassAction.cpp
+ *
+ *  Created on: Nov 02, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Log.hpp"
+
+#include "atom.hpp"
+#include "Element/element.hpp"
+#include "World.hpp"
+
+#include <iostream>
+#include <string>
+
+#include "CalculateMolarMassAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "CalculateMolarMassAction.def"
+#include "Reaction_impl_pre.hpp"
+
+#include "Reaction_impl.hpp"
+
+/** =========== define the function ====================== */
+double * AnalysisCalculateMolarMassAction::doCalc() {
+  double mass = 0.;
+  size_t totalnumber = 0;
+  // calculate volume from Box
+  for(World::AtomSelectionConstIterator iter = World::getInstance().beginAtomSelection();
+      iter != World::getInstance().endAtomSelection();
+      ++iter) {
+    mass += iter->second->getType()->getMass();
+    ++totalnumber;
+  }
+  LOG(0, "RESULT: The mass of " << totalnumber << " selected atoms is " << mass << " atomicmassunit.");
+
+  return (new double(mass));
+}
+/** =========== end of function ====================== */
Index: src/Actions/AnalysisAction/CalculateMolarMassAction.def
===================================================================
--- src/Actions/AnalysisAction/CalculateMolarMassAction.def	(revision 55f299a96cda2fac6f625bb867138422ecaec949)
+++ src/Actions/AnalysisAction/CalculateMolarMassAction.def	(revision 55f299a96cda2fac6f625bb867138422ecaec949)
@@ -0,0 +1,32 @@
+/*
+ * CalculateMolarMassAction.def
+ *
+ *  Created on: Nov 02, 2011
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+
+// 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
+#undef paramtypes
+#undef paramreferences
+#undef paramtokens
+#undef paramdescriptions
+#undef paramdefaults
+
+// Reaction cannot be undone, hence no state
+
+#define returntype double
+
+// some defines for all the names, you may use REACTION and PARAMS
+#define CATEGORY Analysis
+#define MENUNAME "analysis"
+#define MENUPOSITION 3
+#define ACTIONNAME CalculateMolarMass
+#define TOKEN "calculate-molar-mass"
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "Calculates the molar mass of all selected atoms"
+#undef SHORTFORM
Index: src/Actions/AnalysisAction/CalculateMolarMassAction.hpp
===================================================================
--- src/Actions/AnalysisAction/CalculateMolarMassAction.hpp	(revision 55f299a96cda2fac6f625bb867138422ecaec949)
+++ src/Actions/AnalysisAction/CalculateMolarMassAction.hpp	(revision 55f299a96cda2fac6f625bb867138422ecaec949)
@@ -0,0 +1,22 @@
+/*
+ * CalculateMolarMassAction.hpp
+ *
+ *  Created on: Nov 02, 2011
+ *      Author: heber
+ */
+
+#ifndef CALCULATEMOLARMASSACTION_HPP_
+#define CALCULATEMOLARMASSACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Reaction.hpp"
+
+#include "CalculateMolarMassAction.def"
+#include "Reaction_impl_header.hpp"
+
+#endif /* CALCULATEMOLARMASSACTION_HPP_ */
