Index: src/Fragmentation/Summation/unittests/Makefile.am
===================================================================
--- src/Fragmentation/Summation/unittests/Makefile.am	(revision 0a387eb05bb064023a609198c7502635736f7fc8)
+++ src/Fragmentation/Summation/unittests/Makefile.am	(revision 1e7dd43451cc813dbdf63921c91127e6add87249)
@@ -10,4 +10,5 @@
 	../Fragmentation/unittests/IndexSetUnitTest.cpp \
 	../Fragmentation/unittests/IndexSetContainerUnitTest.cpp \
+	../Fragmentation/unittests/OrthogonalSummationUnitTest.cpp \
 	../Fragmentation/unittests/SetValueUnitTest.cpp \
 	../Fragmentation/unittests/SetValueMapUnitTest.cpp \
@@ -17,4 +18,5 @@
 	../Fragmentation/unittests/IndexSetUnitTest.hpp \
 	../Fragmentation/unittests/IndexSetContainerUnitTest.cpp \
+	../Fragmentation/unittests/OrthogonalSummationUnitTest.hpp \
 	../Fragmentation/unittests/SetValueUnitTest.hpp \
 	../Fragmentation/unittests/SetValueMapUnitTest.hpp \
@@ -24,4 +26,5 @@
   IndexSetUnitTest \
   IndexSetContainerUnitTest \
+  OrthogonalSummationUnitTest \
   SetValueUnitTest \
   SetValueMapUnitTest \
@@ -51,4 +54,17 @@
 	SortedVector.hpp
 IndexSetContainerUnitTest_LDADD = ${FRAGMENTATIONSUMMATIONLIBS}
+
+OrthogonalSummationUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	unittests/OrthogonalSummationUnitTest.cpp \
+	unittests/OrthogonalSummationUnitTest.hpp \
+	OrthogonalSummation.hpp \
+	OrthogonalSummation_impl.hpp \
+	IndexSet.cpp \
+	IndexSet.hpp \
+	IndexSetContainer.hpp \
+	SortedVector.hpp \
+	SubsetMap.cpp \
+	SubsetMap.hpp
+OrthogonalSummationUnitTest_LDADD = ${FRAGMENTATIONSUMMATIONLIBS}
 
 SetValueUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
Index: src/Fragmentation/Summation/unittests/OrthogonalSummationUnitTest.cpp
===================================================================
--- src/Fragmentation/Summation/unittests/OrthogonalSummationUnitTest.cpp	(revision 1e7dd43451cc813dbdf63921c91127e6add87249)
+++ src/Fragmentation/Summation/unittests/OrthogonalSummationUnitTest.cpp	(revision 1e7dd43451cc813dbdf63921c91127e6add87249)
@@ -0,0 +1,123 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. 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/>.
+ */
+
+/*
+ * OrthogonalSummationUnitTest.cpp
+ *
+ *  Created on: Jun 26, 2012
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+using namespace std;
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "OrthogonalSummationUnitTest.hpp"
+
+#include "Fragmentation/Summation/OrthogonalSummation.hpp"
+#include "Fragmentation/Summation/SetValue.hpp"
+
+#include <algorithm>
+#include <boost/assign.hpp>
+
+#include "CodePatterns/Log.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+using namespace boost::assign;
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( OrthogonalSummationTest );
+//
+//template <class T>
+//struct SetValueAllocator {
+//  SetValueAllocator(const T &_value) :
+//    value(_value)
+//  {}
+//  SetValue<T> * operator()(const IndexSet &set) {
+//    SetValue<T> * _instance = new SetValue<T>(set, value);
+//    return _instance;
+//  }
+//private:
+//  //!> internally stored fixed initial value
+//  const T value;
+//};
+
+void OrthogonalSummationTest::setUp()
+{
+  // failing asserts should be thrown
+  ASSERT_DO(Assert::Throw);
+
+  setVerbosity(5);
+
+  // create a tree of sets
+  IndexSet::ptr AllIndices(new IndexSet);
+  (*AllIndices) += 1,2,3,4;
+  CPPUNIT_ASSERT_EQUAL( (size_t)4, AllIndices->size() );
+  container.reset(new IndexSetContainer(AllIndices));
+  CPPUNIT_ASSERT_EQUAL( (size_t)1, container->getContainer().size() );
+  IndexSet tempset;
+  tempset += 1;
+  container->insert(tempset);
+  tempset += 2;
+  container->insert(tempset);
+  tempset.clear();
+  tempset += 3;
+  container->insert(tempset);
+  tempset += 2;
+  container->insert(tempset);
+  CPPUNIT_ASSERT_EQUAL( (size_t)5, container->getContainer().size() );
+  subsetmap.reset(new SubsetMap(*container));
+}
+
+
+void OrthogonalSummationTest::tearDown()
+{
+}
+
+/** UnitTest for operator()
+ */
+void OrthogonalSummationTest::operator_staticTest()
+{
+  const IndexSetContainer::Container_t &_container = container->getContainer();
+  for (int value = -5; value <= 5; ++value) {
+    // create a value for each set (and copy indices to overcome constness in container)
+    OrthogonalSummation<int>::InputSets_t indices(_container.begin(), _container.end());
+    OrthogonalSummation<int>::InputValues_t values(_container.size(), value);
+    // create the summation functor
+    OrthogonalSummation<int> OS(indices, values, subsetmap);
+
+    // sum up, as full set is contained we must get value again
+    CPPUNIT_ASSERT_EQUAL( value, OS() );
+  }
+}
Index: src/Fragmentation/Summation/unittests/OrthogonalSummationUnitTest.hpp
===================================================================
--- src/Fragmentation/Summation/unittests/OrthogonalSummationUnitTest.hpp	(revision 1e7dd43451cc813dbdf63921c91127e6add87249)
+++ src/Fragmentation/Summation/unittests/OrthogonalSummationUnitTest.hpp	(revision 1e7dd43451cc813dbdf63921c91127e6add87249)
@@ -0,0 +1,41 @@
+/*
+ * OrthogonalSummationUnitTest.hpp
+ *
+ *  Created on: Jun 26, 2012
+ *      Author: heber
+ */
+
+#ifndef ORTHOGONALSUMMATIONUNITTEST_HPP_
+#define ORTHOGONALSUMMATIONUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "Fragmentation/Summation/IndexSetContainer.hpp"
+#include "Fragmentation/Summation/SubsetMap.hpp"
+
+
+/********************************************** Test classes **************************************/
+
+class OrthogonalSummationTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( OrthogonalSummationTest) ;
+    CPPUNIT_TEST ( operator_staticTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+      void setUp();
+      void tearDown();
+      void operator_staticTest();
+
+private:
+      SubsetMap::ptr subsetmap;
+      IndexSetContainer::ptr container;
+};
+
+#endif /* ORTHOGONALSUMMATIONUNITTEST_HPP_ */
