Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Actions/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = -ldl
Index: src/Actions/unittests/Makefile.am
===================================================================
--- src/Actions/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Actions/unittests/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
@@ -19,5 +19,5 @@
 GSLLIBS = \
 	../../Shapes/libMolecuilderShapes.la \
-	../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	../../RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
Index: src/Descriptors/unittests/Makefile.am
===================================================================
--- src/Descriptors/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Descriptors/unittests/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl 
@@ -17,5 +17,5 @@
 GSLLIBS = \
 	../../Shapes/libMolecuilderShapes.la \
-	../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	../../RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
Index: src/Graph/Makefile.am
===================================================================
--- src/Graph/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Graph/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = ${CodePatterns_LIBS} -ldl
Index: src/LinearAlgebra/BoxVector.cpp
===================================================================
--- src/LinearAlgebra/BoxVector.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * BoxVector.cpp
- *
- *  Created on: Aug 26, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include <iostream>
-
-#include "LinearAlgebra/BoxVector.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-BoxVector::BoxVector()
-{}
-
-BoxVector::~BoxVector()
-{}
-
-/** Factors given vector \a a times \a m.
- * \param a vector
- * \param m factor
- * \return m * a
- */
-BoxVector const operator*(const BoxVector& a, const double m)
-{
-  BoxVector x(a);
-  x.Scale(m);
-  return x;
-};
-
-/** Factors given vector \a a times \a m.
- * \param m factor
- * \param a vector
- * \return m * a
- */
-BoxVector const operator*(const double m, const BoxVector& a )
-{
-  BoxVector x(a);
-  x.Scale(m);
-  return x;
-};
-
-ostream& operator<<(ostream& ost, const BoxVector& m)
-{
-  ost << "(";
-  for (int i=0;i<NDIM;i++) {
-    ost << m[i];
-    if (i != 2)
-      ost << ",";
-  }
-  ost << ")";
-  return ost;
-};
Index: src/LinearAlgebra/BoxVector.hpp
===================================================================
--- src/LinearAlgebra/BoxVector.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*
- * BoxVector.hpp
- *
- *  Created on: Aug 26, 2010
- *      Author: heber
- */
-
-#ifndef BOXVECTOR_HPP_
-#define BOXVECTOR_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <iosfwd>
-
-#include "LinearAlgebra/Vector.hpp"
-
-/** A BoxVector is simply a Vector that adheres to the boundary conditions of
- * the box. Is currently only needed in Dialog::query<> to distinguish between
- * BoxVector and Vector.
- */
-class BoxVector : public Vector
-{
-public:
-  BoxVector();
-  ~BoxVector();
-};
-
-ostream & operator << (ostream& ost, const BoxVector &m);
-const BoxVector& operator*=(BoxVector& a, const double m);
-BoxVector const operator*(const BoxVector& a, const double m);
-BoxVector const operator*(const double m, const BoxVector& a);
-
-#endif /* BOXVECTOR_HPP_ */
Index: src/LinearAlgebra/Exceptions.hpp
===================================================================
--- src/LinearAlgebra/Exceptions.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- * Exceptions.hpp
- *
- *  Created on: Apr 1, 2011
- *      Author: heber
- */
-
-#ifndef EXCEPTIONS_HPP_
-#define EXCEPTIONS_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <exception>
-#include <boost/exception.hpp>
-
-class MatrixContent;
-class Vector;
-
-/** Base type for all exceptions regarding linear algebra.
- *
- */
-struct LinearAlgebraException : virtual std::exception, virtual boost::exception { };
-
-/** ========================== General error information ================== */
-
-/** Exception information for LinearAlgebraException: determinant.
- */
-typedef boost::error_info<struct tag_LinearAlgebraDeterminant, const double> LinearAlgebraDeterminant;
-
-/** Exception information for LinearAlgebraException: matrix.
- */
-typedef boost::error_info<struct tag_LinearAlgebraMatrixContent, const MatrixContent* const> LinearAlgebraMatrixContent;
-
-/** Exception information for LinearAlgebraException: vector.
- */
-typedef boost::error_info<struct tag_LinearAlgebraVector, const Vector* const> LinearAlgebraVector;
-
-/** Exception information for LinearAlgebraException: vector.
- */
-typedef boost::error_info<
-    struct tag_LinearAlgebraVectorPair,
-    const std::pair<const Vector* const, const Vector* const> > LinearAlgebraVectorPair;
-
-/** ============================ Specific exceptions ====================== */
-
-/** Exception thrown when two vectors are parallel, i.e. linear dependent.
- */
-struct LinearDependenceException : virtual LinearAlgebraException { };
-
-/** Exception thrown when are matrix is not invertiable, i.e. its determinant is NULL.
- */
-struct MultipleSolutionsException : virtual LinearAlgebraException { };
-
-/** Exception thrown when are matrix is not invertiable, i.e. its determinant is NULL.
- */
-struct NotInvertibleException : virtual LinearAlgebraException { };
-
-/** Exception thrown when two lines are skew, i.e. do not intersect.
- */
-struct SkewException : virtual LinearAlgebraException { };
-
-/** Exception thrown when a vector with only zero components is invalidly encountered.
- */
-struct ZeroVectorException : virtual LinearAlgebraException { };
-
-#endif /* EXCEPTIONS_HPP_ */
Index: src/LinearAlgebra/Line.cpp
===================================================================
--- src/LinearAlgebra/Line.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,374 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * Line.cpp
- *
- *  Created on: Apr 30, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "LinearAlgebra/Line.hpp"
-
-#include <cmath>
-#include <iostream>
-#include <limits>
-
-#include "CodePatterns/Info.hpp"
-#include "CodePatterns/Log.hpp"
-#include "CodePatterns/Verbose.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Exceptions.hpp"
-#include "LinearAlgebra/MatrixContent.hpp"
-#include "LinearAlgebra/Plane.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-using namespace std;
-
-Line::Line(const Vector &_origin, const Vector &_direction) :
-  direction(new Vector(_direction))
-{
-  direction->Normalize();
-  origin.reset(new Vector(_origin.partition(*direction).second));
-}
-
-Line::Line(const Line &src) :
-  origin(new Vector(*src.origin)),
-  direction(new Vector(*src.direction))
-{}
-
-Line::~Line()
-{}
-
-Line &Line::operator=(const Line& rhs){
-  if(this!=&rhs){
-    origin.reset(new Vector(*rhs.origin));
-    direction.reset(new Vector(*rhs.direction));
-  }
-  return *this;
-}
-
-
-double Line::distance(const Vector &point) const{
-  // get any vector from line to point
-  Vector helper = point - *origin;
-  // partition this vector along direction
-  // the residue points from the line to the point
-  return helper.partition(*direction).second.Norm();
-}
-
-Vector Line::getClosestPoint(const Vector &point) const{
-  // get any vector from line to point
-  Vector helper = point - *origin;
-  // partition this vector along direction
-  // add only the part along the direction
-  return *origin + helper.partition(*direction).first;
-}
-
-Vector Line::getDirection() const{
-  return *direction;
-}
-
-Vector Line::getOrigin() const{
-  return *origin;
-}
-
-vector<Vector> Line::getPointsOnLine() const{
-  vector<Vector> res;
-  res.reserve(2);
-  res.push_back(*origin);
-  res.push_back(*origin+*direction);
-  return res;
-}
-
-/** Calculates the intersection of the two lines that are both on the same plane.
- * This is taken from Weisstein, Eric W. "Line-Line Intersection." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Line-LineIntersection.html
- * \param *out output stream for debugging
- * \param *Line1a first vector of first line
- * \param *Line1b second vector of first line
- * \param *Line2a first vector of second line
- * \param *Line2b second vector of second line
- * \return true - \a this will contain the intersection on return, false - lines are parallel
- */
-Vector Line::getIntersection(const Line& otherLine) const{
-  Info FunctionInfo(__func__);
-
-  pointset line1Points = getPointsOnLine();
-
-  Vector Line1a = line1Points[0];
-  Vector Line1b = line1Points[1];
-
-  pointset line2Points = otherLine.getPointsOnLine();
-
-  Vector Line2a = line2Points[0];
-  Vector Line2b = line2Points[1];
-
-  Vector res;
-
-  auto_ptr<MatrixContent> M = auto_ptr<MatrixContent>(new MatrixContent(4,4));
-
-  M->setValue(1.);
-  for (int i=0;i<3;i++) {
-    M->set(0, i, Line1a[i]);
-    M->set(1, i, Line1b[i]);
-    M->set(2, i, Line2a[i]);
-    M->set(3, i, Line2b[i]);
-  }
-
-  //Log() << Verbose(1) << "Coefficent matrix is:" << endl;
-  //for (int i=0;i<4;i++) {
-  //  for (int j=0;j<4;j++)
-  //    cout << "\t" << M->Get(i,j);
-  //  cout << endl;
-  //}
-  if (fabs(M->Determinant()) > LINALG_MYEPSILON()) {
-    Log() << Verbose(1) << "Determinant of coefficient matrix is NOT zero." << endl;
-    throw SkewException() << LinearAlgebraDeterminant(M->Determinant()) << LinearAlgebraMatrixContent(&(*M));
-  }
-
-  Log() << Verbose(1) << "INFO: Line1a = " << Line1a << ", Line1b = " << Line1b << ", Line2a = " << Line2a << ", Line2b = " << Line2b << "." << endl;
-
-
-  // constuct a,b,c
-  Vector a = Line1b - Line1a;
-  Vector b = Line2b - Line2a;
-  Vector c = Line2a - Line1a;
-  Vector d = Line2b - Line1b;
-  Log() << Verbose(1) << "INFO: a = " << a << ", b = " << b << ", c = " << c << "." << endl;
-  if ((a.NormSquared() <= LINALG_MYEPSILON()) || (b.NormSquared() <= LINALG_MYEPSILON())) {
-   res.Zero();
-   Log() << Verbose(1) << "At least one of the lines is ill-defined, i.e. offset equals second vector." << endl;
-   throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&a, &b) );
-  }
-
-  // check for parallelity
-  Vector parallel;
-  double factor = 0.;
-  if (fabs(a.ScalarProduct(b)*a.ScalarProduct(b)/a.NormSquared()/b.NormSquared() - 1.) <= LINALG_MYEPSILON()) {
-    parallel = Line1a - Line2a;
-    factor = parallel.ScalarProduct(a)/a.Norm();
-    if ((factor > -LINALG_MYEPSILON()) && (factor - 1. <= LINALG_MYEPSILON())) {
-      res = Line2a;
-      Log() << Verbose(1) << "Lines conincide." << endl;
-      return res;
-    } else {
-      parallel = Line1a - Line2b;
-      factor = parallel.ScalarProduct(a)/a.Norm();
-      if ((factor > -LINALG_MYEPSILON()) && (factor - 1. <= LINALG_MYEPSILON())) {
-        res = Line2b;
-        Log() << Verbose(1) << "Lines conincide." << endl;
-        return res;
-      }
-    }
-    Log() << Verbose(1) << "Lines are parallel." << endl;
-    res.Zero();
-    throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&a, &b) );
-  }
-
-  // obtain s
-  double s;
-  Vector temp1, temp2;
-  temp1 = c;
-  temp1.VectorProduct(b);
-  temp2 = a;
-  temp2.VectorProduct(b);
-  Log() << Verbose(1) << "INFO: temp1 = " << temp1 << ", temp2 = " << temp2 << "." << endl;
-  if (fabs(temp2.NormSquared()) > LINALG_MYEPSILON())
-    s = temp1.ScalarProduct(temp2)/temp2.NormSquared();
-  else
-    s = 0.;
-  Log() << Verbose(1) << "Factor s is " << temp1.ScalarProduct(temp2) << "/" << temp2.NormSquared() << " = " << s << "." << endl;
-
-  // construct intersection
-  res = a;
-  res.Scale(s);
-  res += Line1a;
-  Log() << Verbose(1) << "Intersection is at " << res << "." << endl;
-
-  return res;
-}
-
-/** Rotates the vector by an angle of \a alpha around this line.
- * \param rhs Vector to rotate
- * \param alpha rotation angle in radian
- */
-Vector Line::rotateVector(const Vector &rhs, double alpha) const{
-  Vector helper = rhs;
-
-  // translate the coordinate system so that the line goes through (0,0,0)
-  helper -= *origin;
-
-  // partition the vector into a part that gets rotated and a part that lies along the line
-  pair<Vector,Vector> parts = helper.partition(*direction);
-
-  // we just keep anything that is along the axis
-  Vector res = parts.first;
-
-  // the rest has to be rotated
-  Vector a = parts.second;
-  // we only have to do the rest, if we actually could partition the vector
-  if(!a.IsZero()){
-    // construct a vector that is orthogonal to a and direction and has length |a|
-    Vector y = a;
-    // direction is normalized, so the result has length |a|
-    y.VectorProduct(*direction);
-
-    res += cos(alpha) * a + sin(alpha) * y;
-  }
-
-  // translate the coordinate system back
-  res += *origin;
-  return res;
-}
-
-Line Line::rotateLine(const Line &rhs, double alpha) const{
-  Vector lineOrigin = rotateVector(rhs.getOrigin(),alpha);
-  Vector helper = rhs.getDirection();
-  // rotate the direction without considering the ofset
-  pair<Vector,Vector> parts = helper.partition(*direction);
-  Vector lineDirection = parts.first;
-  Vector a = parts.second;
-  if(!a.IsZero()){
-    // construct a vector that is orthogonal to a and direction and has length |a|
-    Vector y = a;
-    // direction is normalized, so the result has length |a|
-    y.VectorProduct(*direction);
-
-    lineDirection += cos(alpha) * a + sin(alpha) * y;
-  }
-  return Line(lineOrigin,lineDirection);
-}
-
-Plane Line::rotatePlane(const Plane &rhs, double alpha) const{
-  vector<Vector> points = rhs.getPointsOnPlane();
-  transform(points.begin(),
-            points.end(),
-            points.begin(),
-            boost::bind(&Line::rotateVector,this,_1,alpha));
-  return Plane(points[0],points[1],points[2]);
-}
-
-Plane Line::getOrthogonalPlane(const Vector &origin) const{
-  return Plane(getDirection(),origin);
-}
-
-std::vector<Vector> Line::getSphereIntersections() const{
-  std::vector<Vector> res;
-
-  // line is kept in normalized form, so we can skip a lot of calculations
-  double discriminant = 1-origin->NormSquared();
-  // we might have 2, 1 or 0 solutions, depending on discriminant
-  if(discriminant>=0){
-    if(discriminant==0){
-      res.push_back(*origin);
-    }
-    else{
-      Vector helper = sqrt(discriminant)*(*direction);
-      res.push_back(*origin+helper);
-      res.push_back(*origin-helper);
-    }
-  }
-  return res;
-}
-
-LinePoint Line::getLinePoint(const Vector &point) const{
-  ASSERT(isContained(point),"Line point queried for point not on line");
-  Vector helper = point - (*origin);
-  double param = helper.ScalarProduct(*direction);
-  return LinePoint(*this,param);
-}
-
-LinePoint Line::posEndpoint() const{
-  return LinePoint(*this, numeric_limits<double>::infinity());
-}
-LinePoint Line::negEndpoint() const{
-  return LinePoint(*this,-numeric_limits<double>::infinity());
-}
-
-bool operator==(const Line &x,const Line &y){
-  return *x.origin == *y.origin && *x.direction == *y.direction;
-}
-
-Line makeLineThrough(const Vector &x1, const Vector &x2){
-  if(x1==x2){
-    throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&x1, &x2) );
-  }
-  return Line(x1,x1-x2);
-}
-
-/******************************** Points on the line ********************/
-
-LinePoint::LinePoint(const LinePoint &src) :
-  line(src.line),param(src.param)
-{}
-
-LinePoint::LinePoint(const Line &_line, double _param) :
-  line(_line),param(_param)
-{}
-
-LinePoint& LinePoint::operator=(const LinePoint &src){
-  line=src.line;
-  param=src.param;
-  return *this;
-}
-
-Vector LinePoint::getPoint() const{
-  ASSERT(!isInfinite(),"getPoint() on infinite LinePoint called");
-  return (*line.origin)+param*(*line.direction);
-}
-
-Line LinePoint::getLine() const{
-  return line;
-}
-
-bool LinePoint::isInfinite() const{
-  return isPosInfinity() || isNegInfinity();
-}
-bool LinePoint::isPosInfinity() const{
-  return param == numeric_limits<double>::infinity();
-}
-bool LinePoint::isNegInfinity() const{
-  return param ==-numeric_limits<double>::infinity();
-}
-
-bool operator==(const LinePoint &x, const LinePoint &y){
-  ASSERT(x.line==y.line,"Operation on two points of different lines");
-  return x.param == y.param;
-
-}
-bool operator<(const LinePoint &x, const LinePoint &y){
-  ASSERT(x.line==y.line,"Operation on two points of different lines");
-  return x.param<y.param;
-}
-
-ostream& operator<<(ostream& ost, const Line& m)
-{
-  const Vector origin = m.getOrigin();
-  const Vector direction = m.getDirection();
-  ost << "(";
-  for (int i=0;i<NDIM;i++) {
-    ost << origin[i];
-    if (i != 2)
-      ost << ",";
-  }
-  ost << ") -> (";
-  for (int i=0;i<NDIM;i++) {
-    ost << direction[i];
-    if (i != 2)
-      ost << ",";
-  }
-  ost << ")";
-  return ost;
-};
-
Index: src/LinearAlgebra/Line.hpp
===================================================================
--- src/LinearAlgebra/Line.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/*
- * Line.hpp
- *
- *  Created on: Apr 30, 2010
- *      Author: crueger
- */
-
-#ifndef LINE_HPP_
-#define LINE_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "LinearAlgebra/Space.hpp"
-
-#include <iosfwd>
-#include <memory>
-#include <vector>
-
-class Vector;
-class Plane;
-class LinePoint;
-
-class Line : public Space
-{
-  friend bool operator==(const Line&,const Line&);
-  friend class LinePoint;
-public:
-  Line(const Vector &_origin, const Vector &_direction);
-  Line(const Line& _src);
-  virtual ~Line();
-
-  Line &operator=(const Line& rhs);
-
-  virtual double distance(const Vector &point) const;
-  virtual Vector getClosestPoint(const Vector &point) const;
-
-  Vector getDirection() const;
-  Vector getOrigin() const;
-
-  std::vector<Vector> getPointsOnLine() const;
-
-  Vector getIntersection(const Line& otherLine) const;
-
-  Vector rotateVector(const Vector &rhs, double alpha) const;
-  Line rotateLine(const Line &rhs, double alpha) const;
-  Plane rotatePlane(const Plane &rhs, double alpha) const;
-
-  Plane getOrthogonalPlane(const Vector &origin) const;
-
-  std::vector<Vector> getSphereIntersections() const;
-
-  LinePoint getLinePoint(const Vector&) const;
-  LinePoint posEndpoint() const;
-  LinePoint negEndpoint() const;
-
-
-
-private:
-  std::auto_ptr<Vector> origin;
-  std::auto_ptr<Vector> direction;
-};
-
-bool operator==(const Line&,const Line&);
-
-std::ostream & operator << (std::ostream& ost, const Line &m);
-
-/**
- * Named constructor to make a line through two points
- */
-Line makeLineThrough(const Vector &x1, const Vector &x2);
-
-/**
- * Class for representing points on a line
- * These objects allow comparison of points on the same line as well as specifying the
- * infinite "endpoints" of a line.
- */
-class LinePoint{
-  friend class Line;
-  friend bool operator==(const LinePoint&, const LinePoint&);
-  friend bool operator<(const LinePoint&, const LinePoint&);
-public:
-  LinePoint(const LinePoint&);
-  LinePoint& operator=(const LinePoint&);
-  Vector getPoint() const;
-  Line getLine() const;
-  bool isInfinite() const;
-  bool isPosInfinity() const;
-  bool isNegInfinity() const;
-
-private:
-  LinePoint(const Line&,double);
-  Line line;
-  double param;
-};
-
-bool operator==(const LinePoint&, const LinePoint&);
-bool operator<(const LinePoint&, const LinePoint&);
-
-inline bool operator!= (const LinePoint& x, const LinePoint& y) { return !(x==y); }
-inline bool operator>  (const LinePoint& x, const LinePoint& y) { return y<x; }
-inline bool operator<= (const LinePoint& x, const LinePoint& y) { return !(y<x); }
-inline bool operator>= (const LinePoint& x, const LinePoint& y) { return !(x<y); }
-
-
-#endif /* LINE_HPP_ */
Index: src/LinearAlgebra/LineSegment.cpp
===================================================================
--- src/LinearAlgebra/LineSegment.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,97 +1,0 @@
-/*
- * LineSegment.cpp
- *
- *  Created on: Jul 22, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "LinearAlgebra/LineSegment.hpp"
-#include "CodePatterns/Assert.hpp"
-
-#include "Line.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-using namespace std;
-
-LineSegment::LineSegment(const Vector &point1,const Vector &point2){
-  line.reset(new Line(point1,point1-point2));
-  begin.reset(new LinePoint(line->getLinePoint(point1)));
-  end.reset(new LinePoint(line->getLinePoint(point2)));
-}
-
-LineSegment::LineSegment(const LinePoint &lp1,const LinePoint &lp2){
-  ASSERT(lp1.getLine()==lp2.getLine(),"Cannot make a lineSegment with two different lines");
-  line.reset(new Line(lp1.getLine()));
-  begin.reset(new LinePoint(lp1));
-  end.reset(new LinePoint(lp2));
-}
-LineSegment::LineSegment(const LineSegment &src)
-{
-  line.reset(new Line(*src.line));
-  begin.reset(new LinePoint(*src.begin));
-  end.reset(new LinePoint(*src.end));
-}
-LineSegment::~LineSegment(){
-}
-LineSegment &LineSegment::operator=(const LineSegment &src){
-  if(this!=&src){
-    lineptr _line(new Line(*src.line));
-    pointptr _begin(new LinePoint(*src.begin));
-    pointptr _end(new LinePoint(*src.end));
-    line = _line;
-    begin = _begin;
-    end = _end;
-  }
-  return *this;
-}
-
-bool LineSegment::isContained(const Vector &point) const{
-  if(!line->isContained(point)){
-    return false;
-  }
-  LinePoint lp = line->getLinePoint(point);
-  return *begin <= lp && lp <= *end;
-}
-
-bool LineSegment::isContained(const LinePoint &lp) const{
-  ASSERT(lp.getLine()==*line,"Cannot compare Linepoints from different Lines");
-  return *begin <= lp && lp <= *end;
-}
-
-bool LineSegment::overlaps(const LineSegment &lineSeg) const{
-  ASSERT(*lineSeg.line == *line,"Cannot compare Linesegments from different Lines");
-  // mutual comparison of endpoints
-  return lineSeg.isContained(*end) || isContained(*lineSeg.end);
-}
-
-bool LineSegment::hasZeroLength() const{
-  return *begin==*end;
-}
-
-LinePoint LineSegment::getBegin() const{
-  return *begin;
-}
-
-LinePoint LineSegment::getEnd() const{
-  return *end;
-}
-
-Line LineSegment::getLine() const{
-  return *line;
-}
-
-bool operator==(const LineSegment &x,const LineSegment &y){
-  ASSERT(*x.line==*y.line,"Comparison of Linesegments from different lines");
-  return *x.begin == *y.begin && *x.end == *y.end;
-}
-bool operator<(const LineSegment &x,const LineSegment &y){
-  ASSERT(*x.line==*y.line,"Comparison of Linesegments from different lines");
-  return (*x.begin != *y.begin) ? *x.begin<*y.begin:*x.end<*y.end;
-}
Index: src/LinearAlgebra/LineSegment.hpp
===================================================================
--- src/LinearAlgebra/LineSegment.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- * LineSegment.hpp
- *
- *  Created on: Jul 22, 2010
- *      Author: crueger
- */
-
-#ifndef LINESEGMENT_HPP_
-#define LINESEGMENT_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <memory>
-
-class Vector;
-class Line;
-class LinePoint;
-
-class LineSegment
-{
-  friend bool operator==(const LineSegment&,const LineSegment&);
-  friend bool operator<(const LineSegment&,const LineSegment&);
-
-  typedef std::auto_ptr<LinePoint> pointptr;
-  typedef std::auto_ptr<Line> lineptr;
-public:
-  LineSegment(const Vector&,const Vector&);
-  LineSegment(const LinePoint&,const LinePoint&);
-  LineSegment(const LineSegment&);
-  virtual ~LineSegment();
-  LineSegment &operator=(const LineSegment&);
-
-  bool isContained(const Vector &) const;
-  bool isContained(const LinePoint &) const;
-  bool overlaps(const LineSegment&) const;
-  bool hasZeroLength() const;
-  LinePoint getBegin() const;
-  LinePoint getEnd() const;
-  Line getLine() const;
-
-private:
-  pointptr begin;
-  pointptr end;
-  lineptr line;
-};
-
-bool operator==(const LineSegment&,const LineSegment&);
-bool operator<(const LineSegment&,const LineSegment&);
-
-#endif /* LINESEGMENT_HPP_ */
Index: src/LinearAlgebra/LineSegmentSet.cpp
===================================================================
--- src/LinearAlgebra/LineSegmentSet.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,230 +1,0 @@
-/*
- * LineSegmentSet.cpp
- *
- *  Created on: Jul 22, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "LinearAlgebra/LineSegmentSet.hpp"
-
-#include "CodePatterns/Assert.hpp"
-#include "LinearAlgebra/Line.hpp"
-#include "LinearAlgebra/LineSegment.hpp"
-
-#include "CodePatterns/Range.hpp"
-
-#include <algorithm>
-#include <boost/bind.hpp>
-
-using namespace std;
-
-LineSegmentSet::LineSegmentSet(const Line &_line) :
-  line(new Line(_line))
-{}
-
-LineSegmentSet::LineSegmentSet(const LineSegmentSet &src)
-{
-  line.reset(new Line(*src.line));
-  segments=src.segments;
-}
-
-LineSegmentSet& LineSegmentSet::operator=(const LineSegmentSet &src){
-  if(this!=&src){
-    lineptr _line(new Line(*src.line));
-    segments=src.segments;
-    line = _line;
-  }
-  return *this;
-}
-
-void LineSegmentSet::insert(const LineSegment &lineSeg){
-  ASSERT(*line==lineSeg.getLine(),"Inserted LineSegment was not from the line of the set");
-  // we might get messed up sets
-  if(lineSeg.hasZeroLength()){
-    // nothing to do here... there is practically nothing that is being inserted
-    return;
-  }
-  if(lineSeg.getBegin()>lineSeg.getEnd()){
-    // just insert the reversed set
-    insert(LineSegment(lineSeg.getEnd(),lineSeg.getBegin()));
-    return;
-  }
-  // get the first overlapping segment
-  set_t::iterator begin = find_if(segments.begin(),
-                                  segments.end(),
-                                  boost::bind(&LineSegment::overlaps,lineSeg,_1));
-  // see if we have overlapping segments
-  if(begin==segments.end()){
-    // no overlapping segments... we can just insert and get going
-    segments.insert(lineSeg);
-    return;
-  }
-  // get the last overlapping segment
-  set_t::iterator last = begin;
-  while(last!=segments.end() && lineSeg.overlaps(*last))++last;
-  last--;
-  // all segments between last and end now overlap and both are valid iterators
-  ASSERT(begin!=segments.end() && last!=segments.end(),"ERROR: last or begin are behind end of set");
-  // get the endpoints of the section
-  LinePoint beginPoint = min(begin->getBegin(),lineSeg.getBegin());
-  LinePoint endPoint = max(last->getEnd(),lineSeg.getEnd());
-  LineSegment insertSeg(beginPoint,endPoint);
-  // delete all overlapping segments
-  last++;
-  segments.erase(begin,last);
-  // insert the new combined segments
-  segments.insert(insertSeg);
-}
-
-void LineSegmentSet::erase(const LineSegment &lineSeg){
-  ASSERT(*line==lineSeg.getLine(),"Erased LineSegment was not from the line of the set");
-  // we might get messed up sets
-  if(lineSeg.hasZeroLength()){
-    // nothing to do here... there is practically nothing that is being erase
-    return;
-  }
-  if(lineSeg.getBegin()>lineSeg.getEnd()){
-    // just erase the reversed set
-    erase(LineSegment(lineSeg.getEnd(),lineSeg.getBegin()));
-    return;
-  }
-  // get the first overlapping segment
-  set_t::iterator begin = find_if(segments.begin(),
-                                  segments.end(),
-                                  boost::bind(&LineSegment::overlaps,lineSeg,_1));
-  if(begin==segments.end()){
-    // nothing to erase
-    return;
-  }
-  // get the last overlapping segment
-  set_t::iterator last = begin;
-  while(last!=segments.end() && lineSeg.overlaps(*last))++last;
-  last--;
-  // at the ends there might be two overlapping lineSegments of which parts remain
-  LineSegment beginSegment(begin->getBegin(),lineSeg.getBegin());
-  LineSegment endSegment(lineSeg.getEnd(),last->getEnd());
-  // erase all elements that have been overlapped
-  last++;
-  segments.erase(begin,last);
-  // insert the two segments if they still have space left
-  if(beginSegment.getBegin()<beginSegment.getEnd())
-    segments.insert(beginSegment);
-  if(endSegment.getBegin()<endSegment.getEnd())
-      segments.insert(endSegment);
-}
-
-LineSegmentSet::iterator LineSegmentSet::begin(){
-  return segments.begin();
-}
-LineSegmentSet::const_iterator LineSegmentSet::begin() const{
-  return segments.begin();
-}
-LineSegmentSet::iterator LineSegmentSet::end(){
-  return segments.end();
-}
-LineSegmentSet::const_iterator LineSegmentSet::end() const{
-  return segments.end();
-}
-
-bool LineSegmentSet::isContained(const Vector &point) const{
-  if(!line->isContained(point)){
-    return false;
-  }
-  LinePoint lp = line->getLinePoint(point);
-  for(set_t::iterator iter=segments.begin();iter!=segments.end();++iter){
-    if(iter->isContained(point)){
-      return true;
-    }
-    if(iter->getBegin()>lp){
-      break;
-    }
-  }
-  return false;
-}
-
-Line LineSegmentSet::getLine(){
-  return *line;
-}
-
-LineSegmentSet merge(const LineSegmentSet &x,const LineSegmentSet &y){
-  typedef range<LineSegmentSet::set_t::iterator> itRange;
-  ASSERT(*x.line==*y.line,"Lines of merges LineSegmentSets don't match");
-  LineSegmentSet res(*x.line);
-  // standard merge algorithm with a few modifications to deal with overlapping lines
-  itRange small(x.segments.begin(),x.segments.end());
-  itRange large(y.segments.begin(),y.segments.end());
-  while(small.first!=small.last && large.first != large.last){
-    if(large.first->getBegin()<small.first->getBegin()){
-      itRange tmp = small;
-      small = large;
-      large = tmp;
-    }
-
-    if(small.first->overlaps(*large.first)){
-      // get all overlapping segments from larger part
-      LineSegmentSet::set_t::iterator last = large.first;
-      while(last!=large.last && small.first->overlaps(*last))++last;
-      last--;
-      // get the endpoint of the new segment to be inserted
-      LinePoint lpEnd = max(small.first->getEnd(),last->getEnd());
-      res.segments.insert(LineSegment(small.first->getBegin(),lpEnd));
-      large.first=last; ++large.first; // all overlapping segments of the larger part have been dealt with
-    }
-    else{
-      // no overlap, we can just insert
-      res.segments.insert(*small.first);
-    }
-    ++small.first;
-  }
-  // deal with the rest of the iterator
-  // we don't know which one is done, so we just do both
-  res.segments.insert(small.first,small.last);
-  res.segments.insert(large.first,large.last);
-  return res;
-}
-
-LineSegmentSet intersect(const LineSegmentSet &x, const LineSegmentSet &y){
-  typedef range<LineSegmentSet::set_t::iterator> itRange;
-  ASSERT(*x.line==*y.line,"Lines of merges LineSegmentSets don't match");
-  LineSegmentSet res(*x.line);
-  itRange small(x.segments.begin(),x.segments.end());
-  itRange large(y.segments.begin(),y.segments.end());
-
-  while(small.first!=small.last && large.first != large.last){
-    if(large.first->getBegin()<small.first->getBegin()){
-      itRange tmp = small;
-      small = large;
-      large = tmp;
-    }
-    // add overlapping parts of segments from large
-    while(large.first!=large.last && small.first->overlaps(*large.first)){
-      LinePoint lpEnd = min(small.first->getEnd(),large.first->getEnd());
-      res.segments.insert(LineSegment(large.first->getBegin(),lpEnd));
-      ++large.first;
-    }
-    ++small.first;
-  }
-  return res;
-}
-
-LineSegmentSet invert(const LineSegmentSet &x){
-  LineSegmentSet res(*x.line);
-  LinePoint lpBegin = x.line->negEndpoint();
-  for(LineSegmentSet::set_t::iterator iter = x.segments.begin();iter!=x.segments.end();++iter){
-    if(lpBegin!=iter->getBegin())
-      res.segments.insert(LineSegment(lpBegin,iter->getBegin()));
-    // the end of the current scanned segment is the beginning of the next one to insert
-    lpBegin = iter->getEnd();
-  }
-  // we might need to extend to infinity
-  if(!lpBegin.isPosInfinity())
-    res.segments.insert(LineSegment(lpBegin,x.line->posEndpoint()));
-  return res;
-}
Index: src/LinearAlgebra/LineSegmentSet.hpp
===================================================================
--- src/LinearAlgebra/LineSegmentSet.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * LineSegmentSet.hpp
- *
- *  Created on: Jul 22, 2010
- *      Author: crueger
- */
-
-#ifndef LINESEGMENTSET_HPP_
-#define LINESEGMENTSET_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <memory>
-#include <set>
-
-class Vector;
-class Line;
-class LineSegment;
-
-class LineSegmentSet {
-  friend LineSegmentSet merge(const LineSegmentSet&,const LineSegmentSet&);
-  friend LineSegmentSet intersect(const LineSegmentSet&, const LineSegmentSet&);
-  friend LineSegmentSet invert(const LineSegmentSet &);
-
-  typedef std::set<LineSegment> set_t;
-  typedef std::auto_ptr<Line> lineptr;
-public:
-  typedef set_t::iterator iterator;
-  typedef set_t::const_iterator const_iterator;
-
-  LineSegmentSet(const Line&);
-  LineSegmentSet(const LineSegmentSet&);
-  LineSegmentSet& operator=(const LineSegmentSet&);
-
-  void insert(const LineSegment&);
-  void erase(const LineSegment&);
-
-  iterator       begin();
-  const_iterator begin() const;
-  iterator       end();
-  const_iterator end()   const;
-
-  bool isContained(const Vector &) const;
-  Line getLine();
-private:
-  lineptr line;
-  set_t segments;
-};
-
-LineSegmentSet merge(const LineSegmentSet&,const LineSegmentSet&);
-LineSegmentSet intersect(const LineSegmentSet&, const LineSegmentSet&);
-LineSegmentSet invert(const LineSegmentSet &);
-
-#endif /* LINESEGMENTSET_HPP_ */
Index: src/LinearAlgebra/LinearSystemOfEquations.cpp
===================================================================
--- src/LinearAlgebra/LinearSystemOfEquations.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * LinearSystemOfEquations.cpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Assert.hpp"
-#include "CodePatterns/logger.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/LinearSystemOfEquations.hpp"
-#include "LinearAlgebra/MatrixContent.hpp"
-#include "LinearAlgebra/VectorContent.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-#include <gsl/gsl_permutation.h>
-
-/** Constructor for class LinearSystemOfEquations.
- * Allocates Vector and Matrix classes.
- * \param m column dimension
- * \param n row dimension
- */
-LinearSystemOfEquations::LinearSystemOfEquations(int m, int n) : rows(m), columns(n), IsSymmetric(false)
-{
-  A = new MatrixContent(m, n);
-  b = new VectorContent(m);
-  x = new VectorContent(n);
-};
-
-/** Destructor for class LinearSystemOfEquations.
- * Destructs Vector and Matrix classes.
- */
-LinearSystemOfEquations::~LinearSystemOfEquations()
-{
-  delete(A);
-  delete(b);
-  delete(x);
-};
-
-/** Sets whether matrix is to be regarded as symmetric.
- * Note that we do not check whether it really is, just take upper diagonal.
- * \param symmetric true or false
- */
-bool LinearSystemOfEquations::SetSymmetric(bool symmetric)
-{
-  ASSERT (rows == columns, "Rows and columns don't have equal size! Setting symmetric not possible.");
-  return (IsSymmetric = symmetric);
-};
-
-/** Initializes vector b to the components of the given vector.
- * \param *x Vector with equal dimension (no check!)
- */
-void LinearSystemOfEquations::Setb(Vector *x)
-{
-  ASSERT  ( columns == NDIM, "Vector class is always three-dimensional, unlike this LEqS!");
-  b->setFromVector(*x);
-};
-
-/** Initializes vector b to the components of the given vector.
- * \param *x array with equal dimension (no check!)
- */
-void LinearSystemOfEquations::Setb(double *x)
-{
-  b->setFromDoubleArray(x);
-};
-
-/** Initializes matrix a to the components of the given array.
- * note that sort order should be
- * \param *x array with equal dimension (no check!)
- */
-void LinearSystemOfEquations::SetA(double *x)
-{
-  A->setFromDoubleArray(x);
-};
-
-/** Returns the solution vector x \f$A \cdot x = b\f$ as an array of doubles.
- * \param *array pointer allocated array for solution on return (no bounds check, dimension must match)
- * \return true - solving possible, false - some error occured.
- */
-bool LinearSystemOfEquations::GetSolutionAsArray(double *&array)
-{
-  bool status = Solve();
-
-  // copy solution
-  for (size_t i=0;i<x->dimension;i++) {
-    array[i] = x->at(i);
-  }
-  return status;
-};
-
-/** Returns the solution vector x \f$A \cdot x = b\f$ as an array of doubles.
- * \param &x solution vector on return (must be 3-dimensional)
- * \return true - solving possible, false - some error occured.
- */
-bool LinearSystemOfEquations::GetSolutionAsVector(Vector &v)
-{
-  ASSERT (rows == NDIM, "Solution can only be returned as vector if number of columns is NDIM.");
-  bool status = Solve();
-
-  // copy solution
-  for (size_t i=0;i<x->dimension;i++)
-    v[i] = x->at(i);
-  return status;
-};
-
-/** Solves the given system of \f$A \cdot x = b\f$.
- * Use either LU or Householder decomposition.
- * Solution is stored in LinearSystemOfEquations::x
- * \return true - solving possible, false - some error occured.
- */
-bool LinearSystemOfEquations::Solve()
-{
-  // calculate solution
-  int s;
-  if (IsSymmetric) { // use LU
-    gsl_permutation * p = gsl_permutation_alloc (x->dimension);
-    gsl_linalg_LU_decomp (A->content, p, &s);
-    gsl_linalg_LU_solve (A->content, p, b->content, x->content);
-    gsl_permutation_free (p);
-  } else {  // use Householder
-    //MatrixContent *backup = new MatrixContent(rows,columns);
-    //*backup = *A;
-    gsl_linalg_HH_solve (A->content, b->content, x->content);
-    //*A = *backup;
-    //delete(backup);
-  }
-  return true;
-};
-
Index: src/LinearAlgebra/LinearSystemOfEquations.hpp
===================================================================
--- src/LinearAlgebra/LinearSystemOfEquations.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- * LinearSystemOfEquations.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef LINEARSYSTEMSOFEQUATIONS_HPP
-#define LINEARSYSTEMSOFEQUATIONS_HPP
-
-/*********************************************** includes ***********************************/
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gsl/gsl_linalg.h>
-
-/****************************************** forward declarations *****************************/
-
-class Vector;
-class MatrixContent;
-class VectorContent;
-
-/********************************************** declarations *******************************/
-
-/** Solver class for a linear system of equations in the form \f$A \cdot x = b\F$.
- *
- */
-class LinearSystemOfEquations {
-public:
-  LinearSystemOfEquations(int n, int m);
-  ~LinearSystemOfEquations();
-
-  // setting
-  void Setb(Vector *x);
-  void Setb(double *x);
-  void SetA(double *x);
-  bool SetSymmetric(bool symmetric);
-
-  // solving
-  bool GetSolutionAsArray(double *&array);
-  bool GetSolutionAsVector(Vector &v);
-
-  VectorContent *b;
-  VectorContent *x;
-  MatrixContent *A;
-
-private:
-  bool Solve();
-
-  int rows;
-  int columns;
-
-  bool IsSymmetric;
-};
-
-#endif /* LINEARSYSTEMSOFEQUATIONS_HPP */
Index: src/LinearAlgebra/Makefile.am
===================================================================
--- src/LinearAlgebra/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,94 +1,0 @@
-# PLEASE adhere to the alphabetical ordering in this Makefile!
-# Also indentation by a single tab
-
-INCLUDES = -I$(top_srcdir)/src
-
-AM_LDFLAGS = ${CodePatterns_LIBS} -ldl
-AM_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
-
-LINALGSOURCE = \
-  BoxVector.cpp \
-  leastsquaremin.cpp \
-  Line.cpp \
-  LineSegment.cpp \
-  LineSegmentSet.cpp \
-  LinearSystemOfEquations.cpp \
-  MatrixContent.cpp \
-  MatrixVector_ops.cpp \
-  Plane.cpp \
-  RealSpaceMatrix.cpp \
-  Space.cpp \
-  vector_ops.cpp \
-  Vector.cpp \
-  VectorContent.cpp \
-  VectorInterface.cpp
-			   
-LINALGHEADER = \
-  BoxVector.hpp \
-  defs.hpp \
-  fast_functions.hpp \
-  leastsquaremin.hpp \
-  Line.hpp \
-  LineSegment.hpp \
-  LineSegmentSet.hpp \
-  LinearSystemOfEquations.hpp \
-  MatrixContent.hpp \
-  MatrixVector_ops.hpp \
-  RealSpaceMatrix.hpp \
-  Plane.hpp \
-  Space.hpp \
-  vector_ops.hpp \
-  Vector.hpp \
-  VectorContent.hpp \
-  VectorInterface.hpp
-
-
-lib_LTLIBRARIES = libMolecuilderLinearAlgebra.la
-libMolecuilderLinearAlgebra_la_includedir = $(includedir)/MoleCuilder/LinearAlgebra/
-libMolecuilderLinearAlgebra_la_LIBADD = \
-	$(GSL_LIBS)
-nobase_libMolecuilderLinearAlgebra_la_include_HEADERS = ${LINALGHEADER}
-
-## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
-## target.  Note that @MOLECUILDER_API_VERSION@ is not interpreted by Automake and
-## will therefore be treated as if it were literally part of the target name,
-## and the variable name derived from that.
-## The file extension .cc is recognized by Automake, and makes it produce
-## rules which invoke the C++ compiler to produce a libtool object file (.lo)
-## from each source file.  Note that it is not necessary to list header files
-## which are already listed elsewhere in a _HEADERS variable assignment.
-libMolecuilderLinearAlgebra_la_SOURCES = ${LINALGSOURCE}
-
-## Instruct libtool to include ABI version information in the generated shared
-## library file (.so).  The library ABI version is defined in configure.ac, so
-## that all version information is kept in one place.
-libMolecuilderLinearAlgebra_la_LDFLAGS = -version-info $(LINEARALGEBRA_SO_VERSION)
-
-## The generated configuration header is installed in its own subdirectory of
-## $(libdir).  The reason for this is that the configuration information put
-## into this header file describes the target platform the installed library
-## has been built for.  Thus the file must not be installed into a location
-## intended for architecture-independent files, as defined by the Filesystem
-## Hierarchy Standard (FHS).
-## The nodist_ prefix instructs Automake to not generate rules for including
-## the listed files in the distribution on 'make dist'.  Files that are listed
-## in _HEADERS variables are normally included in the distribution, but the
-## configuration header file is generated at configure time and should not be
-## shipped with the source tarball.
-#libMolecuilderLinearAlgebra_libincludedir = $(libdir)/LinearAlgebra/include
-#nodist_libMolecuilderLinearAlgebra_libinclude_HEADERS = $(top_builddir)/libLinearAlgebra_config.h
-
-## Install the generated pkg-config file (.pc) into the expected location for
-## architecture-dependent package configuration information.  Occasionally,
-## pkg-config files are also used for architecture-independent data packages,
-## in which case the correct install location would be $(datadir)/pkgconfig.
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = $(top_builddir)/LinearAlgebra.pc $(top_builddir)/LinearAlgebra-debug.pc
-
-unity.cpp:
-	echo "" >  unity.cpp; \
-	list='$(LINALGSOURCE)'; for file in $$list; do \
-	  echo "#include \"$(srcdir)/$$file\"" >> unity.cpp; \
-	done;
-	
-MOSTLYCLEANFILES = unity.cpp
Index: src/LinearAlgebra/MatrixContent.cpp
===================================================================
--- src/LinearAlgebra/MatrixContent.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,839 +1,0 @@
-/*
- * MatrixContent.cpp
- *
- *  Created on: Nov 14, 2010
- *      Author: heber
- */
-
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Assert.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/fast_functions.hpp"
-#include "LinearAlgebra/MatrixContent.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "LinearAlgebra/Vector.hpp"
-#include "LinearAlgebra/VectorContent.hpp"
-
-#include <gsl/gsl_blas.h>
-#include <gsl/gsl_eigen.h>
-#include <gsl/gsl_linalg.h>
-#include <gsl/gsl_matrix.h>
-#include <gsl/gsl_multimin.h>
-#include <gsl/gsl_vector.h>
-#include <cmath>
-#include <cassert>
-#include <iostream>
-#include <limits>
-#include <set>
-
-using namespace std;
-
-
-/** Constructor for class MatrixContent.
- * \param rows number of rows
- * \param columns number of columns
- */
-MatrixContent::MatrixContent(size_t _rows, size_t _columns) :
-    rows(_rows),
-    columns(_columns),
-    free_content_on_exit(true)
-{
-  content = gsl_matrix_calloc(rows, columns);
-}
-
-/** Constructor of class VectorContent.
- * We need this MatrixBaseCase for the VectorContentView class.
- * There no content should be allocated, as it is just a view with an internal
- * gsl_vector_view. Hence, MatrixBaseCase is just dummy class to give the
- * constructor a unique signature.
- * \param MatrixBaseCase
- */
-MatrixContent::MatrixContent(size_t _rows, size_t _columns, MatrixBaseCase) :
-    rows(_rows),
-    columns(_columns),
-    free_content_on_exit(true)
-{}
-
-/** Constructor for class MatrixContent.
- * \param rows number of rows
- * \param columns number of columns
- * \param *src array with components to initialize matrix with
- */
-MatrixContent::MatrixContent(size_t _rows, size_t _columns, const double *src) :
-    rows(_rows),
-    columns(_columns),
-    free_content_on_exit(true)
-{
-  content = gsl_matrix_calloc(rows, columns);
-  set(0,0, src[0]);
-  set(1,0, src[1]);
-  set(2,0, src[2]);
-
-  set(0,1, src[3]);
-  set(1,1, src[4]);
-  set(2,1, src[5]);
-
-  set(0,2, src[6]);
-  set(1,2, src[7]);
-  set(2,2, src[8]);
-}
-
-/** Constructor that parses square matrix from a stream.
- *
- * \note Matrix dimensions can be preparsed via
- * MatrixContent::preparseMatrixDimensions() without harming the stream.
- *
- * \param &inputstream stream to parse from
- */
-MatrixContent::MatrixContent(size_t _row, size_t _column, std::istream &inputstream) :
-  content(NULL),
-  rows(_row),
-  columns(_column),
-  free_content_on_exit(true)
-{
-   // allocate matrix and set contents
-  content = gsl_matrix_alloc(rows, columns);
-
-  size_t row = 0;
-  do {
-    std::string line;
-    getline(inputstream, line);
-    //std::cout << line << std::endl;
-    std::stringstream parseline(line);
-    // skip comments
-    if ((parseline.peek() == '#') || (parseline.str().empty()))
-      continue;
-    // break on empty lines
-    if (parseline.peek() == '\n')
-      break;
-
-    // parse line with values
-    std::vector<double> line_of_values;
-    do {
-      double value;
-      parseline >> value >> ws;
-      line_of_values.push_back(value);
-    } while (parseline.good());
-
-    // check number of columns parsed
-    ASSERT(line_of_values.size() == columns,
-        "MatrixContent::MatrixContent() - row "
-        +toString(row)+" has a different number of columns "
-        +toString(line_of_values.size())+" than others before "
-        +toString(columns)+".");
-
-    for (size_t column = 0; column < columns; ++column)
-      set(row, column, line_of_values[column]);
-    ++row;
-  } while (inputstream.good());
-  // check number of rows parsed
-  ASSERT(row == rows,
-      "MatrixContent::MatrixContent() - insufficent number of rows "
-      +toString(row)+" < "+toString(rows)+" read.");
-}
-
-
-/** Constructor for class MatrixContent.
- *
- * \param *src source gsl_matrix vector to copy and put into this class
- */
-MatrixContent::MatrixContent(gsl_matrix *&src) :
-    rows(src->size1),
-    columns(src->size2),
-    free_content_on_exit(true)
-{
-  content = gsl_matrix_alloc(src->size1, src->size2);
-  gsl_matrix_memcpy(content,src);
-//  content = src;
-//  src = NULL;
-}
-
-/** Copy constructor for class MatrixContent.
- * \param &src reference to source MatrixContent
- */
-MatrixContent::MatrixContent(const MatrixContent &src) :
-    rows(src.rows),
-    columns(src.columns),
-    free_content_on_exit(true)
-{
-  content = gsl_matrix_alloc(src.rows, src.columns);
-  gsl_matrix_memcpy(content,src.content);
-}
-
-/** Copy constructor for class MatrixContent.
- * \param *src pointer to source MatrixContent
- */
-MatrixContent::MatrixContent(const MatrixContent *src) :
-    rows(src->rows),
-    columns(src->columns),
-    free_content_on_exit(true)
-{
-  ASSERT(src != NULL, "MatrixContent::MatrixContent - pointer to source matrix is NULL!");
-  content = gsl_matrix_alloc(src->rows, src->columns);
-  gsl_matrix_memcpy(content,src->content);
-}
-
-/** Destructor for class MatrixContent.
- */
-MatrixContent::~MatrixContent()
-{
-  if (free_content_on_exit)
-    gsl_matrix_free(content);
-}
-
-/** Getter for MatrixContent::rows.
- * \return MatrixContent::rows
- */
-const size_t MatrixContent::getRows() const
-{
-  return rows;
-}
-
-/** Getter for MatrixContent::columns.
- * \return MatrixContent::columns
- */
-const size_t MatrixContent::getColumns() const
-{
-  return columns;
-}
-
-/** Return a VectorViewContent of the \a column -th column vector.
- *
- * @param column index of column
- * @return column of matrix as VectorContent
- */
-VectorContent *MatrixContent::getColumnVector(size_t column) const
-{
-  ASSERT(column < columns,
-      "MatrixContent::getColumnVector() - requested column "+toString(column)
-      +" greater than dimension "+toString(columns));
-  return (new VectorViewContent(gsl_matrix_column(content,column)));
-}
-
-/** Returns a VectorViewContent of the \a row -th row vector.
- * @param row row index
- * @return VectorContent of row vector
- */
-VectorContent *MatrixContent::getRowVector(size_t row) const
-{
-  ASSERT(row < rows,
-      "MatrixContent::getColumnVector() - requested row "+toString(row)
-      +" greater than dimension "+toString(rows));
-  return (new VectorViewContent(gsl_matrix_row(content,row)));
-}
-
-/** Returns the main diagonal of the matrix as VectorContent.
- * @return diagonal as VectorContent.
- */
-VectorContent *MatrixContent::getDiagonalVector() const
-{
-  return (new VectorViewContent(gsl_matrix_diagonal(content)));
-}
-
-/** Set matrix to identity.
- */
-void MatrixContent::setIdentity()
-{
-  for(int i=rows;i--;){
-    for(int j=columns;j--;){
-      set(i,j,(double)(i==j));
-    }
-  }
-}
-
-/** Set all matrix components to zero.
- */
-void MatrixContent::setZero()
-{
-  for(int i=rows;i--;){
-    for(int j=columns;j--;){
-      set(i,j,0.);
-    }
-  }
-}
-
-/** Set all matrix components to a given value.
- * \param _value value to set each component to
- */
-void MatrixContent::setValue(double _value)
-{
-  for(int i=rows;i--;){
-    for(int j=columns;j--;){
-      set(i,j,_value);
-    }
-  }
-}
-
-/** Copy operator for MatrixContent with self-assignment check.
- * \param &src matrix to compare to
- * \return reference to this
- */
-MatrixContent &MatrixContent::operator=(const MatrixContent &src)
-{
-  if(&src!=this){
-    gsl_matrix_memcpy(content,src.content);
-  }
-  return *this;
-}
-
-/** Addition operator.
- * \param &rhs matrix to add
- * \return reference to this
- */
-const MatrixContent &MatrixContent::operator+=(const MatrixContent &rhs)
-{
-  gsl_matrix_add(content, rhs.content);
-  return *this;
-}
-
-/** Subtraction operator.
- * \param &rhs matrix to subtract
- * \return reference to this
- */
-const MatrixContent &MatrixContent::operator-=(const MatrixContent &rhs)
-    {
-  gsl_matrix_sub(content, rhs.content);
-  return *this;
-}
-
-/** Multiplication operator.
- * Note that here matrix have to have same dimensions.
- * \param &rhs matrix to multiply with
- * \return reference to this
- */
-const MatrixContent &MatrixContent::operator*=(const MatrixContent &rhs)
-{
-  ASSERT(rhs.columns == rhs.rows,
-      "MatrixContent::operator*=() - rhs matrix is not square: "+toString(rhs.columns)+" != "+toString(rhs.rows)+".");
-  ASSERT(columns == rhs.rows,
-      "MatrixContent::operator*=() - columns dimension differ: "+toString(columns)+" != "+toString(rhs.rows)+".");
-  (*this) = (*this)*rhs;
-  return *this;
-}
-
-/** Multiplication with copy operator.
- * \param &rhs matrix to multiply with
- * \return reference to newly allocated MatrixContent
- */
-const MatrixContent MatrixContent::operator*(const MatrixContent &rhs) const
-{
-  ASSERT (columns == rhs.rows,
-      "MatrixContent::operator*() - dimensions not match for matrix product (a,b)*(b,c) = (a,c):"
-      "("+toString(rows)+","+toString(columns)+")*("+toString(rhs.rows)+","+toString(rhs.columns)+")");
-  gsl_matrix *res = gsl_matrix_alloc(rows, rhs.columns);
-  gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, content, rhs.content, 0.0, res);
-  // gsl_matrix is taken over by constructor, hence no free
-  MatrixContent tmp(res);
-  gsl_matrix_free(res);
-  return tmp;
-}
-
-/** Hadamard multiplication with copy operator.
- * The Hadamard product is component-wise matrix product.
- * \param &rhs matrix to hadamard-multiply with
- * \return reference to newly allocated MatrixContent
- */
-const MatrixContent MatrixContent::operator&(const MatrixContent &rhs) const
-{
-  ASSERT ((rows == rhs.rows) && (columns == rhs.columns),
-      "MatrixContent::operator&() - dimensions not match for matrix product (a,b) != (b,c):"
-      "("+toString(rows)+","+toString(columns)+") != ("+toString(rhs.rows)+","+toString(rhs.columns)+")");
-  gsl_matrix *res = gsl_matrix_alloc(rows, rhs.columns);
-  for (size_t i=0;i<rows;++i)
-    for (size_t j=0;j<columns;++j)
-      gsl_matrix_set(res, i,j, gsl_matrix_get(content, i,j)*gsl_matrix_get(rhs.content, i,j));
-  // gsl_matrix is taken over by constructor, hence no free
-  MatrixContent tmp(res);
-  gsl_matrix_free(res);
-  return tmp;
-}
-
-/** Hadamard multiplication with copy operator.
- * The Hadamard product is component-wise matrix product.
- * Note that Hadamard product can easily be done on top of \a *this matrix.
- * Hence, we don't need to use the multiply and copy operator as in the case of
- * MatrixContent::operator*=().
- * \param &rhs matrix to hadamard-multiply with
- * \return reference to newly allocated MatrixContent
- */
-const MatrixContent &MatrixContent::operator&=(const MatrixContent &rhs)
-{
-  ASSERT ((rows == rhs.rows) && (columns == rhs.columns),
-      "MatrixContent::operator&() - dimensions not match for matrix product (a,b) != (b,c):"
-      "("+toString(rows)+","+toString(columns)+") != ("+toString(rhs.rows)+","+toString(rhs.columns)+")");
-  for (size_t i=0;i<rows;++i)
-    for (size_t j=0;j<columns;++j)
-      gsl_matrix_set(content, i,j, gsl_matrix_get(content, i,j)*gsl_matrix_get(rhs.content, i,j));
-  return *this;
-}
-
-/* ========================== Accessing =============================== */
-
-/** Accessor for manipulating component (i,j).
- * \param i row number
- * \param j column number
- * \return reference to component (i,j)
- */
-double &MatrixContent::at(size_t i, size_t j)
-{
-  ASSERT((i>=0) && (i<rows),
-      "MatrixContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(rows)+"]");
-  ASSERT((j>=0) && (j<columns),
-      "MatrixContent::at() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(columns)+"]");
-  return *gsl_matrix_ptr (content, i, j);
-}
-
-/** Constant accessor for (value of) component (i,j).
- * \param i row number
- * \param j column number
- * \return const component (i,j)
- */
-const double MatrixContent::at(size_t i, size_t j) const
-{
-  ASSERT((i>=0) && (i<rows),
-      "MatrixContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(rows)+"]");
-  ASSERT((j>=0) && (j<columns),
-      "MatrixContent::at() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(columns)+"]");
-  return gsl_matrix_get(content, i, j);
-}
-
-/** These functions return a pointer to the \a m-th element of a matrix.
- *  If \a m or \a n lies outside the allowed range of 0 to MatrixContent::dimension-1 then the error handler is invoked and a null pointer is returned.
- * \param m index
- * \return pointer to \a m-th element
- */
-double *MatrixContent::Pointer(size_t m, size_t n)
-{
-  return gsl_matrix_ptr (content, m, n);
-};
-
-/** These functions return a constant pointer to the \a m-th element of a matrix.
- *  If \a m or \a n lies outside the allowed range of 0 to MatrixContent::dimension-1 then the error handler is invoked and a null pointer is returned.
- * \param m index
- * \return const pointer to \a m-th element
- */
-const double *MatrixContent::const_Pointer(size_t m, size_t n) const
-{
-  return gsl_matrix_const_ptr (content, m, n);
-};
-
-/* ========================== Initializing =============================== */
-
-/** Setter for component (i,j).
- * \param i row numbr
- * \param j column numnber
- * \param value value to set componnt (i,j) to
- */
-void MatrixContent::set(size_t i, size_t j, const double value)
-{
-  ASSERT((i>=0) && (i<rows),
-      "MatrixContent::set() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(rows)+"]");
-  ASSERT((j>=0) && (j<columns),
-      "MatrixContent::set() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(columns)+"]");
-  gsl_matrix_set(content,i,j,value);
-}
-
-/** This function sets the matrix from a double array.
- * Creates a matrix view of the array and performs a memcopy.
- * \param *x array of values (no dimension check is performed)
- */
-void MatrixContent::setFromDoubleArray(double * x)
-{
-  gsl_matrix_view m = gsl_matrix_view_array (x, rows, columns);
-  gsl_matrix_memcpy (content, &m.matrix);
-};
-
-/* ====================== Exchanging elements ============================ */
-/** This function exchanges the \a i-th and \a j-th row of the matrix in-place.
- * \param i i-th row to swap with ...
- * \param j ... j-th row to swap against
- */
-bool MatrixContent::SwapRows(size_t i, size_t j)
-{
-  return (gsl_matrix_swap_rows (content, i, j) == GSL_SUCCESS);
-};
-
-/** This function exchanges the \a i-th and \a j-th column of the matrix in-place.
- * \param i i-th column to swap with ...
- * \param j ... j-th column to swap against
- */
-bool MatrixContent::SwapColumns(size_t i, size_t j)
-{
-  return (gsl_matrix_swap_columns (content, i, j) == GSL_SUCCESS);
-};
-
-/** This function exchanges the \a i-th row and \a j-th column of the matrix in-place.
- * The matrix must be square for this operation to be possible.
- * \param i i-th row to swap with ...
- * \param j ... j-th column to swap against
- */
-bool MatrixContent::SwapRowColumn(size_t i, size_t j)
-{
-  ASSERT (rows == columns,
-      "MatrixContent::SwapRowColumn() - The matrix must be square for swapping row against column to be possible.");
-  return (gsl_matrix_swap_rowcol (content, i, j) == GSL_SUCCESS);
-};
-
-/** Return transposed matrix.
- * \return new matrix that is transposed of this.
- */
-MatrixContent MatrixContent::transpose() const
-{
-  gsl_matrix *res = gsl_matrix_alloc(columns, rows);  // column and row dimensions exchanged!
-  gsl_matrix_transpose_memcpy(res, content);
-  MatrixContent newContent(res);
-  gsl_matrix_free(res);
-  return newContent;
-}
-
-/** Turn this matrix into its transposed.
- * Note that this is only possible if rows == columns.
- */
-MatrixContent &MatrixContent::transpose()
-{
-  ASSERT( rows == columns,
-      "MatrixContent::transpose() - cannot transpose onto itself as matrix not square: "+toString(rows)+"!="+toString(columns)+"!");
-  double tmp;
-  for (size_t i=0;i<rows;i++)
-    for (size_t j=i+1;j<rows;j++) {
-      tmp = at(j,i);
-      at(j,i) = at(i,j);
-      at(i,j) = tmp;
-    }
-  return *this;
-}
-
-/** Transform the matrix to its eigenbasis and return resulting eigenvalues.
- * Note that we only return real-space part in case of non-symmetric matrix.
- * \warn return vector has to be freed'd
- * TODO: encapsulate return value in boost::shared_ptr or in VectorContent.
- * \return gsl_vector pointer to vector of eigenvalues
- */
-gsl_vector* MatrixContent::transformToEigenbasis()
-{
-  if (rows == columns) { // symmetric
-    gsl_eigen_symmv_workspace *T = gsl_eigen_symmv_alloc(rows);
-    gsl_vector *eval = gsl_vector_alloc(rows);
-    gsl_matrix *evec = gsl_matrix_alloc(rows, rows);
-    gsl_eigen_symmv(content, eval, evec, T);
-    gsl_eigen_symmv_free(T);
-    gsl_matrix_memcpy(content, evec);
-    gsl_matrix_free(evec);
-    return eval;
-  } else { // non-symmetric
-    // blow up gsl_matrix in content to square matrix, fill other components with zero
-    const size_t greaterDimension = rows > columns ? rows : columns;
-    gsl_matrix *content_square = gsl_matrix_alloc(greaterDimension, greaterDimension);
-    for (size_t i=0; i<greaterDimension; i++) {
-      for (size_t j=0; j<greaterDimension; j++) {
-        const double value = ((i < rows) && (j < columns)) ? gsl_matrix_get(content,i,j) : 0.;
-        gsl_matrix_set(content_square, i,j, value);
-      }
-    }
-
-    // show squared matrix by putting it into a MatrixViewContent
-    MatrixContent *ContentSquare = new MatrixViewContent(gsl_matrix_submatrix(content_square,0,0,content_square->size1, content_square->size2));
-    std::cout << "The squared matrix is " << *ContentSquare << std::endl;
-
-    // solve eigenvalue problem
-    gsl_eigen_nonsymmv_workspace *T = gsl_eigen_nonsymmv_alloc(rows);
-    gsl_vector_complex *eval = gsl_vector_complex_alloc(greaterDimension);
-    gsl_matrix_complex *evec = gsl_matrix_complex_alloc(greaterDimension, greaterDimension);
-    gsl_eigen_nonsymmv(content_square, eval, evec, T);
-    gsl_eigen_nonsymmv_free(T);
-
-    // copy eigenvectors real-parts into content_square and ...
-    for (size_t i=0; i<greaterDimension; i++)
-      for (size_t j=0; j<greaterDimension; j++)
-        gsl_matrix_set(content_square, i,j, GSL_REAL(gsl_matrix_complex_get(evec,i,j)));
-
-    // ... show complex-valued eigenvector matrix
-    std::cout << "The real-value eigenvector matrix is " << *ContentSquare << std::endl;
-//    std::cout << "Resulting eigenvector matrix is [";
-//    for (size_t i=0; i<greaterDimension; i++) {
-//      for (size_t j=0; j<greaterDimension; j++) {
-//        std::cout << "(" << GSL_REAL(gsl_matrix_complex_get(evec,i,j))
-//            << "," << GSL_IMAG(gsl_matrix_complex_get(evec,i,j)) << ")";
-//        if (j < greaterDimension-1)
-//          std::cout << " ";
-//      }
-//      if (i < greaterDimension-1)
-//        std::cout << "; ";
-//    }
-//    std::cout << "]" << std::endl;
-
-    // copy real-parts of complex eigenvalues and eigenvectors (column-wise orientation)
-    gsl_vector *eval_real = gsl_vector_alloc(columns);
-    size_t I=0;
-    for (size_t i=0; i<greaterDimension; i++) { // only copy real space part
-      if (fabs(GSL_REAL(gsl_vector_complex_get(eval,i))) > LINALG_MYEPSILON()) { // only take eigenvectors with value > 0
-        std::cout << i << "th eigenvalue is (" << GSL_REAL(gsl_vector_complex_get(eval,i)) << "," << GSL_IMAG(gsl_vector_complex_get(eval,i)) << ")" << std::endl;
-        for (size_t j=0; j<greaterDimension; j++) {
-          if (fabs(GSL_IMAG(gsl_matrix_complex_get(evec,j,i))) > LINALG_MYEPSILON())
-            std::cerr << "MatrixContent::transformToEigenbasis() - WARNING: eigenvectors are complex-valued!" << std::endl;
-          gsl_matrix_set(content, j,I, GSL_REAL(gsl_matrix_complex_get(evec,j,i)));
-        }
-        if (fabs(GSL_IMAG(gsl_vector_complex_get(eval,I))) > LINALG_MYEPSILON())
-          std::cerr << "MatrixContent::transformToEigenbasis() - WARNING: eigenvectors are complex-valued!" << std::endl;
-        gsl_vector_set(eval_real, I, GSL_REAL(gsl_vector_complex_get(eval, i)));
-        I++;
-      }
-    }
-    gsl_matrix_complex_free(evec);
-    gsl_vector_complex_free(eval);
-    delete ContentSquare;
-
-    return eval_real;
-  }
-}
-
-
-/** Sorts the eigenpairs in ascending order of the eigenvalues.
- * We assume that MatrixContent::transformToEigenbasis() has just been called.
- * @param eigenvalues vector of eigenvalue from
- *        MatrixContent::transformToEigenbasis()
- */
-void MatrixContent::sortEigenbasis(gsl_vector *eigenvalues)
-{
-  gsl_eigen_symmv_sort (eigenvalues, content,
-                          GSL_EIGEN_SORT_VAL_ASC);
-}
-
-/* ============================ Properties ============================== */
-/** Checks whether matrix' elements are strictly null.
- * \return true - is null, false - else
- */
-bool MatrixContent::IsNull() const
-{
-  return gsl_matrix_isnull (content);
-};
-
-/** Checks whether matrix' elements are strictly positive.
- * \return true - is positive, false - else
- */
-bool MatrixContent::IsPositive() const
-{
-  return gsl_matrix_ispos (content);
-};
-
-/** Checks whether matrix' elements are strictly negative.
- * \return true - is negative, false - else
- */
-bool MatrixContent::IsNegative() const
-{
-  return gsl_matrix_isneg (content);
-};
-
-/** Checks whether matrix' elements are strictly non-negative.
- * \return true - is non-negative, false - else
- */
-bool MatrixContent::IsNonNegative() const
-{
-  return gsl_matrix_isnonneg (content);
-};
-
-/** This function performs a Cholesky decomposition to determine whether matrix is positive definite.
- * We check whether GSL returns GSL_EDOM as error, indicating that decomposition failed due to matrix not being positive-definite.
- * \return true - matrix is positive-definite, false - else
- */
-bool MatrixContent::IsPositiveDefinite() const
-{
-  if (rows != columns)  // only possible for square matrices.
-    return false;
-  else
-    return (gsl_linalg_cholesky_decomp (content) != GSL_EDOM);
-};
-
-
-/** Calculates the determinant of the matrix.
- * if matrix is square, uses LU decomposition.
- */
-double MatrixContent::Determinant() const
-{
-  int signum = 0;
-  ASSERT(rows == columns,
-      "MatrixContent::Determinant() - determinant can only be calculated for square matrices.");
-  gsl_permutation *p = gsl_permutation_alloc(rows);
-  gsl_linalg_LU_decomp(content, p, &signum);
-  gsl_permutation_free(p);
-  return gsl_linalg_LU_det(content, signum);
-};
-
-/** Preparses a matrix in an input stream for row and column count.
- *
- *  \note This does not change the get position within the stream.
- *
- * @param inputstream to parse matrix from
- * @return pair with (row, column)
- */
-std::pair<size_t, size_t> MatrixContent::preparseMatrixDimensions(std::istream &inputstream)
-{
-  const std::streampos initial_position(inputstream.tellg());
-//  std::cout << "We are at position "
-//      +toString((int)inputstream.tellg())+" from start of stream." << std::endl;
-  size_t rows = 0;
-  size_t columns = 0;
-  do {
-    std::string line;
-    getline(inputstream, line);
-    std::stringstream parseline(line);
-    // skip comments
-    if ((parseline.peek() == '#') || (line.empty()))
-      continue;
-    // break on empty lines
-    if (parseline.peek() == '\n')
-      break;
-
-    // parse line with values
-    std::vector<double> line_of_values;
-    do {
-      double value;
-      parseline >> value >> ws;
-      line_of_values.push_back(value);
-    } while (parseline.good());
-
-    // set matrixdimension if first line
-    if (columns == 0) {
-      columns = line_of_values.size();
-    } else { // otherwise check
-      ASSERT(columns == line_of_values.size(),
-          "MatrixContent::MatrixContent() - row "
-          +toString(rows)+" has a different number of columns "
-          +toString(line_of_values.size())+" than this matrix has "
-          +toString(columns)+".");
-    }
-    ++rows;
-  } while (inputstream.good());
-  // clear end of file flags
-  inputstream.clear();
-
-  // reset to initial position
-  inputstream.seekg(initial_position);
-//  std::cout << "We are again at position "
-//      +toString((int)inputstream.tellg())+" from start of stream." << std::endl;
-
-  return make_pair(rows, columns);
-}
-
-/** Writes matrix content to ostream in such a manner that it can be re-parsed
- * by the code in the constructor.
- *
- * @param ost stream to write to
- */
-void MatrixContent::write(std::ostream &ost) const
-{
-  for (size_t row = 0; row < rows; ++row) {
-    for (size_t column = 0; column < columns; ++column)
-      ost << at(row, column) << "\t";
-    ost << std::endl;
-  }
-}
-
-
-/* ============================= Operators =============================== */
-
-/** Scalar multiplication operator.
- * \param factor factor to scale with
- */
-const MatrixContent &MatrixContent::operator*=(const double factor)
-{
-  gsl_matrix_scale(content, factor);
-  return *this;
-}
-
-/** Scalar multiplication and copy operator.
- * \param factor factor to scale with
- * \param &mat MatrixContent to scale
- * \return copied and scaled MatrixContent
- */
-const MatrixContent operator*(const double factor,const MatrixContent& mat)
-{
-  MatrixContent tmp = mat;
-  tmp*=factor;
-  return tmp;
-}
-
-/** Scalar multiplication and copy operator (with operands exchanged).
- * \param &mat MatrixContent to scale
- * \param factor factor to scale with
- * \return copied and scaled MatrixContent
- */
-const MatrixContent operator*(const MatrixContent &mat,const double factor)
-{
-  return factor*mat;
-}
-
-/** Sums two MatrixContents \a  and \b component-wise.
- * \param a first MatrixContent
- * \param b second MatrixContent
- * \return a + b
- */
-MatrixContent const operator+(const MatrixContent& a, const MatrixContent& b)
-{
-  ASSERT(a.rows == b.rows, "MatrixContent::operator+() - row counts have to match: "
-      +toString(a.rows)+" != "+toString(b.rows)+"!");
-  ASSERT(a.columns == b.columns, "MatrixContent::operator+() - column counts have to match: "
-      +toString(a.columns)+" != "+toString(b.columns)+"!");
-  MatrixContent x(a);
-  x += b;
-  return x;
-};
-
-/** Subtracts MatrixContent \a from \b component-wise.
- * \param a first MatrixContent
- * \param b second MatrixContent
- * \return a - b
- */
-MatrixContent const operator-(const MatrixContent& a, const MatrixContent& b)
-{
-  ASSERT(a.rows == b.rows, "MatrixContent::operator+() - row counts have to match: "
-      +toString(a.rows)+" != "+toString(b.rows)+"!");
-  ASSERT(a.columns == b.columns, "MatrixContent::operator+() - column counts have to match: "
-      +toString(a.columns)+" != "+toString(b.columns)+"!");
-  MatrixContent x(a);
-  x -= b;
-  return x;
-};
-
-/** Equality operator.
- * Note that we use numerical sensible checking, i.e. with threshold LINALG_MYEPSILON().
- * \param &rhs MatrixContent to checks against
- */
-bool MatrixContent::operator==(const MatrixContent &rhs) const
-    {
-  if ((rows == rhs.rows) && (columns == rhs.columns)) {
-    for(int i=rows;i--;){
-      for(int j=columns;j--;){
-        if(fabs(at(i,j)-rhs.at(i,j))>LINALG_MYEPSILON()){
-          return false;
-        }
-      }
-    }
-    return true;
-  }
-  return false;
-}
-
-
-std::ostream & operator<<(std::ostream &ost, const MatrixContent &mat)
-{
-  ost << "\\begin{pmatrix}";
-  for (size_t i=0;i<mat.rows;i++) {
-    for (size_t j=0;j<mat.columns;j++) {
-      ost << mat.at(i,j) << " ";
-      if (j != mat.columns-1)
-        ost << "& ";
-    }
-    if (i != mat.rows-1)
-      ost << "\\\\ ";
-  }
-  ost << "\\end{pmatrix}";
-  return ost;
-}
Index: src/LinearAlgebra/MatrixContent.hpp
===================================================================
--- src/LinearAlgebra/MatrixContent.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,171 +1,0 @@
-/*
- * MatrixContent.hpp
- *
- *  Created on: Jul 2, 2010
- *      Author: crueger
- */
-
-#ifndef MATRIXCONTENT_HPP_
-#define MATRIXCONTENT_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-/** MatrixContent is a wrapper for gsl_matrix.
- *
- * The GNU Scientific Library contaisn some very well written routines for
- * linear algebra problems. However, it's syntax is C and hence it does not
- * lend itself to readable written code, i.e. C = A * B, where A, B, and C
- * are all matrices. Writing code this way is very convenient, concise and
- * also in the same manner as one would type in MatLab.
- * However, with C++ and its feature to overload functions and its operator
- * functions such syntax is easy to create.
- *
- * Hence, this class is a C++ wrapper to gsl_matrix. There already some other
- * libraries, however they fall short for the following reasons:
- * -# gslwrap: not very well written and uses floats instead of doubles
- * -# gslcpp: last change is from 2007 and only very few commits
- * -# o2scl: basically, the same functionality as gsl only written in C++,
- *    however it uses GPLv3 license which is inconvenient for MoleCuilder.
- *
- * <h1>Howto use MatrixContent</h1>
- *
- * One should not use MatrixContent directly but either have it as a member
- * variable in a specialized class or inherit from it.
- *
- */
-
-#include <gsl/gsl_matrix.h>
-
-#include <iosfwd>
-
-#include "LinearAlgebra/MatrixVector_ops.hpp"
-
-class VectorContent;
-
-/** Dummy structure to create a unique signature.
- *
- */
-struct MatrixBaseCase{};
-
-class MatrixContent
-{
-  friend std::ostream & operator<<(std::ostream &ost, const MatrixContent &mat);
-  friend class RealSpaceMatrix;
-  friend class LinearSystemOfEquations;
-
-  // matrix vector products
-  friend VectorContent const operator*(const VectorContent& vec, const MatrixContent& mat);
-  friend VectorContent const operator*(const MatrixContent& mat, const VectorContent& vec);
-  friend MatrixContent const operator+(const MatrixContent& a, const MatrixContent& b);
-  friend MatrixContent const operator-(const MatrixContent& a, const MatrixContent& b);
-
-  // unit tests
-  friend class MatrixContentTest;
-  friend class MatrixContentSymmetricTest;
-public:
-  MatrixContent(size_t rows, size_t columns);
-  MatrixContent(size_t _rows, size_t _columns, MatrixBaseCase);
-  MatrixContent(size_t rows, size_t columns, const double *src);
-  MatrixContent(size_t rows, size_t columns, std::istream &inputstream);
-  MatrixContent(gsl_matrix *&src);
-  MatrixContent(const MatrixContent &src);
-  MatrixContent(const MatrixContent *src);
-  virtual ~MatrixContent();
-
-  // Accessing
-  double &at(size_t i, size_t j);
-  const double at(size_t i, size_t j) const;
-  void set(size_t i, size_t j, const double value);
-
-  // Initializing
-  void setFromDoubleArray(double * x);
-  void setIdentity();
-  void setValue(double _value);
-  void setZero();
-
-  // Exchanging elements
-  bool SwapRows(size_t i, size_t j);
-  bool SwapColumns(size_t i, size_t j);
-  bool SwapRowColumn(size_t i, size_t j);
-
-  // Transformations
-  MatrixContent transpose() const;
-  MatrixContent &transpose();
-  gsl_vector* transformToEigenbasis();
-  void sortEigenbasis(gsl_vector *eigenvalues);
-
-  // Properties
-  bool IsNull() const;
-  bool IsPositive() const;
-  bool IsNegative() const;
-  bool IsNonNegative() const;
-  bool IsPositiveDefinite() const;
-  double Determinant() const;
-
-  // Operators
-  MatrixContent &operator=(const MatrixContent &src);
-  const MatrixContent &operator+=(const MatrixContent &rhs);
-  const MatrixContent &operator-=(const MatrixContent &rhs);
-  const MatrixContent &operator*=(const MatrixContent &rhs);
-  const MatrixContent operator*(const MatrixContent &rhs) const;
-  const MatrixContent &operator&=(const MatrixContent &rhs);
-  const MatrixContent operator&(const MatrixContent &rhs) const;
-  const MatrixContent &operator*=(const double factor);
-  bool operator==(const MatrixContent &rhs) const;
-
-  const size_t getRows() const;
-  const size_t getColumns() const;
-
-  VectorContent *getColumnVector(size_t column) const;
-  VectorContent *getRowVector(size_t row) const;
-  VectorContent *getDiagonalVector() const;
-
-  static std::pair<size_t, size_t> preparseMatrixDimensions(std::istream &inputstream);
-  void write(std::ostream &ost) const;
-
-protected:
-  double *Pointer(size_t m, size_t n);
-  const double *const_Pointer(size_t m, size_t n) const;
-
-  gsl_matrix * content;
-  const size_t rows;      // store for internal purposes
-  const size_t columns;  // store for internal purposes
-
-private:
-  bool free_content_on_exit;
-};
-
-std::ostream & operator<<(std::ostream &ost, const MatrixContent &mat);
-const MatrixContent operator*(const double factor,const MatrixContent& mat);
-const MatrixContent operator*(const MatrixContent &mat,const double factor);
-MatrixContent const operator+(const MatrixContent& a, const MatrixContent& b);
-MatrixContent const operator-(const MatrixContent& a, const MatrixContent& b);
-
-/** Matrix view.
- * Extension of MatrixContent to contain not a gsl_matrix but only a view on a
- * gsl_matrix
- *
- * We need the above MatrixBaseCase here:
- * content, i.e. the gsl_matrix, must not be allocated, as it is just a view
- * with an internal gsl_matrix_view. Hence, MatrixBaseCase is just dummy class
- * to give the constructor a unique signature.
- */
-struct MatrixViewContent : public MatrixContent
-{
-  MatrixViewContent(gsl_matrix_view _view) :
-    MatrixContent(_view.matrix.size1, _view.matrix.size2, MatrixBaseCase()),
-    view(_view)
-  {
-    content = &view.matrix;
-  }
-  ~MatrixViewContent(){
-    content=0;
-  }
-  gsl_matrix_view view;
-};
-
-#endif /* MATRIXCONTENT_HPP_ */
Index: src/LinearAlgebra/MatrixVector_ops.cpp
===================================================================
--- src/LinearAlgebra/MatrixVector_ops.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * MatrixVector_ops.cpp
- *
- *  Created on: Nov 18, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include <gsl/gsl_blas.h>
-#include <gsl/gsl_vector.h>
-
-#include "CodePatterns/Assert.hpp"
-#include "LinearAlgebra/MatrixContent.hpp"
-#include "LinearAlgebra/MatrixVector_ops.hpp"
-#include "LinearAlgebra/Vector.hpp"
-#include "LinearAlgebra/VectorContent.hpp"
-
-/** Vector-Matrix-product.
- * @param vec vector
- * @param mat matrix
- * @return \f$(\text{vec} \cdot \text{mat})\f$
- */
-VectorContent const operator*(const VectorContent& vec, const MatrixContent& mat)
-{
-  ASSERT( mat.columns == vec.dimension,
-      "operator*() - column dimension of matrix ("+toString(mat.columns)
-      +") and dimension of this vector ("+toString(vec.dimension)+") not equal!");
-  VectorContent result(mat.rows);
-  gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content, vec.content, 0.0, result.content);
-  return result;
-}
-
-/** Matrix-Vector-product.
- * @param mat matrix
- * @param vec vector
- * @return \f$(\text{mat} \cdot \text{vec})\f$
- */
-VectorContent const operator*(const MatrixContent& mat, const VectorContent& vec)
-{
-  ASSERT( mat.columns == vec.dimension,
-      "operator*() - column dimension of this matrix ("+toString(mat.columns)
-      +") and dimension of vector ("+toString(vec.dimension)+") not equal!");
-  VectorContent result(mat.rows);
-  gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content, vec.content, 0.0, result.content);
-  return result;
-}
-
-/** Matrix-Vector-product.
- * @param mat matrix
- * @param vec vector
- * @return \f$(\text{mat} \cdot \text{vec})\f$
- */
-Vector const operator*(const MatrixContent &mat, const Vector &vec)
-{
-  VectorContent res = mat*(vec.content);
-  return Vector (res);
-}
-
-/** Matrix-Vector-product.
- * @param vec vector
- * @param mat matrix
- * @return \f$(\text{vec} \cdot \text{mat})\f$
- */
-Vector const operator*(const Vector &vec, const MatrixContent &mat)
-{
-  VectorContent res = (vec.content)*mat;
-  return Vector(res);
-}
-
Index: src/LinearAlgebra/MatrixVector_ops.hpp
===================================================================
--- src/LinearAlgebra/MatrixVector_ops.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * MatrixVector_ops.hpp
- *
- *  Created on: Nov 18, 2010
- *      Author: heber
- */
-
-#ifndef MATRIXVECTOR_OPS_HPP_
-#define MATRIXVECTOR_OPS_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-class Vector;
-class MatrixContent;
-class VectorContent;
-
-VectorContent const operator*(const VectorContent& vec, const MatrixContent& mat);
-VectorContent const operator*(const MatrixContent& mat, const VectorContent& vec);
-
-Vector const operator*(const Vector &vec, const MatrixContent &mat);
-Vector const operator*(const MatrixContent &mat, const Vector &vec);
-
-#endif /* MATRIXVECTOR_OPS_HPP_ */
Index: src/LinearAlgebra/Plane.cpp
===================================================================
--- src/LinearAlgebra/Plane.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,255 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * Plane.cpp
- *
- *  Created on: Apr 7, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include <cmath>
-#include <limits>
-
-#include "CodePatterns/Assert.hpp"
-#include "CodePatterns/Info.hpp"
-#include "CodePatterns/Log.hpp"
-#include "CodePatterns/Verbose.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Exceptions.hpp"
-#include "LinearAlgebra/fast_functions.hpp"
-#include "LinearAlgebra/Line.hpp"
-#include "LinearAlgebra/Plane.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-/**
- * generates a plane from three given vectors defining three points in space
- */
-Plane::Plane(const Vector &y1, const Vector &y2, const Vector &y3) throw(LinearDependenceException) :
-  normalVector(new Vector())
-{
-  Vector x1 = y1 - y2;
-  Vector x2 = y3 - y2;
-  if ((x1.Norm() <= LINALG_MYEPSILON())) {
-    throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&y1, &y2) );
-  }
-  if ((x2.Norm() <= LINALG_MYEPSILON())) {
-    throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&y2, &y3) );
-  }
-  if((fabs(x1.Angle(x2)) <= LINALG_MYEPSILON())) {
-    throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&x1, &x2) );
-  }
-//  Log() << Verbose(4) << "relative, first plane coordinates:";
-//  x1.Output((ofstream *)&cout);
-//  Log() << Verbose(0) << endl;
-//  Log() << Verbose(4) << "second plane coordinates:";
-//  x2.Output((ofstream *)&cout);
-//  Log() << Verbose(0) << endl;
-
-  normalVector->at(0) = (x1[1]*x2[2] - x1[2]*x2[1]);
-  normalVector->at(1) = (x1[2]*x2[0] - x1[0]*x2[2]);
-  normalVector->at(2) = (x1[0]*x2[1] - x1[1]*x2[0]);
-  normalVector->Normalize();
-
-  offset=normalVector->ScalarProduct(y1);
-}
-/**
- * Constructs a plane from two direction vectors and a offset.
- */
-Plane::Plane(const Vector &y1, const Vector &y2, double _offset) throw(ZeroVectorException,LinearDependenceException) :
-    normalVector(new Vector()),
-    offset(_offset)
-{
-  Vector x1 = y1;
-  Vector x2 = y2;
-  if ((x1.Norm() <= LINALG_MYEPSILON())) {
-    throw ZeroVectorException() << LinearAlgebraVector(&x1);
-  }
-  if ((x2.Norm() <= LINALG_MYEPSILON())) {
-    throw ZeroVectorException() << LinearAlgebraVector(&x2);
-  }
-  if((fabs(x1.Angle(x2)) <= LINALG_MYEPSILON())) {
-    throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&x1, &x2) );
-  }
-//  Log() << Verbose(4) << "relative, first plane coordinates:";
-//  x1.Output((ofstream *)&cout);
-//  Log() << Verbose(0) << endl;
-//  Log() << Verbose(4) << "second plane coordinates:";
-//  x2.Output((ofstream *)&cout);
-//  Log() << Verbose(0) << endl;
-
-  normalVector->at(0) = (x1[1]*x2[2] - x1[2]*x2[1]);
-  normalVector->at(1) = (x1[2]*x2[0] - x1[0]*x2[2]);
-  normalVector->at(2) = (x1[0]*x2[1] - x1[1]*x2[0]);
-  normalVector->Normalize();
-}
-
-Plane::Plane(const Vector &_normalVector, double _offset) throw(ZeroVectorException):
-  normalVector(new Vector(_normalVector)),
-  offset(_offset)
-{
-  if(normalVector->IsZero())
-    throw ZeroVectorException() << LinearAlgebraVector(&(*normalVector));
-  double factor = 1/normalVector->Norm();
-  // normalize the plane parameters
-  (*normalVector)*=factor;
-  offset*=factor;
-}
-
-Plane::Plane(const Vector &_normalVector, const Vector &_offsetVector) throw(ZeroVectorException):
-    normalVector(new Vector(_normalVector))
-{
-  if(normalVector->IsZero()){
-    throw ZeroVectorException() << LinearAlgebraVector(&(*normalVector));
-  }
-  normalVector->Normalize();
-  offset = normalVector->ScalarProduct(_offsetVector);
-}
-
-/**
- * copy constructor
- */
-Plane::Plane(const Plane& plane) :
-  normalVector(new Vector(*plane.normalVector)),
-  offset(plane.offset)
-{}
-
-
-Plane::~Plane()
-{}
-
-Plane &Plane::operator=(const Plane &rhs){
-  if(&rhs!=this){
-    normalVector.reset(new Vector(*rhs.normalVector));
-    offset = rhs.offset;
-  }
-  return *this;
-}
-
-
-Vector Plane::getNormal() const{
-  return *normalVector;
-}
-
-double Plane::getOffset() const{
-  return offset;
-}
-
-Vector Plane::getOffsetVector() const {
-  return getOffset()*getNormal();
-}
-
-vector<Vector> Plane::getPointsOnPlane() const{
-  std::vector<Vector> res;
-  res.reserve(3);
-  // first point on the plane
-  res.push_back(getOffsetVector());
-  // get a vector that has direction of plane
-  Vector direction;
-  direction.GetOneNormalVector(getNormal());
-  res.push_back(res[0]+direction);
-  // get an orthogonal vector to direction and normal (has direction of plane)
-  direction.VectorProduct(getNormal());
-  direction.Normalize();
-  res.push_back(res[0] +direction);
-  return res;
-}
-
-
-/** Calculates the intersection point between a line defined by \a *LineVector and \a *LineVector2 and a plane defined by \a *Normal and \a *PlaneOffset.
- * According to [Bronstein] the vectorial plane equation is:
- *   -# \f$\stackrel{r}{\rightarrow} \cdot \stackrel{N}{\rightarrow} + D = 0\f$,
- * where \f$\stackrel{r}{\rightarrow}\f$ is the vector to be testet, \f$\stackrel{N}{\rightarrow}\f$ is the plane's normal vector and
- * \f$D = - \stackrel{a}{\rightarrow} \stackrel{N}{\rightarrow}\f$, the offset with respect to origin, if \f$\stackrel{a}{\rightarrow}\f$,
- * is an offset vector onto the plane. The line is parametrized by \f$\stackrel{x}{\rightarrow} + k \stackrel{t}{\rightarrow}\f$, where
- * \f$\stackrel{x}{\rightarrow}\f$ is the offset and \f$\stackrel{t}{\rightarrow}\f$ the directional vector (NOTE: No need to normalize
- * the latter). Inserting the parametrized form into the plane equation and solving for \f$k\f$, which we insert then into the parametrization
- * of the line yields the intersection point on the plane.
- * \param *Origin first vector of line
- * \param *LineVector second vector of line
- * \return true -  \a this contains intersection point on return, false - line is parallel to plane (even if in-plane)
- */
-Vector Plane::GetIntersection(const Line& line) const
-{
-  Info FunctionInfo(__func__);
-  Vector res;
-
-  res = getNormal();
-  const Vector direction = line.getDirection();
-  double factor1 = res.ScalarProduct(direction);
-  if(fabs(factor1) <= LINALG_MYEPSILON()){
-    // the plane is parallel... under all circumstances this is bad luck
-    // we no have either no or infinite solutions
-    if(isContained(line.getOrigin())){
-      const Vector origin = line.getOrigin();
-      throw MultipleSolutionsException() << LinearAlgebraVector(&origin);
-    }
-    else{
-      throw LinearDependenceException() << LinearAlgebraVectorPair( make_pair(&res,  &direction) );
-    }
-  }
-
-  double factor2 = getNormal().ScalarProduct(line.getOrigin());
-  double scaleFactor = (offset-factor2)/factor1;
-
-  res = line.getOrigin() + scaleFactor * line.getDirection();
-
-  // tests to make sure the resulting vector really is on plane and line
-  ASSERT(isContained(res),"Calculated line-Plane intersection does not lie on plane.");
-  ASSERT(line.isContained(res),"Calculated line-Plane intersection does not lie on line.");
-  return res;
-};
-
-Vector Plane::mirrorVector(const Vector &rhs) const {
-  Vector helper = getVectorToPoint(rhs);
-  // substract twice the Vector to the plane
-  return rhs+2*helper;
-}
-
-Line Plane::getOrthogonalLine(const Vector &origin) const{
-  return Line(origin,getNormal());
-}
-
-bool Plane::onSameSide(const Vector &point1,const Vector &point2) const{
-  return sign(point1.ScalarProduct(*normalVector)-offset) ==
-         sign(point2.ScalarProduct(*normalVector)-offset);
-}
-
-/************ Methods inherited from Space ****************/
-
-double Plane::distance(const Vector &point) const{
-  double res = point.ScalarProduct(*normalVector)-offset;
-  return fabs(res);
-}
-
-Vector Plane::getClosestPoint(const Vector &point) const{
-  double factor = point.ScalarProduct(*normalVector)-offset;
-  if(fabs(factor) <= LINALG_MYEPSILON()){
-    // the point itself lies on the plane
-    return point;
-  }
-  Vector difference = factor * (*normalVector);
-  return (point - difference);
-}
-
-// Operators
-
-bool operator==(const Plane &x,const Plane &y){
-  return *x.normalVector == *y.normalVector && x.offset == y.offset;
-}
-
-ostream &operator << (ostream &ost,const Plane &p){
-  ost << "<" << p.getNormal() << ";x> - " << p.getOffset() << "=0";
-  return ost;
-}
Index: src/LinearAlgebra/Plane.hpp
===================================================================
--- src/LinearAlgebra/Plane.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,93 +1,0 @@
-/*
- * Plane.hpp
- *
- *  Created on: Apr 7, 2010
- *      Author: crueger
- */
-
-#ifndef PLANE_HPP_
-#define PLANE_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <memory>
-#include <vector>
-#include <iosfwd>
-
-#include "LinearAlgebra/Exceptions.hpp"
-#include "LinearAlgebra/Space.hpp"
-
-class Vector;
-class Line;
-
-class Plane : public Space
-{
-  friend bool operator==(const Plane&,const Plane&);
-  typedef std::auto_ptr<Vector> vec_ptr;
-public:
-  Plane(const Vector &y1, const Vector &y2, const Vector &y3) throw(LinearDependenceException);
-  Plane(const Vector &y1, const Vector &y2, double _offset) throw(ZeroVectorException,LinearDependenceException);
-  Plane(const Vector &_normalVector, double _offset)  throw(ZeroVectorException);
-  Plane(const Vector &_normalVector, const Vector &_offsetVector) throw(ZeroVectorException);
-  Plane(const Plane& plane);
-  virtual ~Plane();
-
-  Plane &operator=(const Plane&);
-
-  // Accessor Functions
-  /**
-   * returns normal Vector for a plane
-   */
-  Vector getNormal() const;
-  /**
-   * returns the distance of the plane from the origin
-   */
-  double getOffset() const;
-  /**
-   * returns a vector that points on the plane.
-   * Same as getOffset()*getNormal();
-   */
-  Vector getOffsetVector() const;
-
-  /**
-   * returns three seperate points on this plane
-   */
-  std::vector<Vector> getPointsOnPlane() const;
-
-  // some calculations
-  Vector GetIntersection(const Line &Line) const;
-
-  Vector mirrorVector(const Vector &rhs) const;
-
-  /**
-   * get a Line that is orthogonal to this plane, going through a chosen
-   * point.
-   *
-   * The point does not have to lie on the plane itself.
-   */
-  Line getOrthogonalLine(const Vector &origin) const;
-
-  /**
-   * Test if two points are on the same side of the plane
-   */
-  bool onSameSide(const Vector&,const Vector&) const;
-
-  /****** Methods inherited from Space ***********/
-
-  virtual double distance(const Vector &point) const;
-  virtual Vector getClosestPoint(const Vector &point) const;
-
-private:
-  vec_ptr normalVector;
-  double offset;
-};
-
-bool operator==(const Plane&,const Plane&);
-
-std::ostream &operator<< (std::ostream &ost,const Plane& p);
-
-#endif /* PLANE_HPP_ */
Index: src/LinearAlgebra/RealSpaceMatrix.cpp
===================================================================
--- src/LinearAlgebra/RealSpaceMatrix.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,353 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * RealSpaceMatrix.cpp
- *
- *  Created on: Jun 25, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Assert.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Exceptions.hpp"
-#include "LinearAlgebra/fast_functions.hpp"
-#include "LinearAlgebra/MatrixContent.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "LinearAlgebra/Vector.hpp"
-#include "LinearAlgebra/VectorContent.hpp"
-
-#include <gsl/gsl_blas.h>
-#include <gsl/gsl_eigen.h>
-#include <gsl/gsl_matrix.h>
-#include <gsl/gsl_multimin.h>
-#include <gsl/gsl_vector.h>
-#include <cmath>
-#include <iostream>
-#include <limits>
-
-using namespace std;
-
-RealSpaceMatrix::RealSpaceMatrix()
-{
-  content = new MatrixContent(NDIM, NDIM);
-  createViews();
-}
-
-RealSpaceMatrix::RealSpaceMatrix(const double* src)
-{
-  content = new MatrixContent(NDIM, NDIM, src);
-  createViews();
-}
-
-RealSpaceMatrix::RealSpaceMatrix(const RealSpaceMatrix &src)
-{
-  content = new MatrixContent(src.content);
-  createViews();
-}
-
-RealSpaceMatrix::RealSpaceMatrix(const MatrixContent &src)
-{
-  content = new MatrixContent(src);
-  createViews();
-}
-
-RealSpaceMatrix::RealSpaceMatrix(MatrixContent* _content)
-{
-  content = new MatrixContent(_content);
-  createViews();
-}
-
-RealSpaceMatrix::~RealSpaceMatrix()
-{
-  // delete all views
-  for(int i=NDIM;i--;){
-    delete rows_ptr[i];
-  }
-  for(int i=NDIM;i--;){
-    delete columns_ptr[i];
-  }
-  delete diagonal_ptr;
-  delete content;
-}
-
-void RealSpaceMatrix::createViews(){
-  // create row views
-  for(int i=NDIM;i--;){
-    VectorContent *rowContent = content->getRowVector(i);
-    rows_ptr[i] = new Vector(rowContent);
-    ASSERT(rowContent == NULL, "RealSpaceMatrix::createViews() - rowContent was not taken over as supposed to happen!");
-  }
-  // create column views
-  for(int i=NDIM;i--;){
-    VectorContent *columnContent = content->getColumnVector(i);
-    columns_ptr[i] = new Vector(columnContent);
-    ASSERT(columnContent == NULL, "RealSpaceMatrix::createViews() - columnContent was not taken over as supposed to happen!");
-  }
-  // create diagonal view
-  VectorContent *diagonalContent = content->getDiagonalVector();
-  diagonal_ptr = new Vector(diagonalContent);
-  ASSERT(diagonalContent == NULL, "RealSpaceMatrix::createViews() - diagonalContent was not taken over as supposed to happen!");
-}
-
-void RealSpaceMatrix::setIdentity(){
-  content->setIdentity();
-}
-
-void RealSpaceMatrix::setZero(){
-  content->setZero();
-}
-
-void RealSpaceMatrix::setRotation(const double x, const double y, const double z)
-{
-  set(0,0, cos(y)*cos(z));
-  set(0,1, cos(z)*sin(x)*sin(y) - cos(x)*sin(z));
-  set(0,2, cos(x)*cos(z)*sin(y) + sin(x) * sin(z));
-  set(1,0, cos(y)*sin(z));
-  set(1,1, cos(x)*cos(z) + sin(x)*sin(y)*sin(z));
-  set(1,2, -cos(z)*sin(x) + cos(x)*sin(y)*sin(z));
-  set(2,0, -sin(y));
-  set(2,1, cos(y)*sin(x));
-  set(2,2, cos(x)*cos(y));
-//  double phi[NDIM];
-//  phi[0] = x;
-//  phi[0] = y;
-//  phi[0] = z;
-//  setRotation(phi);
-}
-
-void RealSpaceMatrix::setRotation(const double phi[NDIM])
-{
-  setRotation(phi[0], phi[1], phi[2]);
-//  set(0,0,  cos(phi[0])            *cos(phi[2]) + (sin(phi[0])*sin(phi[1])*sin(phi[2])));
-//  set(0,1,  sin(phi[0])            *cos(phi[2]) - (cos(phi[0])*sin(phi[1])*sin(phi[2])));
-//  set(0,2,              cos(phi[1])*sin(phi[2])                                        );
-//  set(1,0, -sin(phi[0])*cos(phi[1])                                                    );
-//  set(1,1,  cos(phi[0])*cos(phi[1])                                                    );
-//  set(1,2,              sin(phi[1])                                                    );
-//  set(2,0, -cos(phi[0])            *sin(phi[2]) + (sin(phi[0])*sin(phi[1])*cos(phi[2])));
-//  set(2,1, -sin(phi[0])            *sin(phi[2]) - (cos(phi[0])*sin(phi[1])*cos(phi[2])));
-//  set(2,2,              cos(phi[1])*cos(phi[2])                                        );
-}
-
-RealSpaceMatrix &RealSpaceMatrix::operator=(const RealSpaceMatrix &src)
-{
-  // MatrixContent checks for self-assignment
-  *content = *(src.content);
-  return *this;
-}
-
-const RealSpaceMatrix &RealSpaceMatrix::operator+=(const RealSpaceMatrix &rhs)
-{
-  *content += *(rhs.content);
-  return *this;
-}
-
-const RealSpaceMatrix &RealSpaceMatrix::operator-=(const RealSpaceMatrix &rhs)
-{
-  *content -= *(rhs.content);
-  return *this;
-}
-
-const RealSpaceMatrix &RealSpaceMatrix::operator*=(const RealSpaceMatrix &rhs)
-{
-  (*content) *= (*rhs.content);
-  return *this;
-}
-
-const RealSpaceMatrix RealSpaceMatrix::operator+(const RealSpaceMatrix &rhs) const
-{
-  RealSpaceMatrix tmp = *this;
-  tmp+=rhs;
-  return tmp;
-}
-
-const RealSpaceMatrix RealSpaceMatrix::operator-(const RealSpaceMatrix &rhs) const
-{
-  RealSpaceMatrix tmp = *this;
-  tmp-=rhs;
-  return tmp;
-}
-
-const RealSpaceMatrix RealSpaceMatrix::operator*(const RealSpaceMatrix &rhs) const
-{
-  RealSpaceMatrix tmp(content);
-  tmp *= rhs;
-  return tmp;
-}
-
-double &RealSpaceMatrix::at(size_t i, size_t j)
-{
-  return content->at(i,j);
-}
-
-const double RealSpaceMatrix::at(size_t i, size_t j) const
-{
-  return content->at(i,j);
-}
-
-Vector &RealSpaceMatrix::row(size_t i)
-{
-  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
-  return *rows_ptr[i];
-}
-
-const Vector &RealSpaceMatrix::row(size_t i) const
-{
-  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
-  return *rows_ptr[i];
-}
-
-Vector &RealSpaceMatrix::column(size_t i)
-{
-  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
-  return *columns_ptr[i];
-}
-
-const Vector &RealSpaceMatrix::column(size_t i) const
-{
-  ASSERT(i>=0&&i<NDIM,"Index i for Matrix access out of range");
-  return *columns_ptr[i];
-}
-
-Vector &RealSpaceMatrix::diagonal()
-{
-  return *diagonal_ptr;
-}
-
-const Vector &RealSpaceMatrix::diagonal() const
-{
-  return *diagonal_ptr;
-}
-
-void RealSpaceMatrix::set(size_t i, size_t j, const double value)
-{
-  content->set(i,j, value);
-}
-
-double RealSpaceMatrix::determinant() const{
-  return at(0,0)*at(1,1)*at(2,2)
-       + at(0,1)*at(1,2)*at(2,0)
-       + at(0,2)*at(1,0)*at(2,1)
-       - at(2,0)*at(1,1)*at(0,2)
-       - at(2,1)*at(1,2)*at(0,0)
-       - at(2,2)*at(1,0)*at(0,1);
-}
-
-
-RealSpaceMatrix RealSpaceMatrix::invert() const{
-  double det = determinant();
-  if(fabs(det) <= LINALG_MYEPSILON()){
-    throw NotInvertibleException() << LinearAlgebraDeterminant(det) << LinearAlgebraMatrixContent(this->content);
-  }
-
-  double detReci = 1./det;
-  RealSpaceMatrix res;
-  res.set(0,0,  detReci*RDET2(at(1,1),at(2,1),at(1,2),at(2,2)));    // A_11
-  res.set(1,0, -detReci*RDET2(at(1,0),at(2,0),at(1,2),at(2,2)));    // A_21
-  res.set(2,0,  detReci*RDET2(at(1,0),at(2,0),at(1,1),at(2,1)));    // A_31
-  res.set(0,1, -detReci*RDET2(at(0,1),at(2,1),at(0,2),at(2,2)));    // A_12
-  res.set(1,1,  detReci*RDET2(at(0,0),at(2,0),at(0,2),at(2,2)));    // A_22
-  res.set(2,1, -detReci*RDET2(at(0,0),at(2,0),at(0,1),at(2,1)));    // A_32
-  res.set(0,2,  detReci*RDET2(at(0,1),at(1,1),at(0,2),at(1,2)));    // A_13
-  res.set(1,2, -detReci*RDET2(at(0,0),at(1,0),at(0,2),at(1,2)));    // A_23
-  res.set(2,2,  detReci*RDET2(at(0,0),at(1,0),at(0,1),at(1,1)));    // A_33
-  return res;
-}
-
-RealSpaceMatrix RealSpaceMatrix::transpose() const
-{
-  RealSpaceMatrix res = RealSpaceMatrix(const_cast<const MatrixContent *>(content)->transpose());
-  return res;
-}
-
-RealSpaceMatrix &RealSpaceMatrix::transpose()
-{
-  content->transpose();
-  return *this;
-}
-
-Vector RealSpaceMatrix::transformToEigenbasis()
-{
-  gsl_vector *eval = content->transformToEigenbasis();
-  Vector evalues(gsl_vector_get(eval,0), gsl_vector_get(eval,1), gsl_vector_get(eval,2));
-  gsl_vector_free(eval);
-  return evalues;
-}
-
-const RealSpaceMatrix &RealSpaceMatrix::operator*=(const double factor)
-    {
-  *content *= factor;
-  return *this;
-}
-
-const RealSpaceMatrix operator*(const double factor,const RealSpaceMatrix& mat)
-{
-  RealSpaceMatrix tmp = mat;
-  return tmp *= factor;
-}
-
-const RealSpaceMatrix operator*(const RealSpaceMatrix &mat,const double factor)
-{
-  return factor*mat;
-}
-
-bool RealSpaceMatrix::operator==(const RealSpaceMatrix &rhs) const
-{
-  return (*content == *(rhs.content));
-}
-
-/** Blows the 6-dimensional \a cell_size array up to a full NDIM by NDIM matrix.
- * \param *symm 6-dim array of unique symmetric matrix components
- * \return allocated NDIM*NDIM array with the symmetric matrix
- */
-RealSpaceMatrix ReturnFullMatrixforSymmetric(const double * const symm)
-{
-  RealSpaceMatrix matrix;
-  matrix.set(0,0, symm[0]);
-  matrix.set(1,0, symm[1]);
-  matrix.set(2,0, symm[3]);
-  matrix.set(0,1, symm[1]);
-  matrix.set(1,1, symm[2]);
-  matrix.set(2,1, symm[4]);
-  matrix.set(0,2, symm[3]);
-  matrix.set(1,2, symm[4]);
-  matrix.set(2,2, symm[5]);
-  return matrix;
-};
-
-ostream &operator<<(ostream &ost,const RealSpaceMatrix &mat)
-{
-  for(int i = 0;i<NDIM;++i){
-    ost << "\n";
-    for(int j = 0; j<NDIM;++j){
-      ost << mat.at(i,j);
-      if(j!=NDIM-1)
-        ost << "; ";
-    }
-  }
-  return ost;
-}
-
-Vector operator*(const RealSpaceMatrix &mat,const Vector &vec)
-{
-  return (*mat.content) * vec;
-}
-
-Vector &operator*=(Vector& lhs,const RealSpaceMatrix &mat)
-{
-  lhs = mat*lhs;
-  return lhs;
-}
-
Index: src/LinearAlgebra/RealSpaceMatrix.hpp
===================================================================
--- src/LinearAlgebra/RealSpaceMatrix.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,191 +1,0 @@
-/*
- * RealSpaceMatrix.hpp
- *
- *  Created on: Jun 25, 2010
- *      Author: crueger
- */
-
-#ifndef REALSPACEMATRIX_HPP_
-#define REALSPACEMATRIX_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <iosfwd>
-
-#include "LinearAlgebra/defs.hpp"
-
-
-/**
- * Simple class to store matrices with a few extra functions
- */
-
-class Vector;
-class MatrixContent;
-
-/** 3x3 Matrix class.
- * This class has some specific features for 3D space such as rotations or
- * hard-coded determinants.
- */
-class RealSpaceMatrix
-{
-  friend Vector operator*(const RealSpaceMatrix&,const Vector&);
-public:
-  RealSpaceMatrix();
-
-  /**
-   * construct a matrix from a 3x3 double array that contains all Elements.
-   *
-   * The elements are laid out in the following way:
-   * array -> matrix
-   * 0 -> (0,0)
-   * 1 -> (1,0)
-   * 2 -> (2,0)
-   * 3 -> (0,1)
-   * 4 -> (1,1)
-   * 5 -> (2,1)
-   * 6 -> (0,2)
-   * 7 -> (1,2)
-   * 8 -> (2,2)
-   *
-   */
-  RealSpaceMatrix(const double*);
-  RealSpaceMatrix(const RealSpaceMatrix&);
-  RealSpaceMatrix(const MatrixContent&);
-  virtual ~RealSpaceMatrix();
-
-  /**
-   * Set the matrix to a unit matrix.
-   */
-  void setIdentity();
-
-  /**
-   * Set all matrix entries to zero.
-   */
-  void setZero();
-
-  /**
-   * Sets all matrix corresponding to a rotation matrix,
-   * first around the x-, then the y-, finally the z-axis
-   * with given angles.
-   */
-  void setRotation(const double x, const double y, const double z);
-
-  /**
-   * Sets all matrix corresponding to a rotation matrix,
-   * first around the x-, then the y-, finally the z-axis
-   * with given angles.
-   */
-  void setRotation(const double phi[NDIM]);
-  /**
-   * Access the matrix at index (i,j)
-   */
-  double &at(size_t i, size_t j);
-  /**
-   * Access the matrix at index (i,j)
-   */
-  const double at(size_t i, size_t j) const;
-
-  /**
-   * Set the matrix at index (i,j).
-   *
-   * Slightly faster than at(i,j)=x
-   */
-  void set(size_t i, size_t j, const double value);
-
-  /**
-   * get the ith row of the matrix as a vector
-   */
-  Vector &row(size_t);
-  const Vector &row(size_t) const;
-
-  /**
-   * get the ith column of the matrix as a vector
-   */
-  Vector &column(size_t);
-  const Vector &column(size_t) const;
-
-  /**
-   * get the diagonal of the matrix as a vector
-   */
-  Vector &diagonal();
-  const Vector &diagonal() const;
-
-  /**
-   * Calculate the determinant of the matrix
-   */
-  double determinant() const;
-
-  /**
-   * Calculate the inverse of the matrix.
-   *
-   * Rather costly, so use precomputation as often as possible.
-   */
-  RealSpaceMatrix invert() const;
-
-  /**
-   * Diagonalizes a matrix and sets its rows to the resulting eigenvalues.
-   * The eigenvalues are returned as a vector.
-   *
-   * Rather costly, so use precomputation as often as possible.
-   */
-  Vector transformToEigenbasis();
-
-  /**
-   * Calculate the transpose of the matrix.
-   */
-  RealSpaceMatrix transpose() const;
-  RealSpaceMatrix &transpose();
-
-  // operators
-  RealSpaceMatrix &operator=(const RealSpaceMatrix&);
-
-  const RealSpaceMatrix &operator+=(const RealSpaceMatrix&);
-  const RealSpaceMatrix &operator-=(const RealSpaceMatrix&);
-  const RealSpaceMatrix &operator*=(const RealSpaceMatrix&);
-
-  const RealSpaceMatrix &operator*=(const double);
-
-  const RealSpaceMatrix operator+(const RealSpaceMatrix&) const;
-  const RealSpaceMatrix operator-(const RealSpaceMatrix&) const;
-  const RealSpaceMatrix operator*(const RealSpaceMatrix&) const;
-
-  bool operator==(const RealSpaceMatrix&) const;
-
-private:
-  RealSpaceMatrix(MatrixContent*);
-  void createViews();
-  MatrixContent *content;
-  // we keep around some Vector views of the matrix, to return references
-  Vector* rows_ptr[NDIM];
-  Vector* columns_ptr[NDIM];
-  Vector* diagonal_ptr;
-};
-
-const RealSpaceMatrix operator*(const double,const RealSpaceMatrix&);
-const RealSpaceMatrix operator*(const RealSpaceMatrix&,const double);
-
-/**
- * Takes a symmetric matrix that stores the lower diagonal and produces a
- * full matrix.
- *
- * The array is laid out as follows:
- *
- * array -> matrix
- * 0 -> (0,0)
- * 1 -> (1,0);(0,1)
- * 2 -> (1,1)
- * 3 -> (2,0);(0,2)
- * 4 -> (2,1);(1,2)
- * 5 -> (2,2)
- */
-RealSpaceMatrix ReturnFullMatrixforSymmetric(const double * const cell_size);
-
-std::ostream &operator<<(std::ostream&,const RealSpaceMatrix&);
-Vector operator*(const RealSpaceMatrix&,const Vector&);
-Vector& operator*=(Vector&,const RealSpaceMatrix&);
-
-#endif /* REALSPACEMATRIX_HPP_ */
Index: src/LinearAlgebra/Space.cpp
===================================================================
--- src/LinearAlgebra/Space.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * Space.cpp
- *
- *  Created on: Apr 30, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include <limits>
-
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Space.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-Space::Space()
-{}
-
-Space::~Space()
-{}
-
-bool Space::hasZero() const{
-  return isContained(zeroVec);
-}
-
-Vector Space::getVectorToPoint(const Vector &origin) const{
-  Vector support = getClosestPoint(origin);
-  return support-origin;
-}
-
-bool Space::isContained(const Vector &point) const{
-  return (distance(point)) <= LINALG_MYEPSILON();
-}
Index: src/LinearAlgebra/Space.hpp
===================================================================
--- src/LinearAlgebra/Space.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * Space.hpp
- *
- *  Created on: Apr 30, 2010
- *      Author: crueger
- */
-
-#ifndef SPACE_HPP_
-#define SPACE_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-class Vector;
-
-class Space
-{
-public:
-  Space();
-  virtual ~Space();
-
-  /**
-   * Calculates the distance between a Space and a Vector.
-   */
-  virtual double distance(const Vector &point) const=0;
-
-  /**
-   * get the closest point inside the space to another point
-   */
-  virtual Vector getClosestPoint(const Vector &point) const=0;
-
-  /**
-   * get the shortest Vector from a point to a Space.
-   *
-   * The Vector always points from the given Vector to the point in space
-   * returned by Plane::getClosestPoint().
-   */
-  virtual Vector getVectorToPoint(const Vector &point) const;
-
-  /**
-   * Test wether a point is contained in the space.
-   *
-   * returns true, when the point lies inside and false
-   * otherwise.
-   */
-  virtual bool isContained(const Vector &point) const;
-
-  /**
-   * Tests if this space contains the center of the coordinate system.
-   */
-  virtual bool hasZero() const;
-
-};
-
-#endif /* SPACE_HPP_ */
Index: src/LinearAlgebra/Vector.cpp
===================================================================
--- src/LinearAlgebra/Vector.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,601 +1,0 @@
-/*
- * 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.
- */
-
-/** \file vector.cpp
- *
- * Function implementations for the class vector.
- *
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Assert.hpp"
-#include "CodePatterns/Verbose.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/fast_functions.hpp"
-#include "LinearAlgebra/Vector.hpp"
-#include "LinearAlgebra/VectorContent.hpp"
-
-#include <cmath>
-#include <iostream>
-#include <cmath>
-#include <gsl/gsl_blas.h>
-#include <gsl/gsl_vector.h>
-
-
-using namespace std;
-
-
-/************************************ Functions for class vector ************************************/
-
-/** Constructor of class vector.
- */
-Vector::Vector()
-{
-  content = new VectorContent((size_t) NDIM);
-};
-
-/** Copy constructor.
- * \param &src source Vector reference
- */
-Vector::Vector(const Vector& src)
-{
-  content = new VectorContent(*(src.content));
-}
-
-/** Constructor of class vector.
- * \param x1 first component
- * \param x2 second component
- * \param x3 third component
- */
-Vector::Vector(const double x1, const double x2, const double x3)
-{
-  content = new VectorContent((size_t) NDIM);
-  content->at(0) = x1;
-  content->at(1) = x2;
-  content->at(2) = x3;
-};
-
-/** Constructor of class vector.
- * \param x[3] three values to initialize Vector with
- */
-Vector::Vector(const double x[3])
-{
-  content = new VectorContent((size_t) NDIM);
-  for (size_t i = NDIM; i--; )
-    content->at(i) = x[i];
-};
-
-/** Copy constructor of class vector from VectorContent.
- * \note This is destructive, i.e. we take over _content.
- */
-Vector::Vector(VectorContent *&_content) :
-    content(_content)
-{
-  _content = NULL;
-}
-
-/** Copy constructor of class vector from VectorContent.
- * \note This is non-destructive, i.e. _content is copied.
- */
-Vector::Vector(VectorContent &_content)
-{
-  content = new VectorContent(_content);
-}
-
-/** Assignment operator.
- * \param &src source vector to assign \a *this to
- * \return reference to \a *this
- */
-Vector& Vector::operator=(const Vector& src){
-  // check for self assignment
-  if(&src!=this){
-    *content = *(src.content);
-  }
-  return *this;
-}
-
-/** Desctructor of class vector.
- * Vector::content is deleted.
- */
-Vector::~Vector() {
-  delete content;
-};
-
-/** Calculates square of distance between this and another vector.
- * \param *y array to second vector
- * \return \f$| x - y |^2\f$
- */
-double Vector::DistanceSquared(const Vector &y) const
-{
-  double res = 0.;
-  for (int i=NDIM;i--;)
-    res += (at(i)-y[i])*(at(i)-y[i]);
-  return (res);
-};
-
-/** Calculates distance between this and another vector.
- * \param *y array to second vector
- * \return \f$| x - y |\f$
- */
-double Vector::distance(const Vector &y) const
-{
-  return (sqrt(DistanceSquared(y)));
-};
-
-size_t Vector::GreatestComponent() const
-{
-  int greatest = 0;
-  for (int i=1;i<NDIM;i++) {
-    if (at(i) > at(greatest))
-      greatest = i;
-  }
-  return greatest;
-}
-
-size_t Vector::SmallestComponent() const
-{
-  int smallest = 0;
-  for (int i=1;i<NDIM;i++) {
-    if (at(i) < at(smallest))
-      smallest = i;
-  }
-  return smallest;
-}
-
-
-Vector Vector::getClosestPoint(const Vector &point) const{
-  // the closest point to a single point space is always the single point itself
-  return *this;
-}
-
-/** Calculates scalar product between this and another vector.
- * \param *y array to second vector
- * \return \f$\langle x, y \rangle\f$
- */
-double Vector::ScalarProduct(const Vector &y) const
-{
-  double res = 0.;
-  gsl_blas_ddot(content->content, y.content->content, &res);
-  return (res);
-};
-
-
-/** Calculates VectorProduct between this and another vector.
- *  -# returns the Product in place of vector from which it was initiated
- *  -# ATTENTION: Only three dim.
- *  \param *y array to vector with which to calculate crossproduct
- *  \return \f$ x \times y \f&
- */
-void Vector::VectorProduct(const Vector &y)
-{
-  Vector tmp;
-  for(int i=NDIM;i--;)
-    tmp[i] = at((i+1)%NDIM)*y[(i+2)%NDIM] - at((i+2)%NDIM)*y[(i+1)%NDIM];
-  (*this) = tmp;
-};
-
-
-/** projects this vector onto plane defined by \a *y.
- * \param *y normal vector of plane
- * \return \f$\langle x, y \rangle\f$
- */
-void Vector::ProjectOntoPlane(const Vector &y)
-{
-  Vector tmp;
-  tmp = y;
-  tmp.Normalize();
-  tmp.Scale(ScalarProduct(tmp));
-  *this -= tmp;
-};
-
-/** Calculates the minimum distance of this vector to the plane.
- * \sa Vector::GetDistanceVectorToPlane()
- * \param *out output stream for debugging
- * \param *PlaneNormal normal of plane
- * \param *PlaneOffset offset of plane
- * \return distance to plane
- */
-double Vector::DistanceToSpace(const Space &space) const
-{
-  return space.distance(*this);
-};
-
-/** Calculates the projection of a vector onto another \a *y.
- * \param *y array to second vector
- */
-void Vector::ProjectIt(const Vector &y)
-{
-  (*this) += (-ScalarProduct(y))*y;
-};
-
-/** Calculates the projection of a vector onto another \a *y.
- * \param *y array to second vector
- * \return Vector
- */
-Vector Vector::Projection(const Vector &y) const
-{
-  Vector helper = y;
-  helper.Scale((ScalarProduct(y)/y.NormSquared()));
-
-  return helper;
-};
-
-/** Calculates norm of this vector.
- * \return \f$|x|\f$
- */
-double Vector::Norm() const
-{
-  return (content->Norm());
-};
-
-/** Calculates squared norm of this vector.
- * \return \f$|x|^2\f$
- */
-double Vector::NormSquared() const
-{
-  return (content->NormSquared());
-};
-
-/** Normalizes this vector.
- */
-void Vector::Normalize()
-{
-  content->Normalize();
-};
-
-Vector Vector::getNormalized() const{
-  Vector res= *this;
-  res.Normalize();
-  return res;
-}
-
-/** Zeros all components of this vector.
- */
-void Vector::Zero()
-{
-  at(0)=at(1)=at(2)=0;
-};
-
-/** Zeros all components of this vector.
- */
-void Vector::One(const double one)
-{
-  at(0)=at(1)=at(2)=one;
-};
-
-/** Checks whether vector has all components zero.
- * @return true - vector is zero, false - vector is not
- */
-bool Vector::IsZero() const
-{
-  return (fabs(at(0))+fabs(at(1))+fabs(at(2)) < LINALG_MYEPSILON());
-};
-
-/** Checks whether vector has length of 1.
- * @return true - vector is normalized, false - vector is not
- */
-bool Vector::IsOne() const
-{
-  return (fabs(Norm() - 1.) < LINALG_MYEPSILON());
-};
-
-/** Checks whether vector is normal to \a *normal.
- * @return true - vector is normalized, false - vector is not
- */
-bool Vector::IsNormalTo(const Vector &normal) const
-{
-  if (ScalarProduct(normal) < LINALG_MYEPSILON())
-    return true;
-  else
-    return false;
-};
-
-/** Checks whether vector is normal to \a *normal.
- * @return true - vector is normalized, false - vector is not
- */
-bool Vector::IsEqualTo(const Vector &a) const
-{
-  bool status = true;
-  for (int i=0;i<NDIM;i++) {
-    if (fabs(at(i) - a[i]) > LINALG_MYEPSILON())
-      status = false;
-  }
-  return status;
-};
-
-/** Calculates the angle between this and another vector.
- * \param *y array to second vector
- * \return \f$\acos\bigl(frac{\langle x, y \rangle}{|x||y|}\bigr)\f$
- */
-double Vector::Angle(const Vector &y) const
-{
-  double norm1 = Norm(), norm2 = y.Norm();
-  double angle = -1;
-  if ((fabs(norm1) > LINALG_MYEPSILON()) && (fabs(norm2) > LINALG_MYEPSILON()))
-    angle = this->ScalarProduct(y)/norm1/norm2;
-  // -1-LINALG_MYEPSILON() occured due to numerical imprecision, catch ...
-  //Log() << Verbose(2) << "INFO: acos(-1) = " << acos(-1) << ", acos(-1+LINALG_MYEPSILON()) = " << acos(-1+LINALG_MYEPSILON()) << ", acos(-1-LINALG_MYEPSILON()) = " << acos(-1-LINALG_MYEPSILON()) << "." << endl;
-  if (angle < -1)
-    angle = -1;
-  if (angle > 1)
-    angle = 1;
-  return acos(angle);
-};
-
-
-double& Vector::operator[](size_t i){
-  ASSERT(i<=NDIM && i>=0,"Vector Index out of Range");
-  return *gsl_vector_ptr (content->content, i);
-}
-
-const double& Vector::operator[](size_t i) const{
-  ASSERT(i<=NDIM && i>=0,"Vector Index out of Range");
-  return *gsl_vector_ptr (content->content, i);
-}
-
-double& Vector::at(size_t i){
-  return (*this)[i];
-}
-
-const double& Vector::at(size_t i) const{
-  return (*this)[i];
-}
-
-VectorContent* Vector::get() const
-{
-  return content;
-}
-
-/** Compares vector \a to vector \a b component-wise.
- * \param a base vector
- * \param b vector components to add
- * \return a == b
- */
-bool Vector::operator==(const Vector& b) const
-{
-  return IsEqualTo(b);
-};
-
-bool Vector::operator!=(const Vector& b) const
-{
-  return !IsEqualTo(b);
-}
-
-/** Sums vector \a to this lhs component-wise.
- * \param a base vector
- * \param b vector components to add
- * \return lhs + a
- */
-const Vector& Vector::operator+=(const Vector& b)
-{
-  this->AddVector(b);
-  return *this;
-};
-
-/** Subtracts vector \a from this lhs component-wise.
- * \param a base vector
- * \param b vector components to add
- * \return lhs - a
- */
-const Vector& Vector::operator-=(const Vector& b)
-{
-  this->SubtractVector(b);
-  return *this;
-};
-
-/** factor each component of \a *this times \a m.
- * \param m factor
- * \return \f$(\text{*this} \cdot m\f$
- */
-const Vector& Vector::operator*=(const double m)
-{
-  Scale(m);
-  return *this;
-};
-
-/** Sums two vectors \a  and \b component-wise.
- * \param a first vector
- * \param b second vector
- * \return a + b
- */
-Vector const Vector::operator+(const Vector& b) const
-{
-  Vector x = *this;
-  x.AddVector(b);
-  return x;
-};
-
-/** Subtracts vector \a from \b component-wise.
- * \param a first vector
- * \param b second vector
- * \return a - b
- */
-Vector const Vector::operator-(const Vector& b) const
-{
-  Vector x = *this;
-  x.SubtractVector(b);
-  return x;
-};
-
-/** Factors given vector \a *this times \a m.
- * \param m factor
- * \return \f$(\text{*this} \cdot m)\f$
- */
-const Vector Vector::operator*(const double m) const
-{
-  Vector x(*this);
-  x.Scale(m);
-  return x;
-};
-
-/** Factors given vector \a a times \a m.
- * \param m factor
- * \param a vector
- * \return m * a
- */
-Vector const operator*(const double m, const Vector& a )
-{
-  Vector x(a);
-  x.Scale(m);
-  return x;
-};
-
-ostream& operator<<(ostream& ost, const Vector& m)
-{
-  ost << "(";
-  for (int i=0;i<NDIM;i++) {
-    ost << m[i];
-    if (i != 2)
-      ost << ",";
-  }
-  ost << ")";
-  return ost;
-};
-
-
-void Vector::ScaleAll(const double *factor)
-{
-  for (int i=NDIM;i--;)
-    at(i) *= factor[i];
-};
-
-void Vector::ScaleAll(const Vector &factor){
-  gsl_vector_mul(content->content, factor.content->content);
-}
-
-
-void Vector::Scale(const double factor)
-{
-  gsl_vector_scale(content->content,factor);
-};
-
-std::pair<Vector,Vector> Vector::partition(const Vector &rhs) const{
-  double factor = ScalarProduct(rhs)/rhs.NormSquared();
-  Vector res= factor * rhs;
-  return make_pair(res,(*this)-res);
-}
-
-std::pair<pointset,Vector> Vector::partition(const pointset &points) const{
-  Vector helper = *this;
-  pointset res;
-  for(pointset::const_iterator iter=points.begin();iter!=points.end();++iter){
-    pair<Vector,Vector> currPart = helper.partition(*iter);
-    res.push_back(currPart.first);
-    helper = currPart.second;
-  }
-  return make_pair(res,helper);
-}
-
-/** Creates this vector as the b y *factors' components scaled linear combination of the given three.
- * this vector = x1*factors[0] + x2* factors[1] + x3*factors[2]
- * \param *x1 first vector
- * \param *x2 second vector
- * \param *x3 third vector
- * \param *factors three-component vector with the factor for each given vector
- */
-void Vector::LinearCombinationOfVectors(const Vector &x1, const Vector &x2, const Vector &x3, const double * const factors)
-{
-  (*this) = (factors[0]*x1) +
-            (factors[1]*x2) +
-            (factors[2]*x3);
-};
-
-/** Calculates orthonormal vector to one given vectors.
- * Just subtracts the projection onto the given vector from this vector.
- * The removed part of the vector is Vector::Projection()
- * \param *x1 vector
- * \return true - success, false - vector is zero
- */
-bool Vector::MakeNormalTo(const Vector &y1)
-{
-  bool result = false;
-  double factor = y1.ScalarProduct(*this)/y1.NormSquared();
-  Vector x1 = factor * y1;
-  SubtractVector(x1);
-  for (int i=NDIM;i--;)
-    result = result || (fabs(at(i)) > LINALG_MYEPSILON());
-
-  return result;
-};
-
-/** Creates this vector as one of the possible orthonormal ones to the given one.
- * Just scan how many components of given *vector are unequal to zero and
- * try to get the skp of both to be zero accordingly.
- * \param *vector given vector
- * \return true - success, false - failure (null vector given)
- */
-bool Vector::GetOneNormalVector(const Vector &GivenVector)
-{
-  int Components[NDIM]; // contains indices of non-zero components
-  int Last = 0;   // count the number of non-zero entries in vector
-  int j;  // loop variables
-  double norm;
-
-  for (j=NDIM;j--;)
-    Components[j] = -1;
-
-  // in two component-systems we need to find the one position that is zero
-  int zeroPos = -1;
-  // find two components != 0
-  for (j=0;j<NDIM;j++){
-    if (fabs(GivenVector[j]) > LINALG_MYEPSILON())
-      Components[Last++] = j;
-    else
-      // this our zero Position
-      zeroPos = j;
-  }
-
-  switch(Last) {
-    case 3:  // threecomponent system
-      // the position of the zero is arbitrary in three component systems
-      zeroPos = Components[2];
-    case 2:  // two component system
-      norm = sqrt(1./(GivenVector[Components[1]]*GivenVector[Components[1]]) + 1./(GivenVector[Components[0]]*GivenVector[Components[0]]));
-      at(zeroPos) = 0.;
-      // in skp both remaining parts shall become zero but with opposite sign and third is zero
-      at(Components[1]) = -1./GivenVector[Components[1]] / norm;
-      at(Components[0]) = 1./GivenVector[Components[0]] / norm;
-      return true;
-      break;
-    case 1: // one component system
-      // set sole non-zero component to 0, and one of the other zero component pendants to 1
-      at((Components[0]+2)%NDIM) = 0.;
-      at((Components[0]+1)%NDIM) = 1.;
-      at(Components[0]) = 0.;
-      return true;
-      break;
-    default:
-      return false;
-  }
-};
-
-/** Adds vector \a *y componentwise.
- * \param *y vector
- */
-void Vector::AddVector(const Vector &y)
-{
-  gsl_vector_add(content->content, y.content->content);
-}
-
-/** Adds vector \a *y componentwise.
- * \param *y vector
- */
-void Vector::SubtractVector(const Vector &y)
-{
-  gsl_vector_sub(content->content, y.content->content);
-}
-
-
-// some comonly used vectors
-const Vector zeroVec(0,0,0);
-const Vector unitVec[NDIM]={Vector(1,0,0),Vector(0,1,0),Vector(0,0,1)};
Index: src/LinearAlgebra/Vector.hpp
===================================================================
--- src/LinearAlgebra/Vector.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,122 +1,0 @@
-#ifndef VECTOR_HPP_
-#define VECTOR_HPP_
-
-using namespace std;
-
-/*********************************************** includes ***********************************/
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <iosfwd>
-
-#include <memory>
-#include <vector>
-
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Space.hpp"
-
-/********************************************** declarations *******************************/
-
-class Vector;
-class RealSpaceMatrix;
-class MatrixContent;
-struct VectorContent;
-
-typedef std::vector<Vector> pointset;
-
-/** Single vector.
- * basically, just a x[3] but with helpful functions
- */
-class Vector : public Space{
-  friend Vector const operator*(const MatrixContent&,const Vector&);
-  friend Vector const operator*(const Vector&,const MatrixContent&);
-  friend class RealSpaceMatrix; // needs access to Vector(VectorContent*&) due to views
-public:
-  Vector();
-  Vector(const double x1, const double x2, const double x3);
-  Vector(const double x[3]);
-  Vector(const Vector& src);
-  virtual ~Vector();
-
-  // Method implemented by forwarding to the Representation
-
-  double DistanceSquared(const Vector &y) const;
-  double DistanceToSpace(const Space& space) const;
-  double ScalarProduct(const Vector &y) const;
-  double Angle(const Vector &y) const;
-  bool IsZero() const;
-  bool IsOne() const;
-  bool IsNormalTo(const Vector &normal) const;
-  bool IsEqualTo(const Vector &a) const;
-
-  void AddVector(const Vector &y);
-  void SubtractVector(const Vector &y);
-  void VectorProduct(const Vector &y);
-  void ProjectOntoPlane(const Vector &y);
-  void ProjectIt(const Vector &y);
-  Vector Projection(const Vector &y) const;
-  void ScaleAll(const double *factor);
-  void ScaleAll(const Vector &factor);
-  void Scale(const double factor);
-  bool GetOneNormalVector(const Vector &x1);
-  bool MakeNormalTo(const Vector &y1);
-  std::pair<Vector,Vector> partition(const Vector&) const;
-  std::pair<pointset,Vector> partition(const pointset&) const;
-  size_t GreatestComponent() const;
-  size_t SmallestComponent() const;
-
-  // Accessors ussually come in pairs... and sometimes even more than that
-  double& operator[](size_t i);
-  const double& operator[](size_t i) const;
-  double& at(size_t i);
-  const double& at(size_t i) const;
-
-  // Assignment operator
-  Vector &operator=(const Vector& src);
-
-  // Access to internal structure
-  VectorContent* get() const;
-
-  // Methods that are derived directly from other methods
-  double Norm() const;
-  double NormSquared() const;
-  void Normalize();
-  Vector getNormalized() const;
-  void Zero();
-  void One(const double one);
-  void LinearCombinationOfVectors(const Vector &x1, const Vector &x2, const Vector &x3, const double * const factors);
-
-  // operators for mathematical operations
-  bool operator==(const Vector& b) const;
-  bool operator!=(const Vector& b) const;
-  const Vector& operator+=(const Vector& b);
-  const Vector& operator-=(const Vector& b);
-  Vector const operator+(const Vector& b) const;
-  Vector const operator-(const Vector& b) const;
-  const Vector& operator*=(const double m);
-  const Vector operator*(const double m) const;
-
-  // Methods inherited from Space
-  virtual double distance(const Vector &point) const;
-  virtual Vector getClosestPoint(const Vector &point) const;
-
-  explicit Vector(VectorContent *&);
-  explicit Vector(VectorContent &_content);
-protected:
-
-private:
-  VectorContent *content;
-
-};
-
-// some commonly used and fixed vectors
-const extern Vector zeroVec;
-const extern Vector unitVec[NDIM];
-
-ostream & operator << (ostream& ost, const Vector &m);
-const Vector operator*(const double m, const Vector& a);
-
-#endif /*VECTOR_HPP_*/
Index: src/LinearAlgebra/VectorContent.cpp
===================================================================
--- src/LinearAlgebra/VectorContent.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,482 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * VectorContent.cpp
- *
- *  Created on: Nov 15, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include <gsl/gsl_blas.h>
-#include <gsl/gsl_vector.h>
-#include <cmath>
-#include <iostream>
-#include <limits>
-
-#include "CodePatterns/Assert.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Vector.hpp"
-#include "LinearAlgebra/VectorContent.hpp"
-
-/** Constructor of class VectorContent.
- * Allocates GSL structures
- * \param _dim number of components
- */
-VectorContent::VectorContent(size_t _dim) :
-    dimension(_dim),
-    free_content_on_exit(true)
-{
-  content = gsl_vector_calloc(dimension);
-}
-
-/** Constructor of class VectorContent.
- * We need this VectorBaseCase for the VectorContentView class.
- * There no content should be allocated, as it is just a view with an internal
- * gsl_vector_view. Hence, VectorBaseCase is just dummy class to give the
- * constructor a unique signature.
- * \param VectorBaseCase
- */
-VectorContent::VectorContent(VectorBaseCase) :
-    free_content_on_exit(false)
-{}
-
-/** Copy constructor of class VectorContent.
- * Allocates GSL structures and copies components from \a *src.
- * \param *src source vector
- */
-VectorContent::VectorContent(const VectorContent * const src) :
-    dimension(src->dimension),
-    free_content_on_exit(true)
-{
-  content = gsl_vector_alloc(dimension);
-  gsl_vector_memcpy (content, src->content);
-};
-
-/** Copy constructor of class VectorContent.
- * Allocates GSL structures and copies components from \a *src.
- * \param *src source vector
- */
-VectorContent::VectorContent(const VectorContent & src) :
-    dimension(src.dimension),
-    free_content_on_exit(true)
-{
-  content = gsl_vector_alloc(dimension);
-  gsl_vector_memcpy (content, src.content);
-};
-
-/** Copy constructor of class VectorContent.
- * No allocation, we just take over gsl_vector.
- * \param *src source gsl_vector
- */
-VectorContent::VectorContent(gsl_vector * _src) :
-  dimension(_src->size),
-  free_content_on_exit(false)
-{
-  content = _src;
-}
-
-/** Destructor of class VectorContent.
- * Frees GSL structures
- */
-VectorContent::~VectorContent()
-{
-  if (free_content_on_exit) {
-    if(content != NULL)
-      gsl_vector_free(content);
-    content = NULL;
-  }
-}
-
-/* ============================ Accessing =============================== */
-/** Accessor for manipulating component (i).
- * \param i component number
- * \return reference to component (i)
- */
-double &VectorContent::at(size_t i)
-{
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
-  return *gsl_vector_ptr (content, i);
-}
-
-/** Constant accessor for (value of) component (i).
- * \param i component number
- * \return const component (i)
- */
-const double VectorContent::at(size_t i) const
-{
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
-  return gsl_vector_get(content, i);
-}
-
-/** These functions return a pointer to the \a m-th element of a vector.
- *  If \a m lies outside the allowed range of 0 to VectorContent::dimension-1 then the error handler is invoked and a null pointer is returned.
- * \param m m-th element
- * \return pointer to \a m-th element
- */
-double *VectorContent::Pointer(size_t m) const
-{
-  return gsl_vector_ptr (content, m);
-};
-
-/** These functions return a constant pointer to the \a m-th element of a vector.
- *  If \a m lies outside the allowed range of 0 to VectorContent::dimension-1 then the error handler is invoked and a null pointer is returned.
- * \param m m-th element
- * \return const pointer to \a m-th element
- */
-const double *VectorContent::const_Pointer(size_t m) const
-{
-  return gsl_vector_const_ptr (content, m);
-};
-
-/** Assignment operator.
- * \param &src source vector to assign \a *this to
- * \return reference to \a *this
- */
-VectorContent& VectorContent::operator=(const VectorContent& src)
-{
-  ASSERT(dimension == src.dimension,
-      "Dimensions have to be the same to assign VectorContent onto another:"
-      +toString(dimension)+" != "+toString(src.dimension)+"!");
-  // check for self assignment
-  if(&src!=this){
-    gsl_vector_memcpy(content, src.content);
-  }
-  return *this;
-}
-
-/* ========================== Initializing =============================== */
-/** This function sets all the elements of the vector to the value \a x.
- * \param x value to set to
- */
-void VectorContent::setValue(double x)
-{
-  gsl_vector_set_all (content, x);
-};
-
-/** This function sets the vector from a double array.
- * Creates a vector view of the array and performs a memcopy.
- * \param *x array of values (no dimension check is performed)
- */
-void VectorContent::setFromDoubleArray(double * x)
-{
-  gsl_vector_view m = gsl_vector_view_array (x, dimension);
-  gsl_vector_memcpy (content, &m.vector);
-};
-
-/**
- * This function sets the GSLvector from an ordinary vector.
- *
- * Takes access to the internal gsl_vector and copies it
- */
-void VectorContent::setFromVector(Vector &v)
-{
-  gsl_vector_memcpy (content, v.get()->content);
-}
-
-/** This function sets all the elements of the vector to zero.
- */
-void VectorContent::setZero()
-{
-  gsl_vector_set_zero (content);
-};
-
-/** This function makes a basis vector by setting all the elements of the vector to zero except for the i-th element which is set to one.
- * \param i i-th component to set to unity (all other to zero)
- * \return vector set
- */
-int VectorContent::setBasis(size_t i)
-{
-  return gsl_vector_set_basis (content, i);
-};
-
-/* ====================== Exchanging elements ============================ */
-/** This function exchanges the \a i-th and \a j-th elements of the vector in-place.
- * \param i i-th element to swap with ...
- * \param j ... j-th element to swap against
- */
-int VectorContent::SwapElements(size_t i, size_t j)
-{
-  return gsl_vector_swap_elements (content, i, j);
-};
-
-/** This function reverses the order of the elements of the vector.
- */
-int VectorContent::Reverse()
-{
-  return gsl_vector_reverse (content);
-};
-
-
-/* ========================== Operators =============================== */
-/** Accessor for manipulating component (i).
- * \param i component number
- * \return reference to component (i)
- */
-double &VectorContent::operator[](size_t i)
-{
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
-  return *gsl_vector_ptr (content, i);
-}
-
-/** Constant accessor for (value of) component (i).
- * \param i component number
- * \return const component (i)
- */
-const double VectorContent::operator[](size_t i) const
-{
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
-  return gsl_vector_get(content, i);
-}
-
-
-/** Compares VectorContent \a to VectorContent \a b component-wise.
- * \param a base VectorContent
- * \param b VectorContent components to add
- * \return a == b
- */
-bool VectorContent::operator==(const VectorContent& b) const
-{
-  bool status = true;
-  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
-  for (size_t i=0;i<dimension;i++)
-    status = status && (fabs(at(i) - b.at(i)) <= LINALG_MYEPSILON());
-  return status;
-};
-
-/** Sums VectorContent \a to this lhs component-wise.
- * \param a base VectorContent
- * \param b VectorContent components to add
- * \return lhs + a
- */
-const VectorContent& VectorContent::operator+=(const VectorContent& b)
-{
-  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
-  for (size_t i=0;i<dimension;i++)
-    at(i) = at(i)+b.at(i);
-  return *this;
-};
-
-/** Subtracts VectorContent \a from this lhs component-wise.
- * \param a base VectorContent
- * \param b VectorContent components to add
- * \return lhs - a
- */
-const VectorContent& VectorContent::operator-=(const VectorContent& b)
-{
-  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
-  for (size_t i=0;i<dimension;i++)
-    at(i) = at(i)-b.at(i);
-  return *this;
-};
-
-/** factor each component of \a a times a double \a m.
- * \param a base VectorContent
- * \param m factor
- * \return lhs.Get(i) * m
- */
-const VectorContent& VectorContent::operator*=(const double m)
-{
-  for (size_t i=0;i<dimension;i++)
-    at(i) = at(i)*m;
-  return *this;
-};
-
-/** Sums two VectorContents \a  and \b component-wise.
- * \param a first VectorContent
- * \param b second VectorContent
- * \return a + b
- */
-VectorContent const operator+(const VectorContent& a, const VectorContent& b)
-{
-  ASSERT(a.dimension == b.dimension, "VectorContent::operator+() - dimensions have to match: "+toString(a.dimension)+" != "+toString(b.dimension)+"!");
-  VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
-    x.at(i) = a.at(i)+b.at(i);
-  return x;
-};
-
-/** Subtracts VectorContent \a from \b component-wise.
- * \param a first VectorContent
- * \param b second VectorContent
- * \return a - b
- */
-VectorContent const operator-(const VectorContent& a, const VectorContent& b)
-{
-  ASSERT(a.dimension == b.dimension, "VectorContent::operator-() - dimensions have to match: "+toString(a.dimension)+" != "+toString(b.dimension)+"!");
-  VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
-    x.at(i) = a.at(i)-b.at(i);
-  return x;
-};
-
-/** Factors given VectorContent \a a times \a m.
- * \param a VectorContent
- * \param m factor
- * \return m * a
- */
-VectorContent const operator*(const VectorContent& a, const double m)
-{
-  VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
-    x.at(i) = a.at(i)*m;
-  return x;
-};
-
-/** Factors given VectorContent \a a times \a m.
- * \param m factor
- * \param a VectorContent
- * \return m * a
- */
-VectorContent const operator*(const double m, const VectorContent& a )
-{
-  VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
-    x.at(i) = a.at(i)*m;
-  return x;
-};
-
-ostream& operator<<(ostream& ost, const VectorContent& m)
-{
-  ost << "[";
-  for (size_t i=0;i<m.dimension;i++) {
-    ost << m.at(i);
-    if (i != m.dimension-1)
-      ost << " ";
-  }
-  ost << "]";
-  return ost;
-};
-
-/* ====================== Checking State ============================ */
-/** Checks whether vector has all components zero.
- * TODO: This might see some numerical instabilities for huge dimension and small number.
- * For stability one should sort the order of summing!
- * @return true - vector is zero, false - vector is not
- */
-bool VectorContent::IsZero() const
-{
-  double result = 0.;
-  for (size_t i = dimension; i--; )
-    result += fabs(at(i));
-  return (result <= LINALG_MYEPSILON());
-};
-
-/** Checks whether vector has length of 1.
- * @return true - vector is normalized, false - vector is not
- */
-bool VectorContent::IsOne() const
-{
-  double NormValue = 0.;
-  for (size_t i=dimension;--i;)
-    NormValue += at(i)*at(i);
-  return (fabs(NormValue - 1.) <= LINALG_MYEPSILON());
-};
-
-/* ========================== Norm =============================== */
-/** Calculates norm of this vector.
- * \return \f$|x|\f$
- */
-double VectorContent::Norm() const
-{
-  return (sqrt(NormSquared()));
-};
-
-/** Calculates squared norm of this vector.
- * \return \f$|x|^2\f$
- */
-double VectorContent::NormSquared() const
-{
-  return (ScalarProduct(*this));
-};
-
-/** Normalizes this vector.
- */
-void VectorContent::Normalize()
-{
-  double factor = Norm();
-  (*this) *= 1/factor;
-};
-
-VectorContent VectorContent::getNormalized() const{
-  VectorContent res= *this;
-  res.Normalize();
-  return res;
-}
-
-/* ======================== Properties ============================= */
-/** Calculates the squared distance to some other vector.
- * @param y other vector
- * @return \f$|(\text{*this})-y|^2\f$
- */
-double VectorContent::DistanceSquared(const VectorContent &y) const
-{
-  double res = 0.;
-  for (int i=dimension;i--;)
-    res += (at(i)-y[i])*(at(i)-y[i]);
-  return (res);
-}
-
-/** Calculates scalar product between \a *this and \a b.
- * @param b other vector
- * @return \f$| (*this) \cdot (b)|^2\f$
- */
-double VectorContent::ScalarProduct(const VectorContent &y) const
-{
-  return ((*this)*y);
-}
-
-/** Calculates the angle between \a *this and \a y.
- *
- * @param y other vector
- * @return \f$\acos\bigl(frac{\langle \text{*this}, y \rangle}{|\text{*this}||y|}\bigr)\f$
- */
-double VectorContent::Angle(const VectorContent &y) const
-{
-  double norm1 = Norm(), norm2 = y.Norm();
-  double angle = -1;
-  if ((fabs(norm1) > LINALG_MYEPSILON()) && (fabs(norm2) > LINALG_MYEPSILON()))
-    angle = this->ScalarProduct(y)/norm1/norm2;
-  // -1-LINALG_MYEPSILON() occured due to numerical imprecision, catch ...
-  //Log() << Verbose(2) << "INFO: acos(-1) = " << acos(-1) << ", acos(-1+LINALG_MYEPSILON()) = " << acos(-1+LINALG_MYEPSILON()) << ", acos(-1-LINALG_MYEPSILON()) = " << acos(-1-LINALG_MYEPSILON()) << "." << endl;
-  if (angle < -1)
-    angle = -1;
-  if (angle > 1)
-    angle = 1;
-  return acos(angle);
-}
-
-/* ======================== Properties ============================= */
-/** Calculates scalar product between \a *this and \a b.
- * @param b other vector
- * @return \f$| (*this) \cdot (b)|^2\f$
- */
-const double VectorContent::operator*(const VectorContent& b) const
-{
-  double res = 0.;
-  gsl_blas_ddot(content, b.content, &res);
-  return res;
-};
-
-/** Getter for VectorContent::dimension.
- * @return VectorContent::dimension
- */
-const size_t VectorContent::getDimension() const
-{
-  return dimension;
-}
Index: src/LinearAlgebra/VectorContent.hpp
===================================================================
--- src/LinearAlgebra/VectorContent.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,145 +1,0 @@
-/*
- * VectorContent.hpp
- *
- *  Created on: Jul 2, 2010
- *      Author: crueger
- */
-
-#ifndef VECTORCONTENT_HPP_
-#define VECTORCONTENT_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-/**
- * !file
- * The way GSL works does not allow for forward definitions of the structures.
- * Because of this the pointer to the gsl_vector struct is wrapped inside another
- * (dumb) object that allows for forward definitions.
- *
- * DO NOT USE OUTSIDE OF VECTOR UNLESS YOU ABSOLUTELY HAVE TO AND KNOW WHAT YOU ARE DOING.
- */
-
-#include <iosfwd>
-
-#include <gsl/gsl_vector.h>
-
-#include "LinearAlgebra/MatrixVector_ops.hpp"
-
-class Vector;
-class MatrixContent;
-
-/** Dummy structure to create a unique signature.
- *
- */
-struct VectorBaseCase{};
-
-class VectorContent{
-  friend std::ostream & operator<< (std::ostream& ost, const VectorContent &m);
-  friend VectorContent const operator*(const VectorContent& a, const double m);
-  friend VectorContent const operator*(const double m, const VectorContent& a);
-  friend VectorContent const operator+(const VectorContent& a, const VectorContent& b);
-  friend VectorContent const operator-(const VectorContent& a, const VectorContent& b);
-
-  // matrix vector products
-  friend VectorContent const operator*(const VectorContent& vec, const MatrixContent& mat);
-  friend VectorContent const operator*(const MatrixContent& mat, const VectorContent& vec);
-
-public:
-  explicit VectorContent(size_t _dim);
-  VectorContent(VectorBaseCase);
-  VectorContent(const VectorContent * const src);
-  VectorContent(const VectorContent & src);
-  VectorContent(gsl_vector * _src);
-  virtual ~VectorContent();
-
-  // Accessing
-  double &at(size_t m);
-  const double at(size_t m) const;
-  double & operator[](size_t i);
-  const double operator[](size_t i) const;
-  double *Pointer(size_t m) const;
-  const double *const_Pointer(size_t m) const;
-
-  // Assignment operator
-  VectorContent &operator=(const VectorContent& src);
-
-  // Initializing
-  void setFromDoubleArray(double * x);
-  void setFromVector(Vector &v);
-  void setValue(double x);
-  void setZero();
-  int setBasis(size_t m);
-
-  // Exchanging elements
-  int SwapElements(size_t i, size_t j);
-  int Reverse();
-
-  // checking state
-  bool IsZero() const;
-  bool IsOne() const;
-
-  // properties
-  //bool IsNormalTo(const VectorContent &normal) const;
-  //bool IsEqualTo(const VectorContent &a) const;
-
-  // Norms
-  double Norm() const;
-  double NormSquared() const;
-  void Normalize();
-  VectorContent getNormalized() const;
-
-  // properties relative to another VectorContent
-  double DistanceSquared(const VectorContent &y) const;
-  double ScalarProduct(const VectorContent &y) const;
-  double Angle(const VectorContent &y) const;
-
-  // operators
-  bool operator==(const VectorContent& b) const;
-  const VectorContent& operator+=(const VectorContent& b);
-  const VectorContent& operator-=(const VectorContent& b);
-  const VectorContent& operator*=(const double m);
-  const double operator*(const VectorContent& b) const;
-
-  const size_t getDimension() const;
-
-  size_t dimension;
-  gsl_vector *content;
-private:
-  bool free_content_on_exit;
-};
-
-std::ostream & operator << (std::ostream& ost, const VectorContent &m);
-VectorContent const operator*(const VectorContent& a, const double m);
-VectorContent const operator*(const double m, const VectorContent& a);
-VectorContent const operator+(const VectorContent& a, const VectorContent& b);
-VectorContent const operator-(const VectorContent& a, const VectorContent& b);
-
-/** Vector view.
- * Extension of VectorContent to contain not a gsl_vector but only a view on a
- * gsl_vector (or row/column in a gsl_matrix).
- *
- * We need the above VectorBaseCase here:
- * content, i.e. the gsl_vector, must not be allocated, as it is just a view
- * with an internal gsl_vector_view. Hence, VectorBaseCase is just dummy class
- * to give the constructor a unique signature.
- */
-struct VectorViewContent : public VectorContent
-{
-  VectorViewContent(gsl_vector_view _view) :
-    VectorContent(VectorBaseCase()),
-    view(_view)
-  {
-    dimension = _view.vector.size;
-    content=&view.vector;
-  }
-  ~VectorViewContent(){
-    content=0;
-  }
-  gsl_vector_view view;
-};
-
-#endif /* VECTORCONTENT_HPP_ */
Index: src/LinearAlgebra/VectorInterface.cpp
===================================================================
--- src/LinearAlgebra/VectorInterface.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * VectorInterface.cpp
- *
- *  Created on: Jul 29, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "VectorInterface.hpp"
-
-#include <iostream>
-#include "LinearAlgebra/Vector.hpp"
-
-
-/** Constructor of class VectorInterface.
- */
-VectorInterface::VectorInterface()
-{};
-
-/** Destructor for class VectorInterface.
- */
-VectorInterface::~VectorInterface()
-{};
-
Index: src/LinearAlgebra/VectorInterface.hpp
===================================================================
--- src/LinearAlgebra/VectorInterface.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * VectorInterface.hpp
- *
- *  Created on: Jul 29, 2010
- *      Author: heber
- */
-
-#ifndef VECTORINTERFACE_HPP_
-#define VECTORINTERFACE_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cstring>
-#include <iostream>
-
-class Vector;
-
-/** Contains all functions of the class Vector as virtual definitions, to give any
- * class derived from it the interface of a Vector, i.e. Vector-like abilities
- * (i.e. the scaffold design pattern).
- */
-class VectorInterface  {
-public:
-
-  // Accessors ussually come in pairs... and sometimes even more than that
-  virtual const double& operator[](size_t i) const = 0;
-  virtual const double& at(size_t i) const = 0;
-  virtual void set(size_t i, const double value) = 0;
-  virtual const Vector& getPosition() const = 0;
-
-  // Assignment operator
-  virtual void setPosition(const Vector& _vector) = 0;
-
-  // operators for mathematical operations
-  virtual const VectorInterface& operator+=(const Vector& b) = 0;
-  virtual const VectorInterface& operator-=(const Vector& b) = 0;
-  virtual Vector const operator+(const Vector& b) const = 0;
-  virtual Vector const operator-(const Vector& b) const = 0;
-
-  virtual void Zero() = 0;
-  virtual void One(const double one) = 0;
-  virtual void LinearCombinationOfVectors(const Vector &x1, const Vector &x2, const Vector &x3, const double * const factors) = 0;
-
-  virtual double distance(const Vector &point) const = 0;
-  virtual double DistanceSquared(const Vector &y) const = 0;
-  virtual double distance(const VectorInterface &_atom) const = 0;
-  virtual double DistanceSquared(const VectorInterface &_atom) const = 0;
-
-  virtual void ScaleAll(const double *factor) = 0;
-  virtual void ScaleAll(const Vector &factor) = 0;
-  virtual void Scale(const double factor) = 0;
-
-  virtual std::ostream & operator << (std::ostream &ost) const = 0;
-
-protected:
-  /** Constructor and destructor are protected as VectorInterface should never
-   * be instantiated by itself but only as a derived class.
-   */
-  VectorInterface();
-  ~VectorInterface();
-};
-
-#endif /* VECTORINTERFACE_HPP_ */
Index: src/LinearAlgebra/VectorSet.hpp
===================================================================
--- src/LinearAlgebra/VectorSet.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/*
- * VectorSet.hpp
- *
- *  Created on: Jun 2, 2010
- *      Author: crueger
- */
-
-#ifndef VECTORSET_HPP_
-#define VECTORSET_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-
-#include <functional>
-#include <algorithm>
-#include <limits>
-
-/**
- * A simple mixin to give any STL conforming structure fast Vector abilities
- *
- * TODO: make this work for maps
- */
-
-#include "LinearAlgebra/Vector.hpp"
-#include <list>
-
-// this tests, whether we actually have a Vector
-template <class V>
-struct is_vector{};
-
-template <>
-struct is_vector<Vector>{
-  typedef void wrong_type;
-};
-
-template <class Set>
-class VectorSet : public Set
-{
-  // when our set carries something besides a vector this will produce an error
-  typedef typename is_vector<typename Set::value_type>::wrong_type check_for_vector;
-public:
-  // typedefs for STL conforming structure
-  typedef typename Set::iterator iterator;
-  typedef typename Set::const_iterator const_iterator;
-
-  VectorSet(){}
-  virtual ~VectorSet(){}
-
-  /**
-   * translate all Vectors within this set by a specified amount
-   */
-  void translate(const Vector &translater){
-    // this is needed to allow template lookup
-    transform(this->begin(),this->end(),this->begin(),std::bind1st(std::plus<Vector>(),translater));
-  }
-
-  double minDistSquared(const Vector &point){
-    if(!this->size())
-      return std::numeric_limits<double>::infinity();
-    std::list<double> helper;
-    helper.resize(this->size());
-    transform(this->begin(),this->end(),
-              helper.begin(),
-              std::bind2nd(std::mem_fun_ref(&Vector::DistanceSquared),point));
-    return *min_element(helper.begin(),helper.end());
-  }
-};
-
-// allows simpler definition of VectorSets
-#define VECTORSET(container_type) VectorSet<container_type<Vector> >
-
-#endif /* VECTORSET_HPP_ */
Index: src/LinearAlgebra/defs.hpp
===================================================================
--- src/LinearAlgebra/defs.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,30 +1,0 @@
-/*
- * defs.hpp
- *
- * Constant definitons and enumerations.
- *
- *  Created on: Mar 14, 2011
- *      Author: heber
- */
-
-#ifndef LINEARALGEBRA_DEFS_HPP_
-#define LINEARALGEBRA_DEFS_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <limits>
-
-#ifdef HAVE_INLINE
-inline
-#endif
-double LINALG_MYEPSILON()
-{
-  return (std::numeric_limits<double>::epsilon()*100.);
-}
-
-enum { NDIM = 3 };   //!< number of spatial dimensions
-
-#endif /* LINEARALGEBRA_DEFS_HPP_ */
Index: src/LinearAlgebra/fast_functions.hpp
===================================================================
--- src/LinearAlgebra/fast_functions.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,85 +1,0 @@
-/*
- * fast_functions.hpp
- *
- *  Created on: Apr 1, 2010
- *      Author: crueger
- */
-
-#ifndef FAST_FUNCTIONS_HPP_
-#define FAST_FUNCTIONS_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cmath>
-
-#include "LinearAlgebra/defs.hpp"
-
-/**
- * !@file
- * This file contains several functions that need to be very fast and which are inlined for this
- * reason.
- *
- * Warning: do not forget inline keyword for functions in this file to avoid multiple definitions!
- */
-
-typedef enum {
-  Minus = -1,
-  Zero = 0,
-  Plus = +1
-} sign_t;
-
-
-/********************************* Functions ************************************************/
-
-/** Gives numerical sign of some \a value.
- *
- * @param value to check
- * @return enumerated sign_t of value
- */
-inline sign_t sign(double value)
-{
-  if(fabs(value)<LINALG_MYEPSILON()){
-    return Zero;
-  }
-  if(value<0)
-    return Minus;
-  else
-    return Plus;
-}
-
-
-/** hard-coded determinant of a 3x3 matrix.
- * \param a[9] matrix
- * \return \f$det(a)\f$
- */
-inline double RDET3(const double a[NDIM*NDIM])
-{
-  return ((a)[0]*(a)[4]*(a)[8] + (a)[3]*(a)[7]*(a)[2] + (a)[6]*(a)[1]*(a)[5] - (a)[2]*(a)[4]*(a)[6] - (a)[5]*(a)[7]*(a)[0] - (a)[8]*(a)[1]*(a)[3]);
-};
-
-/** hard-coded determinant of a 2x2 matrix.
- * \param a[4] matrix
- * \return \f$det(a)\f$
- */
-inline double RDET2(const double a[4])
-{
-  return ((a[0])*(a[3])-(a[1])*(a[2]));
-};
-
-/** hard-coded determinant of a 2x2 matrix.
- * \param a0 (0,0) entry of matrix
- * \param a1 (0,1) entry of matrix
- * \param a2 (1,0) entry of matrix
- * \param a3 (1,1) entry of matrix
- * \return \f$det(a)\f$
- */
-inline double RDET2(const double a0, const double a1, const double a2, const double a3)
-{
-  return ((a0)*(a3)-(a1)*(a2));
-};
-
-
-#endif /* FAST_FUNCTIONS_HPP_ */
Index: src/LinearAlgebra/leastsquaremin.cpp
===================================================================
--- src/LinearAlgebra/leastsquaremin.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * leastsquaremin.cpp
- *
- *  Created on: Aug 18, 2009
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include <iostream>
-
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/leastsquaremin.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-/** Determines sum of squared distances of \a X to all \a **vectors.
- * \param *x reference vector
- * \param *params
- * \return sum of square distances
- */
-double LSQ (const gsl_vector * const x, void * params)
-{
-  double sum = 0.;
-  struct LSQ_params *par = (struct LSQ_params *)params;
-  const Vector ** vectors = par->vectors;
-  int num = par->num;
-
-  for (int i=num;i--;) {
-    for(int j=NDIM;j--;)
-      sum += (gsl_vector_get(x,j) - (vectors[i])->at(j))*(gsl_vector_get(x,j) - (vectors[i])->at(j));
-  }
-
-  return sum;
-};
-
Index: src/LinearAlgebra/leastsquaremin.hpp
===================================================================
--- src/LinearAlgebra/leastsquaremin.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * leastsquaremin.hpp
- *
- *  Created on: Aug 18, 2009
- *      Author: heber
- */
-
-#ifndef LEASTSQUAREMIN_HPP_
-#define LEASTSQUAREMIN_HPP_
-
-using namespace std;
-
-/*********************************************** includes ***********************************/
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gsl/gsl_vector.h>
-
-/****************************************** forward declarations *****************************/
-
-class element;
-class molecule;
-class Vector;
-
-/********************************************** declarations *******************************/
-
-/** Parameter structure for least square minimsation.
- */
-struct LSQ_params {
-  const Vector **vectors;
-  int num;
-};
-
-double LSQ(const gsl_vector * const x, void * params);
-
-/** Parameter structure for least square minimsation.
- */
-struct lsq_params {
-  gsl_vector *x;
-  const molecule *mol;
-  const element *type;
-};
-
-
-
-#endif /* LEASTSQUAREMIN_HPP_ */
Index: src/LinearAlgebra/unittests/LineUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/LineUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,414 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * LineUnittest.cpp
- *
- *  Created on: May 27, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include "LinearAlgebra/Exceptions.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include <iostream>
-#include <cmath>
-
-#include "LineUnitTest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-CPPUNIT_TEST_SUITE_REGISTRATION( LineUnittest );
-
-void LineUnittest::setUp(){
-  // three lines along the axes
-  la1 = new Line(zeroVec,unitVec[0]);
-  la2 = new Line(zeroVec,unitVec[1]);
-  la3 = new Line(zeroVec,unitVec[2]);
-
-  // the lines along the planes defined by two coordinate axes
-  lp1 = new Line(unitVec[0],unitVec[0]-unitVec[1]);
-  lp2 = new Line(unitVec[1],unitVec[1]-unitVec[2]);
-  lp3 = new Line(unitVec[2],unitVec[2]-unitVec[0]);
-}
-void LineUnittest::tearDown(){
-  delete la1;
-  delete la2;
-  delete la3;
-
-  delete lp1;
-  delete lp2;
-  delete lp3;
-}
-
-void LineUnittest::constructionErrorTest(){
-  // test some constructions
-
-  // direction+origin should never fail
-  CPPUNIT_ASSERT_NO_THROW(Line(zeroVec,unitVec[0]));
-  CPPUNIT_ASSERT_NO_THROW(Line(zeroVec,unitVec[1]));
-  CPPUNIT_ASSERT_NO_THROW(Line(zeroVec,unitVec[2]));
-
-  // two points fails if both points are the same
-  CPPUNIT_ASSERT_NO_THROW(makeLineThrough(unitVec[0],unitVec[1]));
-  CPPUNIT_ASSERT_NO_THROW(makeLineThrough(unitVec[1],unitVec[2]));
-  CPPUNIT_ASSERT_NO_THROW(makeLineThrough(unitVec[2],unitVec[0]));
-  // for zerovectors
-  CPPUNIT_ASSERT_NO_THROW(makeLineThrough(unitVec[0],zeroVec));
-  CPPUNIT_ASSERT_NO_THROW(makeLineThrough(unitVec[1],zeroVec));
-  CPPUNIT_ASSERT_NO_THROW(makeLineThrough(unitVec[2],zeroVec));
-  // now we pass two times the same point
-  CPPUNIT_ASSERT_THROW(makeLineThrough(zeroVec,zeroVec),LinearDependenceException);
-  CPPUNIT_ASSERT_THROW(makeLineThrough(unitVec[0],unitVec[0]),LinearDependenceException);
-  CPPUNIT_ASSERT_THROW(makeLineThrough(unitVec[1],unitVec[1]),LinearDependenceException);
-  CPPUNIT_ASSERT_THROW(makeLineThrough(unitVec[2],unitVec[2]),LinearDependenceException);
-
-}
-
-bool testDirection(const Vector &dir1,const Vector &dir2){
-  return (dir1==dir2) || (dir1==-1*dir2);
-}
-
-void LineUnittest::constructionResultTest(){
-  // test all directions
-  CPPUNIT_ASSERT(testDirection(la1->getDirection(),unitVec[0]));
-  CPPUNIT_ASSERT(testDirection(la2->getDirection(),unitVec[1]));
-  CPPUNIT_ASSERT(testDirection(la3->getDirection(),unitVec[2]));
-
-  // test origins
-  CPPUNIT_ASSERT_EQUAL(la1->getOrigin(),zeroVec);
-  CPPUNIT_ASSERT_EQUAL(la2->getOrigin(),zeroVec);
-  CPPUNIT_ASSERT_EQUAL(la2->getOrigin(),zeroVec);
-
-  // test if desired points are on the lines
-  CPPUNIT_ASSERT(la1->isContained(zeroVec));
-  CPPUNIT_ASSERT(la2->isContained(zeroVec));
-  CPPUNIT_ASSERT(la3->isContained(zeroVec));
-
-  CPPUNIT_ASSERT(la1->isContained(unitVec[0]));
-  CPPUNIT_ASSERT(la2->isContained(unitVec[1]));
-  CPPUNIT_ASSERT(la3->isContained(unitVec[2]));
-
-  CPPUNIT_ASSERT(lp1->isContained(unitVec[0]));
-  CPPUNIT_ASSERT(lp2->isContained(unitVec[1]));
-  CPPUNIT_ASSERT(lp3->isContained(unitVec[2]));
-
-  CPPUNIT_ASSERT(lp1->isContained(unitVec[1]));
-  CPPUNIT_ASSERT(lp2->isContained(unitVec[2]));
-  CPPUNIT_ASSERT(lp3->isContained(unitVec[0]));
-}
-
-void LineUnittest::isContainedTest(){
-  // Zerovector on the axes lines
-  CPPUNIT_ASSERT(la1->isContained(zeroVec));
-  CPPUNIT_ASSERT(la2->isContained(zeroVec));
-  CPPUNIT_ASSERT(la3->isContained(zeroVec));
-
-  // multiples of the second support vector
-  CPPUNIT_ASSERT(la1->isContained(unitVec[0]));
-  CPPUNIT_ASSERT(la2->isContained(unitVec[1]));
-  CPPUNIT_ASSERT(la3->isContained(unitVec[2]));
-
-  CPPUNIT_ASSERT(la1->isContained(2*unitVec[0]));
-  CPPUNIT_ASSERT(la2->isContained(2*unitVec[1]));
-  CPPUNIT_ASSERT(la3->isContained(2*unitVec[2]));
-
-  CPPUNIT_ASSERT(la1->isContained(3*unitVec[0]));
-  CPPUNIT_ASSERT(la2->isContained(3*unitVec[1]));
-  CPPUNIT_ASSERT(la3->isContained(3*unitVec[2]));
-
-  // negative multiples
-  CPPUNIT_ASSERT(la1->isContained(-1*unitVec[0]));
-  CPPUNIT_ASSERT(la2->isContained(-1*unitVec[1]));
-  CPPUNIT_ASSERT(la3->isContained(-1*unitVec[2]));
-
-  CPPUNIT_ASSERT(la1->isContained(-2*unitVec[0]));
-  CPPUNIT_ASSERT(la2->isContained(-2*unitVec[1]));
-  CPPUNIT_ASSERT(la3->isContained(-2*unitVec[2]));
-
-  // points that should not be on the lines
-  CPPUNIT_ASSERT(!la1->isContained(unitVec[1]));
-  CPPUNIT_ASSERT(!la2->isContained(unitVec[2]));
-  CPPUNIT_ASSERT(!la3->isContained(unitVec[0]));
-
-  CPPUNIT_ASSERT(!la1->isContained(2*unitVec[1]));
-  CPPUNIT_ASSERT(!la2->isContained(2*unitVec[2]));
-  CPPUNIT_ASSERT(!la3->isContained(2*unitVec[0]));
-
-  CPPUNIT_ASSERT(!la1->isContained(-1*unitVec[1]));
-  CPPUNIT_ASSERT(!la2->isContained(-1*unitVec[2]));
-  CPPUNIT_ASSERT(!la3->isContained(-1*unitVec[0]));
-
-  // For the plane lines
-  CPPUNIT_ASSERT(lp1->isContained(unitVec[0]));
-  CPPUNIT_ASSERT(lp2->isContained(unitVec[1]));
-  CPPUNIT_ASSERT(lp3->isContained(unitVec[2]));
-
-  CPPUNIT_ASSERT(lp1->isContained(unitVec[1]));
-  CPPUNIT_ASSERT(lp2->isContained(unitVec[2]));
-  CPPUNIT_ASSERT(lp3->isContained(unitVec[0]));
-
-  CPPUNIT_ASSERT(lp1->isContained(unitVec[0]+2*(unitVec[0]-unitVec[1])));
-  CPPUNIT_ASSERT(lp2->isContained(unitVec[1]+2*(unitVec[1]-unitVec[2])));
-  CPPUNIT_ASSERT(lp3->isContained(unitVec[2]+2*(unitVec[2]-unitVec[0])));
-
-  CPPUNIT_ASSERT(lp1->isContained(unitVec[0]-2*(unitVec[0]-unitVec[1])));
-  CPPUNIT_ASSERT(lp2->isContained(unitVec[1]-2*(unitVec[1]-unitVec[2])));
-  CPPUNIT_ASSERT(lp3->isContained(unitVec[2]-2*(unitVec[2]-unitVec[0])));
-}
-
-void LineUnittest::intersectionTest(){
-  Vector fixture;
-
-  // intersection of the axis lines
-  fixture = la1->getIntersection(*la2);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = la2->getIntersection(*la3);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = la3->getIntersection(*la1);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-
-  // axes and plane lines
-  fixture = la1->getIntersection(*lp1);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = la2->getIntersection(*lp2);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = la3->getIntersection(*lp3);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  fixture = la1->getIntersection(*lp3);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = la2->getIntersection(*lp1);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = la3->getIntersection(*lp2);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  // two plane lines
-  fixture = lp1->getIntersection(*lp2);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = lp2->getIntersection(*lp3);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-  fixture = lp3->getIntersection(*lp1);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-
-  // When we have two times the same line, we check if the point is on the line
-  fixture = la1->getIntersection(*la1);
-  CPPUNIT_ASSERT(la1->isContained(fixture));
-  fixture = la2->getIntersection(*la2);
-  CPPUNIT_ASSERT(la2->isContained(fixture));
-  fixture = la3->getIntersection(*la3);
-  CPPUNIT_ASSERT(la3->isContained(fixture));
-
-  fixture = lp1->getIntersection(*lp1);
-  CPPUNIT_ASSERT(lp1->isContained(fixture));
-  fixture = lp2->getIntersection(*lp2);
-  CPPUNIT_ASSERT(lp2->isContained(fixture));
-  fixture = lp3->getIntersection(*lp3);
-  CPPUNIT_ASSERT(lp3->isContained(fixture));
-
-  // lines that are askew should produce an Error
-  CPPUNIT_ASSERT_THROW(lp1->getIntersection(*la3),SkewException);
-  CPPUNIT_ASSERT_THROW(lp2->getIntersection(*la1),SkewException);
-  CPPUNIT_ASSERT_THROW(lp3->getIntersection(*la2),SkewException);
-
-  CPPUNIT_ASSERT_THROW(la1->getIntersection(*lp2),SkewException);
-  CPPUNIT_ASSERT_THROW(la2->getIntersection(*lp3),SkewException);
-  CPPUNIT_ASSERT_THROW(la3->getIntersection(*lp1),SkewException);
-}
-
-void LineUnittest::rotationTest(){
-  Vector fixture;
-
-  // rotate zero Vector along the axes lines by various degrees
-  fixture = la1->rotateVector(zeroVec,1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = la2->rotateVector(zeroVec,1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = la3->rotateVector(zeroVec,1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-
-  fixture = la1->rotateVector(zeroVec,2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = la2->rotateVector(zeroVec,2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = la3->rotateVector(zeroVec,2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-
-  // rotate vectors on the axis around their lines
-  fixture = la1->rotateVector(unitVec[0],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = la2->rotateVector(unitVec[1],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = la3->rotateVector(unitVec[2],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  fixture = la1->rotateVector(unitVec[0],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = la2->rotateVector(unitVec[1],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = la3->rotateVector(unitVec[2],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  // more vectors on the axis
-  fixture = la1->rotateVector(2*unitVec[0],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,2*unitVec[0]);
-  fixture = la2->rotateVector(2*unitVec[1],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,2*unitVec[1]);
-  fixture = la3->rotateVector(2*unitVec[2],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,2*unitVec[2]);
-
-  fixture = la1->rotateVector(2*unitVec[0],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,2*unitVec[0]);
-  fixture = la2->rotateVector(2*unitVec[1],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,2*unitVec[1]);
-  fixture = la3->rotateVector(2*unitVec[2],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,2*unitVec[2]);
-
-  // negative factors
-  fixture = la1->rotateVector(-1*unitVec[0],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[0]);
-  fixture = la2->rotateVector(-1*unitVec[1],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[1]);
-  fixture = la3->rotateVector(-1*unitVec[2],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[2]);
-
-  fixture = la1->rotateVector(-1*unitVec[0],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[0]);
-  fixture = la2->rotateVector(-1*unitVec[1],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[1]);
-  fixture = la3->rotateVector(-1*unitVec[2],2.);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[2]);
-
-
-
-  // now the real rotations
-  // unitVec[1] around unitVec[0]
-  fixture = la1->rotateVector(unitVec[1],0);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = la1->rotateVector(unitVec[1],1./2.*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[2]);
-  fixture = la1->rotateVector(unitVec[1],M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[1]);
-  fixture = la1->rotateVector(unitVec[1],2*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-
-  // unitVec[2] around unitVec[1]
-  fixture = la2->rotateVector(unitVec[2],0);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-  fixture = la2->rotateVector(unitVec[2],1./2.*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[0]);
-  fixture = la2->rotateVector(unitVec[2],M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[2]);
-  fixture = la2->rotateVector(unitVec[2],2*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  // unitVec[0] around unitVec[2]
-  fixture = la3->rotateVector(unitVec[0],0);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = la3->rotateVector(unitVec[0],1./2.*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[1]);
-  fixture = la3->rotateVector(unitVec[0],M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[0]);
-  fixture = la3->rotateVector(unitVec[0],2*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-
-
-  // and some rotation around the plane lines
-
-  // Vectors on the line
-  fixture = lp1->rotateVector(unitVec[0],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = lp1->rotateVector(unitVec[1],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-
-  fixture = lp2->rotateVector(unitVec[1],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = lp2->rotateVector(unitVec[2],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  fixture = lp3->rotateVector(unitVec[2],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-  fixture = lp3->rotateVector(unitVec[0],1.);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-
-  // the real stuff
-  fixture = lp1->rotateVector(zeroVec,M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,Vector(1,1,0));
-  fixture = lp2->rotateVector(zeroVec,M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,Vector(0,1,1));
-  fixture = lp3->rotateVector(zeroVec,M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,Vector(1,0,1));
-
-  fixture = lp1->rotateVector(zeroVec,2*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = lp2->rotateVector(zeroVec,2*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = lp3->rotateVector(zeroVec,2*M_PI);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-}
-
-void LineUnittest::sphereIntersectionTest(){
-  {
-    std::vector<Vector> res = la1->getSphereIntersections();
-    CPPUNIT_ASSERT_EQUAL(res.size(),(size_t)2);
-    CPPUNIT_ASSERT(testDirection(res[0],unitVec[0]));
-    CPPUNIT_ASSERT(testDirection(res[1],unitVec[0]));
-    CPPUNIT_ASSERT(res[0]!=res[1]);
-  }
-
-  {
-    std::vector<Vector> res = la2->getSphereIntersections();
-    CPPUNIT_ASSERT_EQUAL(res.size(),(size_t)2);
-    CPPUNIT_ASSERT(testDirection(res[0],unitVec[1]));
-    CPPUNIT_ASSERT(testDirection(res[1],unitVec[1]));
-    CPPUNIT_ASSERT(res[0]!=res[1]);
-  }
-
-  {
-    std::vector<Vector> res = la3->getSphereIntersections();
-    CPPUNIT_ASSERT_EQUAL(res.size(),(size_t)2);
-    CPPUNIT_ASSERT(testDirection(res[0],unitVec[2]));
-    CPPUNIT_ASSERT(testDirection(res[1],unitVec[2]));
-    CPPUNIT_ASSERT(res[0]!=res[1]);
-  }
-
-  {
-    std::vector<Vector> res = lp1->getSphereIntersections();
-    CPPUNIT_ASSERT_EQUAL(res.size(),(size_t)2);
-    CPPUNIT_ASSERT((res[0]==unitVec[0]) || (res[0]==unitVec[1]));
-    CPPUNIT_ASSERT((res[1]==unitVec[0]) || (res[1]==unitVec[1]));
-    CPPUNIT_ASSERT(res[0]!=res[1]);
-  }
-
-  {
-    std::vector<Vector> res = lp2->getSphereIntersections();
-    CPPUNIT_ASSERT_EQUAL(res.size(),(size_t)2);
-    CPPUNIT_ASSERT((res[0]==unitVec[1]) || (res[0]==unitVec[2]));
-    CPPUNIT_ASSERT((res[1]==unitVec[1]) || (res[1]==unitVec[2]));
-    CPPUNIT_ASSERT(res[0]!=res[1]);
-  }
-
-  {
-    std::vector<Vector> res = lp3->getSphereIntersections();
-    CPPUNIT_ASSERT_EQUAL(res.size(),(size_t)2);
-    CPPUNIT_ASSERT((res[0]==unitVec[2]) || (res[0]==unitVec[0]));
-    CPPUNIT_ASSERT((res[1]==unitVec[2]) || (res[1]==unitVec[0]));
-    CPPUNIT_ASSERT(res[0]!=res[1]);
-  }
-}
Index: src/LinearAlgebra/unittests/LineUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/LineUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- * LineUnittest.hpp
- *
- *  Created on: May 27, 2010
- *      Author: crueger
- */
-
-#ifndef LINEUNITTEST_HPP_
-#define LINEUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/Line.hpp"
-
-class LineUnittest : public CppUnit::TestFixture
-{
-
-  CPPUNIT_TEST_SUITE( LineUnittest) ;
-  CPPUNIT_TEST ( constructionErrorTest );
-  CPPUNIT_TEST ( constructionResultTest );
-  CPPUNIT_TEST ( isContainedTest );
-  CPPUNIT_TEST ( intersectionTest );
-  CPPUNIT_TEST ( rotationTest );
-  CPPUNIT_TEST ( sphereIntersectionTest );
-  CPPUNIT_TEST_SUITE_END();
-
-public:
-  void setUp();
-  void tearDown();
-
-  void constructionErrorTest();
-  void constructionResultTest();
-  void isContainedTest();
-  void intersectionTest();
-  void rotationTest();
-  void sphereIntersectionTest();
-
-private:
-  Line *la1;
-  Line *la2;
-  Line *la3;
-  Line *lp1;
-  Line *lp2;
-  Line *lp3;
-
-};
-
-#endif /* LINEUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,123 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * LinearSystemOfEquationsunittest.cpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-using namespace std;
-
-#include <limits>
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-#include <cmath>
-
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-#include "LinearSystemOfEquationsUnitTest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( LinearSystemOfEquationsTest );
-
-
-void LinearSystemOfEquationsTest::setUp()
-{
-  s = new LinearSystemOfEquations(4,4);
-};
-
-void LinearSystemOfEquationsTest::tearDown()
-{
-  delete(s);
-};
-
-/** Unit test for initialization.
- *
- */
-void LinearSystemOfEquationsTest::InitializationTest()
-{
-  // Setting A
-  double array[] = { 1., 0., 0., 0.,
-                     0., 2., 0., 0.,
-                     0., 0., 3., 0.,
-                     0., 0., 0., 4. };
-  s->SetA(array);
-
-  // Setting b
-};
-
-/** Unit test for symmetry property.
- *
- */
-void LinearSystemOfEquationsTest::SymmetricTest()
-{
-  CPPUNIT_ASSERT_EQUAL( true, s->SetSymmetric(true) );
-  //LinearSystemOfEquations *t = new LinearSystemOfEquations(4,3);
-  //CPPUNIT_ASSERT_EQUAL( true, t->SetSymmetric(true) );
-  //delete(t);
-};
-
-/** Unit test for simple Solve.
- *
- */
-void LinearSystemOfEquationsTest::SolveSimpleTest()
-{
-  // set up A and b
-  double m_array[] = { 1., 0., 0., 0.,
-                       0., 2., 0., 0.,
-                       0., 0., 3., 0.,
-                       0., 0., 0., 4. };
-  double v_array[] = { 1., 2., 3., 4. };
-  s->SetA(m_array);
-  s->Setb(v_array);
-
-  // solve
-  double *array = new double[4];
-  s->GetSolutionAsArray(array);
-  for (int i=0;i<4;i++)
-    CPPUNIT_ASSERT_EQUAL( 1., array[i]);
-  delete[](array);
-};
-
-/** Unit test for advanced Solve.
- *
- */
-void LinearSystemOfEquationsTest::SolveAdvancedTest()
-{
-  // set up A and b
-  double m_array[] = { 0.18, 0.60, 0.57, 0.96,
-                       0.41, 0.24, 0.99, 0.58,
-                       0.14, 0.30, 0.97, 0.66,
-                       0.51, 0.13, 0.19, 0.85 };
-  double v_array[] = { 1.0, 2.0, 3.0, 4.0 };
-  double x_array[] = { -4.05205022957398, -12.60561139590692, 1.660911626708844, 8.693766928795233 };
-  s->SetA(m_array);
-  s->Setb(v_array);
-
-  // solve
-  double *array = new double[4];
-  s->GetSolutionAsArray(array);
-  for (int i=0;i<4;i++) {
-    CPPUNIT_ASSERT( fabs(x_array[i] - array[i]) <= LINALG_MYEPSILON() );
-  }
-  delete[](array);
-};
Index: src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * LinearSystemOfEquationsunittest.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef LINEARSYSTEMOFEQUATIONSUNITTEST_HPP_
-#define LINEARSYSTEMOFEQUATIONSUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/LinearSystemOfEquations.hpp"
-
-/********************************************** Test classes **************************************/
-
-class LinearSystemOfEquationsTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( LinearSystemOfEquationsTest) ;
-    CPPUNIT_TEST ( InitializationTest );
-    CPPUNIT_TEST ( SymmetricTest );
-    CPPUNIT_TEST ( SolveSimpleTest );
-    CPPUNIT_TEST ( SolveAdvancedTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void InitializationTest();
-    void SymmetricTest();
-    void SolveSimpleTest();
-    void SolveAdvancedTest();
-
-private:
-    LinearSystemOfEquations *s;
-};
-
-
-#endif /* LINEARSYSTEMOFEQUATIONSUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/Makefile.am
===================================================================
--- src/LinearAlgebra/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,70 +1,0 @@
-# PLEASE adhere to the alphabetical ordering in this Makefile!
-# Also indentation by a single tab
-
-INCLUDES = -I$(top_srcdir)/src
-
-AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
-AM_CPPFLAGS = ${BOOST_CPPFLAGS} $(CPPUNIT_CFLAGS) ${CodePatterns_CFLAGS}
-
-TESTS = \
-  LinearSystemOfEquationsUnitTest \
-  LineUnitTest \
-  MatrixContentSymmetricUnitTest \
-  MatrixContentUnitTest \
-  MatrixUnitTest \
-  PlaneUnitTest \
-  VectorContentUnitTest \
-  VectorUnitTest
-
-
-check_PROGRAMS = $(TESTS) 
-noinst_PROGRAMS = $(TESTS)
-
-BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB)
-GSLLIBS = \
-	../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
-	${CodePatterns_LIBS} \
-	$(BOOST_LIB)
-
-LinearSystemOfEquationsUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	LinearSystemOfEquationsUnitTest.cpp \
-	LinearSystemOfEquationsUnitTest.hpp
-LinearSystemOfEquationsUnitTest_LDADD = ${GSLLIBS}
-
-LineUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	LineUnitTest.cpp \
-	LineUnitTest.hpp
-LineUnitTest_LDADD = ${GSLLIBS}
-
-MatrixContentSymmetricUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	MatrixContentSymmetricUnitTest.cpp \
-	MatrixContentSymmetricUnitTest.hpp
-MatrixContentSymmetricUnitTest_LDADD = ${GSLLIBS}
-
-MatrixContentUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	MatrixContentUnitTest.cpp \
-	MatrixContentUnitTest.hpp
-MatrixContentUnitTest_LDADD = ${GSLLIBS}
-
-MatrixUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	MatrixUnitTest.cpp \
-	MatrixUnitTest.hpp
-MatrixUnitTest_LDADD = ${GSLLIBS}
-
-PlaneUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	PlaneUnitTest.cpp \
-	PlaneUnitTest.hpp
-PlaneUnitTest_LDADD = ${GSLLIBS}
-
-VectorContentUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	VectorContentUnitTest.cpp \
-	VectorContentUnitTest.hpp
-VectorContentUnitTest_LDADD = ${GSLLIBS}
-
-VectorUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	VectorUnitTest.cpp \
-	VectorUnitTest.hpp 
-VectorUnitTest_LDADD = ${GSLLIBS}
-
-
-#AUTOMAKE_OPTIONS = parallel-tests
Index: src/LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,285 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * MatrixContentSymmetricUnitTest.cpp
- *
- *  Created on: Jan 8, 2010
- *      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 "MatrixContentSymmetricUnitTest.hpp"
-
-#include "LinearAlgebra/MatrixContent.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( MatrixContentSymmetricTest );
-
-
-void MatrixContentSymmetricTest::setUp()
-{
-  m = new MatrixContent(3,3);
-};
-
-void MatrixContentSymmetricTest::tearDown()
-{
-  delete(m);
-};
-
-/** Unit Test for accessing matrix elements.
- *
- */
-void MatrixContentSymmetricTest::AccessTest()
-{
-  // check whether all elements are initially zero
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
-
-  // set
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, i*3+j );
-
-  // and check
-  double *ptr = NULL;
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++) {
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), m->at(i,j) );
-      ptr = m->Pointer(i,j);
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), *ptr );
-    }
-
-  // assignment
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, i*3+j );
-  MatrixContent *dest = new MatrixContent(3,3);
-  *dest = *m;
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( dest->at(i,j), m->at(i,j) );
-  delete(dest);
-
-  // out of bounds
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(4,2) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(2,17) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(1024,140040) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,0) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(0,-1) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,-1) );
-};
-
-/** Unit Test for initializating matrices.
- *
- */
-void MatrixContentSymmetricTest::InitializationTest()
-{
-  // set zero
-  m->setZero();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
-
-  // set all
-  m->setValue(1.5);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 1.5, m->at(i,j) );
-
-  // set basis
-  m->setIdentity();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
-
-  // set from array
-  double array[] = { 1., 0., 0.,
-                     0., 1., 0.,
-                     0., 0., 1. };
-  m->setFromDoubleArray(array);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
-
-};
-
-/** Unit Test for copying matrices.
- *
- */
-void MatrixContentSymmetricTest::CopyTest()
-{
-  // set basis
-  MatrixContent *dest = NULL;
-  for (int i=0;i<3;i++) {
-    m->setValue(i);
-    dest = new MatrixContent(m);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( m->at(i,j) , dest->at(i,j) );
-
-    delete(dest);
-  }
-};
-
-/** Unit Test for exchanging rows and columns.
- *
- */
-void MatrixContentSymmetricTest::ExchangeTest()
-{
-  // set to 1,1,1,2, ...
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, i+1 );
-
-  // swap such that nothing happens
-  m->SwapColumns(1,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
-
-  // swap two rows
-  m->SwapRows(1,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      switch (j) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 1., m->at(j,i) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 3., m->at(j,i) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 2., m->at(j,i) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
-      }
-  // check that op is reversable
-  m->SwapRows(1,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
-
-  // set to 1,2,3,1, ...
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, j+1. );
-
-  // swap such that nothing happens
-  m->SwapRows(0,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
-
-  // swap two columns
-  m->SwapColumns(0,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      switch (j) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 3., m->at(i,j) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 2., m->at(i,j) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 1., m->at(i,j) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
-      }
-  // check that op is reversable
-  m->SwapColumns(0,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
-
-
-  // set to 1,2,3, ...
-  MatrixContent *n =  new MatrixContent(3,3);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++) {
-      m->set(i,j, 3*i+j+1 );
-      n->set(i,j, 3*j+i+1 );
-    }
-  // transpose
-  MatrixContent res = ((const MatrixContent)*m).transpose();
-  CPPUNIT_ASSERT( *n == res );
-  // second transpose
-  res.transpose();
-  CPPUNIT_ASSERT( *m == res );
-  delete n;
-};
-
-/** Unit Test for matrix properties.
- *
- */
-void MatrixContentSymmetricTest::PropertiesTest()
-{
-  // is zero
-  m->setZero();
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is positive
-  m->setValue(0.5);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is negative
-  m->setValue(-0.1);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNonNegative() );
-
-  // is positive definite
-  double array[] = { 1., 0., 0.,
-                     0., 1., 1.,
-                     0., 0., 1. };
-  m->setFromDoubleArray(array);
-  CPPUNIT_ASSERT_EQUAL( true, m->IsPositiveDefinite() );
-
-  //determinant
-  m->setIdentity();
-  CPPUNIT_ASSERT_EQUAL( 1., m->Determinant() );
-
-  m->setZero();
-  CPPUNIT_ASSERT_EQUAL( 0., m->Determinant() );
-
-  m->set( 0, 0, 1.);
-  m->set( 1, 1, 1.);
-  m->set( 2, 1, 1.);
-  CPPUNIT_ASSERT_EQUAL( 0., m->Determinant() );
-  
-  double array2[] = { 2., 0., 1.,
-                     -3., 1., 1.,
-                     1., 5.5, 1. };
-  m->setFromDoubleArray(array2);
-  CPPUNIT_ASSERT_EQUAL( -26.5, m->Determinant() );
-};
Index: src/LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
- * MatrixContentSymmetricUnitTest.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef MATRIXCONTENTSYMMETRICUNITTEST_HPP_
-#define MATRIXCONTENTSYMMETRICUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class MatrixContent;
-
-/********************************************** Test classes **************************************/
-
-class MatrixContentSymmetricTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( MatrixContentSymmetricTest) ;
-    CPPUNIT_TEST (AccessTest );
-    CPPUNIT_TEST (InitializationTest );
-    CPPUNIT_TEST (CopyTest );
-    CPPUNIT_TEST (ExchangeTest );
-    CPPUNIT_TEST (PropertiesTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void AccessTest();
-    void InitializationTest();
-    void CopyTest();
-    void ExchangeTest();
-    void PropertiesTest();
-
-private:
-    MatrixContent *m;
-};
-
-
-#endif /* MATRIXCONTENTSYMMETRICUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/MatrixContentUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/MatrixContentUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,294 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * MatrixContentUnitTest.cpp
- *
- *  Created on: Jan 8, 2010
- *      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 "MatrixContentUnitTest.hpp"
-
-#include "LinearAlgebra/MatrixContent.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( MatrixContentTest );
-
-
-void MatrixContentTest::setUp()
-{
-  m = new MatrixContent(4,3);
-};
-
-void MatrixContentTest::tearDown()
-{
-  delete(m);
-};
-
-/** Unit Test for accessing matrix elements.
- *
- */
-void MatrixContentTest::AccessTest()
-{
-  // check whether all elements are initially zero
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
-
-  // set
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, i*3+j );
-
-  // and check
-  double *ptr = NULL;
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++) {
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), m->at(i,j) );
-      ptr = m->Pointer(i,j);
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), *ptr );
-    }
-
-  // assignment
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, i*3+j );
-  MatrixContent *dest = new MatrixContent(4,3);
-  *dest = *m;
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( dest->at(i,j), m->at(i,j) );
-  delete(dest);
-
-  // out of bounds
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(5,2) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(2,17) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(1024,140040) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,0) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(0,-1) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,-1) );
-};
-
-/** Unit Test for initializating matrices.
- *
- */
-void MatrixContentTest::InitializationTest()
-{
-  // set zero
-  m->setZero();
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
-
-  // set all
-  m->setValue(1.5);
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 1.5, m->at(i,j) );
-
-  // set basis
-  m->setIdentity();
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
-
-  // set from array
-  double array[] = { 1., 0., 0.,
-                     0., 1., 0.,
-                     0., 0., 1.,
-                     0., 0., 0. };
-  m->setFromDoubleArray(array);
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
-
-};
-
-/** Unit Test for copying matrices.
- *
- */
-void MatrixContentTest::CopyTest()
-{
-  // set basis
-  MatrixContent *dest = NULL;
-  for (int i=0;i<4;i++) {
-    m->setValue(i);
-    dest = new MatrixContent(m);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( m->at(i,j) , dest->at(i,j) );
-
-    delete(dest);
-  }
-};
-
-/** Unit Test for exchanging rows and columns.
- *
- */
-void MatrixContentTest::ExchangeTest()
-{
-  // set to 1,1,1,2, ...
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, i+1 );
-
-  // swap such that nothing happens
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(1,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
-
-  // swap two rows
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(1,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      switch (i) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 1., m->at(i,j) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 3., m->at(i,j) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 2., m->at(i,j) );
-          break;
-        case 3:
-          CPPUNIT_ASSERT_EQUAL( 4., m->at(i,j) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
-      }
-  // check that op is reversable
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(1,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
-
-  // set to 1,2,3,1, ...
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, j+1. );
-
-  // swap such that nothing happens
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(0,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
-
-  // swap two columns
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(0,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      switch (j) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 3., m->at(i,j) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 2., m->at(i,j) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 1., m->at(i,j) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
-      }
-  // check that op is reversable
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(0,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
-
-
-  // set to 1,2,3,4, ...
-  MatrixContent *n =  new MatrixContent(3,4);
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++) {
-      m->set(i,j, 3*i+j+1 );
-      n->set(j,i, 3*i+j+1 );
-    }
-  // transpose
-  MatrixContent res = ((const MatrixContent)(*m)).transpose();
-  CPPUNIT_ASSERT( *n == res );
-  // second transpose
-  MatrixContent res2 = ((const MatrixContent)res).transpose();
-  CPPUNIT_ASSERT( *m == res2 );
-  delete n;
-};
-
-/** Unit Test for matrix properties.
- *
- */
-void MatrixContentTest::PropertiesTest()
-{
-  // is zero
-  m->setZero();
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is positive
-  m->setValue(0.5);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is negative
-  m->setValue(-0.1);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNonNegative() );
-
-  // is positive definite
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositiveDefinite() );
-};
-
-
-/** Unit test for reading from and writing matrix to stream
- *
- */
-void MatrixContentTest::ReadWriteTest()
-{
-  // set up matrix
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->set(i,j, i*3+j );
-
-  // write to stream
-  std::stringstream matrixstream;
-  m->write(matrixstream);
-
-  // parse in dimensions and check
-  std::pair<size_t, size_t> matrixdimensions = MatrixContent::preparseMatrixDimensions(matrixstream);
-  CPPUNIT_ASSERT_EQUAL( (size_t)4, matrixdimensions.first );
-  CPPUNIT_ASSERT_EQUAL( (size_t)3, matrixdimensions.second );
-  // parse in matrix and check
-  MatrixContent* n = new MatrixContent(4,3, matrixstream);
-  CPPUNIT_ASSERT_EQUAL( *m, *n );
-
-  // free matrix
-  delete n;
-}
Index: src/LinearAlgebra/unittests/MatrixContentUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/MatrixContentUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * MatrixContentUnitTest.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef MATRIXCONTENTUNITTEST_HPP_
-#define MATRIXCONTENTUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class MatrixContent;
-
-/********************************************** Test classes **************************************/
-
-class MatrixContentTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( MatrixContentTest) ;
-    CPPUNIT_TEST (AccessTest );
-    CPPUNIT_TEST (InitializationTest );
-    CPPUNIT_TEST (CopyTest );
-    CPPUNIT_TEST (ExchangeTest );
-    CPPUNIT_TEST (PropertiesTest );
-    CPPUNIT_TEST (ReadWriteTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void AccessTest();
-    void InitializationTest();
-    void CopyTest();
-    void ExchangeTest();
-    void PropertiesTest();
-    void ReadWriteTest();
-
-private:
-    MatrixContent *m;
-};
-
-
-#endif /* MATRIXCONTENTUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/MatrixUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/MatrixUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,367 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * MatrixUnitTest.cpp
- *
- *  Created on: Jul 7, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include <cmath>
-#include <limits>
-
-#include "MatrixUnitTest.hpp"
-
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Exceptions.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( MatrixUnittest );
-
-void MatrixUnittest::setUp(){
-  zero = new RealSpaceMatrix();
-  for(int i =NDIM;i--;) {
-    for(int j =NDIM;j--;) {
-      zero->at(i,j)=0.;
-    }
-  }
-  one = new RealSpaceMatrix();
-  for(int i =NDIM;i--;){
-    one->at(i,i)=1.;
-  }
-  full=new RealSpaceMatrix();
-  for(int i=NDIM;i--;){
-    for(int j=NDIM;j--;){
-      full->at(i,j)=1.;
-    }
-  }
-  diagonal = new RealSpaceMatrix();
-  for(int i=NDIM;i--;){
-    diagonal->at(i,i)=i+1.;
-  }
-  perm1 = new RealSpaceMatrix();
-  perm1->column(0) = unitVec[0];
-  perm1->column(1) = unitVec[2];
-  perm1->column(2) = unitVec[1];
-
-
-  perm2 = new RealSpaceMatrix();
-  perm2->column(0) = unitVec[1];
-  perm2->column(1) = unitVec[0];
-  perm2->column(2) = unitVec[2];
-
-  perm3 = new RealSpaceMatrix();
-  perm3->column(0) = unitVec[1];
-  perm3->column(1) = unitVec[2];
-  perm3->column(2) = unitVec[0];
-
-  perm4 = new RealSpaceMatrix();
-  perm4->column(0) = unitVec[2];
-  perm4->column(1) = unitVec[1];
-  perm4->column(2) = unitVec[0];
-
-  perm5 = new RealSpaceMatrix();
-  perm5->column(0) = unitVec[2];
-  perm5->column(1) = unitVec[0];
-  perm5->column(2) = unitVec[1];
-
-}
-void MatrixUnittest::tearDown(){
-  delete zero;
-  delete one;
-  delete full;
-  delete diagonal;
-  delete perm1;
-  delete perm2;
-  delete perm3;
-  delete perm4;
-  delete perm5;
-}
-
-void MatrixUnittest::AccessTest(){
-  RealSpaceMatrix mat;
-  for(int i=NDIM;i--;){
-    for(int j=NDIM;j--;){
-      CPPUNIT_ASSERT_EQUAL(mat.at(i,j),0.);
-    }
-  }
-  int k=1;
-  for(int i=NDIM;i--;){
-    for(int j=NDIM;j--;){
-      mat.at(i,j)=k++;
-    }
-  }
-  k=1;
-  for(int i=NDIM;i--;){
-    for(int j=NDIM;j--;){
-      CPPUNIT_ASSERT_EQUAL(mat.at(i,j),(double)k);
-      ++k;
-    }
-  }
-}
-
-void MatrixUnittest::VectorTest(){
-  RealSpaceMatrix mat;
-  for(int i=NDIM;i--;){
-    CPPUNIT_ASSERT_EQUAL(mat.row(i),zeroVec);
-    CPPUNIT_ASSERT_EQUAL(mat.column(i),zeroVec);
-  }
-  CPPUNIT_ASSERT_EQUAL(mat.diagonal(),zeroVec);
-
-  mat.setIdentity();
-  CPPUNIT_ASSERT_EQUAL(mat.row(0),unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(mat.row(1),unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(mat.row(2),unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(mat.column(0),unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(mat.column(1),unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(mat.column(2),unitVec[2]);
-
-  Vector t1=Vector(1.,1.,1.);
-  Vector t2=Vector(2.,2.,2.);
-  Vector t3=Vector(3.,3.,3.);
-  Vector t4=Vector(1.,2.,3.);
-
-  mat.row(0)=t1;
-  mat.row(1)=t2;
-  mat.row(2)=t3;
-  CPPUNIT_ASSERT_EQUAL(mat.row(0),t1);
-  CPPUNIT_ASSERT_EQUAL(mat.row(1),t2);
-  CPPUNIT_ASSERT_EQUAL(mat.row(2),t3);
-  CPPUNIT_ASSERT_EQUAL(mat.column(0),t4);
-  CPPUNIT_ASSERT_EQUAL(mat.column(1),t4);
-  CPPUNIT_ASSERT_EQUAL(mat.column(2),t4);
-  CPPUNIT_ASSERT_EQUAL(mat.diagonal(),t4);
-  for(int i=NDIM;i--;){
-    for(int j=NDIM;j--;){
-      CPPUNIT_ASSERT_EQUAL(mat.at(i,j),i+1.);
-    }
-  }
-
-  mat.column(0)=t1;
-  mat.column(1)=t2;
-  mat.column(2)=t3;
-  CPPUNIT_ASSERT_EQUAL(mat.column(0),t1);
-  CPPUNIT_ASSERT_EQUAL(mat.column(1),t2);
-  CPPUNIT_ASSERT_EQUAL(mat.column(2),t3);
-  CPPUNIT_ASSERT_EQUAL(mat.row(0),t4);
-  CPPUNIT_ASSERT_EQUAL(mat.row(1),t4);
-  CPPUNIT_ASSERT_EQUAL(mat.row(2),t4);
-  CPPUNIT_ASSERT_EQUAL(mat.diagonal(),t4);
-  for(int i=NDIM;i--;){
-    for(int j=NDIM;j--;){
-      CPPUNIT_ASSERT_EQUAL(mat.at(i,j),j+1.);
-    }
-  }
-}
-
-void MatrixUnittest::TransposeTest(){
-  RealSpaceMatrix res;
-
-  // transpose of unit is unit
-  res.setIdentity();
-  res.transpose();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-
-  // transpose of transpose is same matrix
-  res.setZero();
-  res.set(2,2, 1.);
-  CPPUNIT_ASSERT_EQUAL(res.transpose().transpose(),res);
-}
-
-void MatrixUnittest::OperationTest(){
-  RealSpaceMatrix res;
-
-  res =(*zero) *(*zero);
-  //std::cout << *zero << " times " << *zero << " is " << res << std::endl;
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*one);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*full);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*diagonal);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*perm1);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*perm2);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*perm3);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*perm4);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-  res =(*zero) *(*perm5);
-  CPPUNIT_ASSERT_EQUAL(res,*zero);
-
-  res =(*one)*(*one);
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-  res =(*one)*(*full);
-  CPPUNIT_ASSERT_EQUAL(res,*full);
-  res =(*one)*(*diagonal);
-  CPPUNIT_ASSERT_EQUAL(res,*diagonal);
-  res =(*one)*(*perm1);
-  CPPUNIT_ASSERT_EQUAL(res,*perm1);
-  res =(*one)*(*perm2);
-  CPPUNIT_ASSERT_EQUAL(res,*perm2);
-  res =(*one)*(*perm3);
-  CPPUNIT_ASSERT_EQUAL(res,*perm3);
-  res =(*one)*(*perm4);
-  CPPUNIT_ASSERT_EQUAL(res,*perm4);
-  res =(*one)*(*perm5);
-  CPPUNIT_ASSERT_EQUAL(res,*perm5);
-
-  res = (*full)*(*perm1);
-  CPPUNIT_ASSERT_EQUAL(res,*full);
-  res = (*full)*(*perm2);
-  CPPUNIT_ASSERT_EQUAL(res,*full);
-  res = (*full)*(*perm3);
-  CPPUNIT_ASSERT_EQUAL(res,*full);
-  res = (*full)*(*perm4);
-  CPPUNIT_ASSERT_EQUAL(res,*full);
-  res = (*full)*(*perm5);
-  CPPUNIT_ASSERT_EQUAL(res,*full);
-
-  res = (*diagonal)*(*perm1);
-  CPPUNIT_ASSERT_EQUAL(res.column(0),unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(res.column(1),3*unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(res.column(2),2*unitVec[1]);
-  res = (*diagonal)*(*perm2);
-  CPPUNIT_ASSERT_EQUAL(res.column(0),2*unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(res.column(1),unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(res.column(2),3*unitVec[2]);
-  res = (*diagonal)*(*perm3);
-  CPPUNIT_ASSERT_EQUAL(res.column(0),2*unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(res.column(1),3*unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(res.column(2),unitVec[0]);
-  res = (*diagonal)*(*perm4);
-  CPPUNIT_ASSERT_EQUAL(res.column(0),3*unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(res.column(1),2*unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(res.column(2),unitVec[0]);
-  res = (*diagonal)*(*perm5);
-  CPPUNIT_ASSERT_EQUAL(res.column(0),3*unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(res.column(1),unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(res.column(2),2*unitVec[1]);
-}
-
-void MatrixUnittest::RotationTest(){
-  RealSpaceMatrix res;
-  RealSpaceMatrix inverse;
-
-  // zero rotation angles yields unity matrix
-  res.setRotation(0,0,0);
-  CPPUNIT_ASSERT_EQUAL(*one, res);
-
-  // arbitrary rotation matrix has det = 1
-  res.setRotation(M_PI/3.,1.,M_PI/7.);
-  CPPUNIT_ASSERT(fabs(res.determinant() - 1.) <= LINALG_MYEPSILON());
-
-  // inverse is rotation matrix with negative angles
-  res.setRotation(M_PI/3.,0.,0.);
-  inverse.setRotation(-M_PI/3.,0.,0.);
-  CPPUNIT_ASSERT_EQUAL(*one, res * inverse);
-
-  // ... or transposed
-  res.setRotation(M_PI/3.,0.,0.);
-  CPPUNIT_ASSERT_EQUAL(inverse, ((const RealSpaceMatrix) res).transpose());
-}
-
-void MatrixUnittest::InvertTest(){
-  CPPUNIT_ASSERT_THROW(zero->invert(),NotInvertibleException);
-  CPPUNIT_ASSERT_THROW(full->invert(),NotInvertibleException);
-
-  RealSpaceMatrix res;
-  res = (*one)*one->invert();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-  res = (*diagonal)*diagonal->invert();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-  res = (*perm1)*perm1->invert();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-  res = (*perm2)*perm2->invert();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-  res = (*perm3)*perm3->invert();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-  res = (*perm4)*perm4->invert();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-  res = (*perm5)*perm5->invert();
-  CPPUNIT_ASSERT_EQUAL(res,*one);
-}
-
-
-void MatrixUnittest::DeterminantTest(){
-  CPPUNIT_ASSERT_EQUAL(zero->determinant(),0.);
-  CPPUNIT_ASSERT_EQUAL(one->determinant(),1.);
-  CPPUNIT_ASSERT_EQUAL(diagonal->determinant(),6.);
-  CPPUNIT_ASSERT_EQUAL(full->determinant(),0.);
-  CPPUNIT_ASSERT_EQUAL(perm1->determinant(),-1.);
-  CPPUNIT_ASSERT_EQUAL(perm2->determinant(),-1.);
-  CPPUNIT_ASSERT_EQUAL(perm3->determinant(),1.);
-  CPPUNIT_ASSERT_EQUAL(perm4->determinant(),-1.);
-  CPPUNIT_ASSERT_EQUAL(perm5->determinant(),1.);
-}
-
-void MatrixUnittest::VecMultTest(){
-  CPPUNIT_ASSERT_EQUAL((*zero)*unitVec[0],zeroVec);
-  CPPUNIT_ASSERT_EQUAL((*zero)*unitVec[1],zeroVec);
-  CPPUNIT_ASSERT_EQUAL((*zero)*unitVec[2],zeroVec);
-  CPPUNIT_ASSERT_EQUAL((*zero)*zeroVec,zeroVec);
-
-  CPPUNIT_ASSERT_EQUAL((*one)*unitVec[0],unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL((*one)*unitVec[1],unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL((*one)*unitVec[2],unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL((*one)*zeroVec,zeroVec);
-
-  CPPUNIT_ASSERT_EQUAL((*diagonal)*unitVec[0],unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL((*diagonal)*unitVec[1],2*unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL((*diagonal)*unitVec[2],3*unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL((*diagonal)*zeroVec,zeroVec);
-
-  CPPUNIT_ASSERT_EQUAL((*perm1)*unitVec[0],unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL((*perm1)*unitVec[1],unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL((*perm1)*unitVec[2],unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL((*perm1)*zeroVec,zeroVec);
-
-  CPPUNIT_ASSERT_EQUAL((*perm2)*unitVec[0],unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL((*perm2)*unitVec[1],unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL((*perm2)*unitVec[2],unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL((*perm2)*zeroVec,zeroVec);
-
-  CPPUNIT_ASSERT_EQUAL((*perm3)*unitVec[0],unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL((*perm3)*unitVec[1],unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL((*perm3)*unitVec[2],unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL((*perm3)*zeroVec,zeroVec);
-
-  CPPUNIT_ASSERT_EQUAL((*perm4)*unitVec[0],unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL((*perm4)*unitVec[1],unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL((*perm4)*unitVec[2],unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL((*perm4)*zeroVec,zeroVec);
-
-  CPPUNIT_ASSERT_EQUAL((*perm5)*unitVec[0],unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL((*perm5)*unitVec[1],unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL((*perm5)*unitVec[2],unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL((*perm5)*zeroVec,zeroVec);
-
-  Vector t = Vector(1.,2.,3.);
-  CPPUNIT_ASSERT_EQUAL((*perm1)*t,Vector(1,3,2));
-  CPPUNIT_ASSERT_EQUAL((*perm2)*t,Vector(2,1,3));
-  CPPUNIT_ASSERT_EQUAL((*perm3)*t,Vector(3,1,2));
-  CPPUNIT_ASSERT_EQUAL((*perm4)*t,Vector(3,2,1));
-  CPPUNIT_ASSERT_EQUAL((*perm5)*t,Vector(2,3,1));
-}
Index: src/LinearAlgebra/unittests/MatrixUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/MatrixUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * MatrixUnitTest.hpp
- *
- *  Created on: Jul 7, 2010
- *      Author: crueger
- */
-
-#ifndef MATRIXUNITTEST_HPP_
-#define MATRIXUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-class RealSpaceMatrix;
-
-class MatrixUnittest : public CppUnit::TestFixture
-{
-  CPPUNIT_TEST_SUITE( MatrixUnittest) ;
-  CPPUNIT_TEST ( AccessTest );
-  CPPUNIT_TEST ( VectorTest );
-  CPPUNIT_TEST ( OperationTest );
-  CPPUNIT_TEST ( TransposeTest );
-  CPPUNIT_TEST ( RotationTest );
-  CPPUNIT_TEST ( InvertTest );
-  CPPUNIT_TEST ( DeterminantTest );
-  CPPUNIT_TEST ( VecMultTest );
-  CPPUNIT_TEST_SUITE_END();
-
-public:
-  void setUp();
-  void tearDown();
-
-  void AccessTest();
-  void VectorTest();
-  void OperationTest();
-  void TransposeTest();
-  void RotationTest();
-  void InvertTest();
-  void DeterminantTest();
-  void VecMultTest();
-
-  RealSpaceMatrix *zero;
-  RealSpaceMatrix *one;
-  RealSpaceMatrix *full;
-  RealSpaceMatrix *diagonal;
-  RealSpaceMatrix *perm1;
-  RealSpaceMatrix *perm2;
-  RealSpaceMatrix *perm3;
-  RealSpaceMatrix *perm4;
-  RealSpaceMatrix *perm5;
-};
-
-#endif /* MATRIXUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/PlaneUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/PlaneUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,233 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * PlaneUnittest.cpp
- *
- *  Created on: Apr 30, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include <cmath>
-#include <limits>
-
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Exceptions.hpp"
-#include "LinearAlgebra/Line.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-#include "PlaneUnitTest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-CPPUNIT_TEST_SUITE_REGISTRATION( PlaneUnittest );
-
-void PlaneUnittest::setUp(){
-  p1 = new Plane(unitVec[0],unitVec[1],unitVec[2]);
-  p2 = new Plane(unitVec[0],unitVec[1],zeroVec);
-  p3 = new Plane(unitVec[0],zeroVec,unitVec[2]);
-  p4 = new Plane(zeroVec,unitVec[1],unitVec[2]);
-}
-
-void PlaneUnittest::tearDown(){
-  delete p1;
-  delete p2;
-  delete p3;
-  delete p4;
-}
-
-void PlaneUnittest::constructionErrorTest(){
-  // try several method of construction..
-  // see if error checking works
-
-  // three points
-  CPPUNIT_ASSERT_NO_THROW(Plane(unitVec[0],unitVec[1],unitVec[2]));
-  // when only two points are differnt this gives an error
-  CPPUNIT_ASSERT_THROW(Plane(unitVec[0],unitVec[1],unitVec[1]),LinearDependenceException);
-  // same with only one point
-  CPPUNIT_ASSERT_THROW(Plane(unitVec[0],unitVec[0],unitVec[0]),LinearDependenceException);
-
-  // use two vector giving two directions
-  CPPUNIT_ASSERT_NO_THROW(Plane(unitVec[0],unitVec[1],0));
-  // and again this is actually only one vector
-  CPPUNIT_ASSERT_THROW(Plane(unitVec[0],unitVec[0],0),LinearDependenceException);
-  // Zero vector does not give a good direction
-  CPPUNIT_ASSERT_THROW(Plane(unitVec[0],zeroVec,0),ZeroVectorException);
-
-  // use a normalvector and an scalar offset
-  CPPUNIT_ASSERT_NO_THROW(Plane(unitVec[0],0));
-  // The zero vector is no good as a normalvector
-  CPPUNIT_ASSERT_THROW(Plane(zeroVec,0),ZeroVectorException);
-
-  // use a normalvector and an offset vector
-  CPPUNIT_ASSERT_NO_THROW(Plane(unitVec[0],zeroVec));
-  // and the bad zeroVector again
-  CPPUNIT_ASSERT_THROW(Plane(zeroVec,zeroVec),ZeroVectorException);
-}
-
-
-// we need to test normals independent of the direction
-bool testNormal(const Vector &normal1, const Vector &normal2){
-  return (normal1==normal2) || (normal1==-1*normal2);
-}
-
-void PlaneUnittest::constructionResultTest(){
-  {
-    // construct with three points on plane
-    Plane p1(unitVec[0],unitVec[1],zeroVec);
-    CPPUNIT_ASSERT(testNormal(unitVec[2],p1.getNormal()));
-    CPPUNIT_ASSERT_EQUAL(0.,p1.getOffset());
-
-    Plane p2(unitVec[0],unitVec[2],zeroVec);
-    CPPUNIT_ASSERT(testNormal(unitVec[1],p2.getNormal()));
-    CPPUNIT_ASSERT_EQUAL(0.,p2.getOffset());
-
-    Plane p3(unitVec[1],unitVec[2],zeroVec);
-    CPPUNIT_ASSERT(testNormal(unitVec[0],p3.getNormal()));
-    CPPUNIT_ASSERT_EQUAL(0.,p3.getOffset());
-  }
-  {
-    // construct with two directions + offset
-    Plane p1(unitVec[0],unitVec[1],0);
-    CPPUNIT_ASSERT(testNormal(unitVec[2],p1.getNormal()));
-    CPPUNIT_ASSERT_EQUAL(0.,p1.getOffset());
-
-    Plane p2(unitVec[0],unitVec[2],0);
-    CPPUNIT_ASSERT(testNormal(unitVec[1],p2.getNormal()));
-    CPPUNIT_ASSERT_EQUAL(0.,p2.getOffset());
-
-    Plane p3(unitVec[1],unitVec[2],0);
-    CPPUNIT_ASSERT(testNormal(unitVec[0],p3.getNormal()));
-    CPPUNIT_ASSERT_EQUAL(0.,p3.getOffset());
-  }
-}
-
-void PlaneUnittest::pointsTest(){
-  std::vector<Vector> points1 = p1->getPointsOnPlane();
-  CPPUNIT_ASSERT(p1->isContained(points1[0]));
-  CPPUNIT_ASSERT(p1->isContained(points1[1]));
-  CPPUNIT_ASSERT(p1->isContained(points1[2]));
-  // check that the three points differ
-  CPPUNIT_ASSERT(points1[0]!=points1[1]);
-  CPPUNIT_ASSERT(points1[0]!=points1[2]);
-  CPPUNIT_ASSERT(points1[1]!=points1[2]);
-
-
-  std::vector<Vector> points2 = p2->getPointsOnPlane();
-  CPPUNIT_ASSERT(p2->isContained(points2[0]));
-  CPPUNIT_ASSERT(p2->isContained(points2[1]));
-  CPPUNIT_ASSERT(p2->isContained(points2[2]));
-  // check that the three points differ
-  CPPUNIT_ASSERT(points2[0]!=points2[1]);
-  CPPUNIT_ASSERT(points2[0]!=points2[2]);
-  CPPUNIT_ASSERT(points2[1]!=points2[2]);
-
-  std::vector<Vector> points3 = p3->getPointsOnPlane();
-  CPPUNIT_ASSERT(p3->isContained(points3[0]));
-  CPPUNIT_ASSERT(p3->isContained(points3[1]));
-  CPPUNIT_ASSERT(p3->isContained(points3[2]));
-  // check that the three points differ
-  CPPUNIT_ASSERT(points3[0]!=points3[1]);
-  CPPUNIT_ASSERT(points3[0]!=points3[2]);
-  CPPUNIT_ASSERT(points3[1]!=points3[2]);
-
-  std::vector<Vector> points4 = p4->getPointsOnPlane();
-  CPPUNIT_ASSERT(p4->isContained(points4[0]));
-  CPPUNIT_ASSERT(p4->isContained(points4[1]));
-  CPPUNIT_ASSERT(p4->isContained(points4[2]));
-  // check that the three points differ
-  CPPUNIT_ASSERT(points4[0]!=points4[1]);
-  CPPUNIT_ASSERT(points4[0]!=points4[2]);
-  CPPUNIT_ASSERT(points4[1]!=points4[2]);
-}
-
-
-void PlaneUnittest::operationsTest(){
-  {
-    Vector t = (1./3.)*(unitVec[0]+unitVec[1]+unitVec[2]);
-    CPPUNIT_ASSERT(fabs(p1->distance(zeroVec)-t.Norm()) <= LINALG_MYEPSILON());
-    CPPUNIT_ASSERT_EQUAL(t,p1->getClosestPoint(zeroVec));
-  }
-
-  CPPUNIT_ASSERT(fabs(p2->distance(unitVec[2])-1) <= LINALG_MYEPSILON());
-  CPPUNIT_ASSERT_EQUAL(zeroVec,p2->getClosestPoint(unitVec[2]));
-  CPPUNIT_ASSERT(fabs(p3->distance(unitVec[1])-1) <= LINALG_MYEPSILON());
-  CPPUNIT_ASSERT_EQUAL(zeroVec,p3->getClosestPoint(unitVec[1]));
-  CPPUNIT_ASSERT(fabs(p4->distance(unitVec[0])-1) <= LINALG_MYEPSILON());
-  CPPUNIT_ASSERT_EQUAL(zeroVec,p4->getClosestPoint(unitVec[0]));
-}
-
-void PlaneUnittest::mirrorTest(){
-  Vector fixture;
-
-  // some Vectors that lie on the planes
-  fixture = p1->mirrorVector(unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = p1->mirrorVector(unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = p1->mirrorVector(unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  fixture = p2->mirrorVector(zeroVec);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = p2->mirrorVector(unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = p2->mirrorVector(unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-
-  fixture = p3->mirrorVector(zeroVec);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = p3->mirrorVector(unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[0]);
-  fixture = p3->mirrorVector(unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  fixture = p4->mirrorVector(zeroVec);
-  CPPUNIT_ASSERT_EQUAL(fixture,zeroVec);
-  fixture = p4->mirrorVector(unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[1]);
-  fixture = p4->mirrorVector(unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(fixture,unitVec[2]);
-
-  // some Vectors outside of the planes
-  {
-    Vector t = (2./3.)*(unitVec[0]+unitVec[1]+unitVec[2]);
-    fixture = p1->mirrorVector(zeroVec);
-    CPPUNIT_ASSERT_EQUAL(fixture,t);
-  }
-
-  fixture = p2->mirrorVector(unitVec[2]);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[2]);
-  fixture = p3->mirrorVector(unitVec[1]);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[1]);
-  fixture = p4->mirrorVector(unitVec[0]);
-  CPPUNIT_ASSERT_EQUAL(fixture,-1*unitVec[0]);
-}
-
-void PlaneUnittest::LineIntersectionTest(){
-  Vector fixture;
-  // plane at (0,0,0) normal to (1,0,0) cuts line from (0,0,0) to (2,1,0) at ???
-  Line l1 = makeLineThrough(zeroVec,Vector(2,1,0));
-  CPPUNIT_ASSERT_NO_THROW(fixture = Plane(unitVec[0], zeroVec).GetIntersection(l1) );
-  CPPUNIT_ASSERT_EQUAL( zeroVec, fixture );
-
-  // plane at (2,1,0) normal to (0,1,0) cuts line from (1,0,0) to (0,1,1) at ???
-  Line l2 = makeLineThrough(unitVec[0],Vector(0,1,1));
-  CPPUNIT_ASSERT_NO_THROW(fixture = Plane(unitVec[1], Vector(2,1,0)).GetIntersection(l2) );
-  CPPUNIT_ASSERT_EQUAL( Vector(0., 1., 1.), fixture );
-}
Index: src/LinearAlgebra/unittests/PlaneUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/PlaneUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * PlaneUnittest.hpp
- *
- *  Created on: Apr 30, 2010
- *      Author: crueger
- */
-
-#ifndef PLANEUNITTEST_HPP_
-#define PLANEUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/Plane.hpp"
-
-class PlaneUnittest : public CppUnit::TestFixture
-{
-  CPPUNIT_TEST_SUITE( PlaneUnittest) ;
-  CPPUNIT_TEST ( constructionErrorTest );
-  CPPUNIT_TEST ( constructionResultTest );
-  CPPUNIT_TEST ( pointsTest );
-  CPPUNIT_TEST ( operationsTest );
-  CPPUNIT_TEST ( mirrorTest );
-  CPPUNIT_TEST ( LineIntersectionTest );
-  CPPUNIT_TEST_SUITE_END();
-
-public:
-  void setUp();
-  void tearDown();
-
-  void constructionErrorTest();
-  void constructionResultTest();
-  void pointsTest();
-  void operationsTest();
-  void mirrorTest();
-  void LineIntersectionTest();
-
-private:
-  Plane *p1;
-  Plane *p2;
-  Plane *p3;
-  Plane *p4;
-};
-
-#endif /* PLANEUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/VectorContentUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/VectorContentUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,176 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * VectorContentUnittest.cpp
- *
- *  Created on: Jan 8, 2010
- *      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 "VectorContentUnitTest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( VectorContentTest );
-
-
-void VectorContentTest::setUp()
-{
-  v = new VectorContent(3);
-};
-
-void VectorContentTest::tearDown()
-{
-  delete(v);
-};
-
-/** Unit test for accessing elements in the vector.
- *
- */
-void VectorContentTest::AccessTest()
-{
-  // set
-  for (int i=0;i<3;i++)
-    v->at(i) = (double)i;
-
-  // and check
-  double *ptr = NULL;
-  for (int i=0;i<3;i++) {
-    CPPUNIT_ASSERT_EQUAL( (double)i, v->at(i) );
-    ptr = v->Pointer(i);
-    CPPUNIT_ASSERT_EQUAL( (double)i, *ptr );
-  }
-
-  // out of bounds
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(3) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1) );
-};
-
-
-/** Unit test for initializing the vector.
- *
- */
-void VectorContentTest::InitializaionTest()
-{
-  // set zero
-  v->setZero();
-  for (int i=0;i<3;i++)
-    CPPUNIT_ASSERT_EQUAL( 0., v->at(i) );
-
-  // set basis
-  for (int i=0;i<3;i++) {
-    v->setBasis(i);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , v->at(j) );
-  }
-
-  // set all
-  v->setValue(1.5);
-  for (int i=0;i<3;i++)
-    CPPUNIT_ASSERT_EQUAL( 1.5, v->at(i) );
-};
-
-/** Unit test for copying vectors.
- *
- */
-void VectorContentTest::CopyTest()
-{
-  // set basis
-  VectorContent *dest = NULL;
-  for (int i=0;i<3;i++) {
-    v->setBasis(i);
-    dest = new VectorContent(v);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( v->at(j) , dest->at(j) );
-
-    delete(dest);
-  }
-};
-
-/** Unit test for exchanging elements of a vector.
- *
- */
-void VectorContentTest::ExchangeTest()
-{
-  // set basis
-  for (int i=0;i<3;i++) {
-    v->setBasis(i);
-    v->SwapElements((i)%3,(i+1)%3);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (i+1)%3 == j ? 1. : 0. , v->at(j) );
-  }
-
-  // set to 1,2,3 and reverse
-  for (int i=0;i<3;i++)
-    v->at(i) = (double)(i+1);
-  v->Reverse();
-  for (int j=0;j<3;j++)
-    CPPUNIT_ASSERT_EQUAL( (double)(3-j), v->at(j) );
-};
-
-/** UnitTest for operators.
- */
-void VectorContentTest::OperatorIsTest()
-{
-  VectorContent zero(3);
-  VectorContent unit(3);
-  zero.setZero();
-  unit.setZero();
-  unit[1] = 1.;
-  // summation and scaling
-  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, zero.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, unit.IsZero() );
-  CPPUNIT_ASSERT_EQUAL( true, zero.IsZero() );
-};
-
-/** UnitTest for operators.
- */
-void VectorContentTest::OperatorAlgebraTest()
-{
-  VectorContent zero(3);
-  VectorContent unit(3);
-  zero.setZero();
-  unit.setZero();
-  unit[1] = 1.;
-  // summation and scaling
-  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero-unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, (zero-unit).IsZero() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero+zero).IsZero() );
-  CPPUNIT_ASSERT_EQUAL( false, (unit*0.98).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, (0.98*unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (unit*1.).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (1.*unit).IsOne() );
-
-  CPPUNIT_ASSERT_EQUAL( unit, (zero+unit) );
-  CPPUNIT_ASSERT_EQUAL( zero, (zero+zero) );
-  CPPUNIT_ASSERT_EQUAL( unit, (unit+zero) );
-
-  unit += zero;
-  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
-  unit *= 1.;
-  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
-};
Index: src/LinearAlgebra/unittests/VectorContentUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/VectorContentUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * VectorContentUnittest.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef VECTORCONTENTUNITTEST_HPP_
-#define VECTORCONTENTUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/VectorContent.hpp"
-
-/********************************************** Test classes **************************************/
-
-class VectorContentTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( VectorContentTest) ;
-    CPPUNIT_TEST (AccessTest );
-    CPPUNIT_TEST (InitializaionTest );
-    CPPUNIT_TEST (CopyTest );
-    CPPUNIT_TEST (ExchangeTest );
-    CPPUNIT_TEST (OperatorAlgebraTest );
-    CPPUNIT_TEST (OperatorIsTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void AccessTest();
-    void InitializaionTest();
-    void CopyTest();
-    void ExchangeTest();
-    void OperatorIsTest();
-    void OperatorAlgebraTest();
-
-private:
-
-    VectorContent *v;
-};
-
-
-#endif /* VECTORCONTENTUNITTEST_HPP_ */
Index: src/LinearAlgebra/unittests/VectorUnitTest.cpp
===================================================================
--- src/LinearAlgebra/unittests/VectorUnitTest.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,275 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * unittest.cpp
- *
- *  Created on: Aug 17, 2009
- *      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 <limits>
-
-#include "CodePatterns/Log.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/Plane.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "LinearAlgebra/Vector.hpp"
-#include "LinearAlgebra/vector_ops.hpp"
-
-#include "VectorUnitTest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-#include <iostream>
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( VectorTest );
-
-
-void VectorTest::setUp()
-{
-  zero  = Vector(0.,0.,0.);
-  unit = Vector(1.,0.,0.);
-  otherunit = Vector(0.,1.,0.);
-  notunit = Vector(0.,1.,1.);
-  two = Vector(2.,1.,0.);
-  three = Vector(1,2,3);
-};
-
-
-void VectorTest::tearDown()
-{
-  logger::purgeInstance();
-  errorLogger::purgeInstance();
-};
-
-/** UnitTest for Constructors and Vector::IsZero() and Vector::IsOne().
- */
-void VectorTest::AssignmentTest()
-{
-  // test with zero
-  zero.at(0) = 0;
-  zero.at(1) = 0;
-  zero.at(2) = 0;
-  double zero_array[3] = {0., 0., 0.};
-
-  CPPUNIT_ASSERT_EQUAL( zero, Vector(0,0,0));
-  CPPUNIT_ASSERT_EQUAL( zero, Vector(0.,0.,0.));
-  CPPUNIT_ASSERT_EQUAL( zero, Vector(zero_array[0], zero_array[1], zero_array[2]));
-  CPPUNIT_ASSERT_EQUAL( zero, Vector(zero_array));
-
-  // test with unit
-  unit.at(0) = 1;
-  unit.at(1) = 0;
-  unit.at(2) = 0;
-  double unit_array[3] = {1., 0., 0.};
-
-  CPPUNIT_ASSERT_EQUAL( unit, Vector(1,0,0));
-  CPPUNIT_ASSERT_EQUAL( unit, Vector(1.,0.,0.));
-  CPPUNIT_ASSERT_EQUAL( unit, Vector(unit_array[0], unit_array[1], unit_array[2]));
-  CPPUNIT_ASSERT_EQUAL( unit, Vector(unit_array));
-
-  // test with two
-  two.at(0) = 2;
-  two.at(1) = 1;
-  two.at(2) = 0;
-  double two_array[3] = {2., 1., 0.};
-
-  CPPUNIT_ASSERT_EQUAL( two, Vector(2,1,0));
-  CPPUNIT_ASSERT_EQUAL( two, Vector(2.,1.,0.));
-  CPPUNIT_ASSERT_EQUAL( two, Vector(two_array[0], two_array[1], two_array[2]));
-  CPPUNIT_ASSERT_EQUAL( two, Vector(two_array));
-
-  // test with three
-  three.at(0) = 1;
-  three.at(1) = 2;
-  three.at(2) = 3;
-  double three_array[3] = {1., 2., 3.};
-
-  CPPUNIT_ASSERT_EQUAL( three, Vector(1,2,3));
-  CPPUNIT_ASSERT_EQUAL( three, Vector(1.,2.,3.));
-  CPPUNIT_ASSERT_EQUAL( three, Vector(three_array[0], three_array[1], three_array[2]));
-  CPPUNIT_ASSERT_EQUAL( three, Vector(three_array));
-}
-
-/** UnitTest for Constructors and Vector::IsZero() and Vector::IsOne().
- */
-void VectorTest::UnityTest()
-{
-  // unity and zero tests
-  CPPUNIT_ASSERT_EQUAL( true, zero.IsZero() );
-  CPPUNIT_ASSERT_EQUAL( false, zero.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, unit.IsZero() );
-  CPPUNIT_ASSERT_EQUAL( true, unit.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, notunit.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, otherunit.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, otherunit.IsZero() );
-};
-
-/** UnitTest for Vector::CopyVector(), Vector::AddVector, Vector::SubtractVector() and Vector::Scale()/
- */
-void VectorTest::SimpleAlgebraTest()
-{
-  double factor;
-  // copy vector
-  fixture = Vector(2.,3.,4.);
-  CPPUNIT_ASSERT_EQUAL( Vector(2.,3.,4.), fixture );
-  // summation and scaling
-  fixture = zero + unit;
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsOne() );
-  fixture = zero - unit;
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsZero() );
-  fixture = zero + zero;
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsZero() );
-  fixture = notunit - otherunit;
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsOne() );
-  fixture = unit - otherunit;
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsOne() );
-  fixture = notunit - unit - otherunit;
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsZero() );
-  fixture = 0.98 * unit;
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsOne() );
-  fixture = 1. * unit;
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsOne() );
-  factor = 0.98;
-  fixture = factor * unit;
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsOne() );
-  factor = 1.;
-  fixture = factor * unit;
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsOne() );
-};
-
-
-/** UnitTest for operator versions of Vector::CopyVector(), Vector::AddVector, Vector::SubtractVector() and Vector::Scale().
- */
-void VectorTest::OperatorAlgebraTest()
-{
-  // summation and scaling
-  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero+unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero-unit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, (zero-unit).IsZero() );
-  CPPUNIT_ASSERT_EQUAL( true, (zero+zero).IsZero() );
-  CPPUNIT_ASSERT_EQUAL( true, (notunit-otherunit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, (unit+otherunit).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( false, (notunit-unit-otherunit).IsZero() );
-  CPPUNIT_ASSERT_EQUAL( false, (unit*0.98).IsOne() );
-  CPPUNIT_ASSERT_EQUAL( true, (unit*1.).IsOne() );
-
-  CPPUNIT_ASSERT_EQUAL( unit, (zero+unit) );
-  CPPUNIT_ASSERT_EQUAL( Vector(0.,0.,1.), (notunit-otherunit) );
-  CPPUNIT_ASSERT_EQUAL( Vector(-1, 0., 1.), (notunit-unit-otherunit) );
-};
-
-/** UnitTest for scalar products.
- */
-void VectorTest::EuclidianScalarProductTest()
-{
-  CPPUNIT_ASSERT_EQUAL( 0., zero.ScalarProduct(zero) );
-  CPPUNIT_ASSERT_EQUAL( 0., zero.ScalarProduct(unit) );
-  CPPUNIT_ASSERT_EQUAL( 0., zero.ScalarProduct(otherunit) );
-  CPPUNIT_ASSERT_EQUAL( 0., zero.ScalarProduct(notunit) );
-  CPPUNIT_ASSERT_EQUAL( 1., unit.ScalarProduct(unit) );
-  CPPUNIT_ASSERT_EQUAL( 0., otherunit.ScalarProduct(unit) );
-  CPPUNIT_ASSERT_EQUAL( 0., otherunit.ScalarProduct(unit) );
-  CPPUNIT_ASSERT_EQUAL( 1., otherunit.ScalarProduct(notunit) );
-  CPPUNIT_ASSERT_EQUAL( 2., two.ScalarProduct(unit) );
-  CPPUNIT_ASSERT_EQUAL( 1., two.ScalarProduct(otherunit) );
-  CPPUNIT_ASSERT_EQUAL( 1., two.ScalarProduct(notunit) );
-}
-
-/** UnitTest for norms.
- */
-void VectorTest::EuclidianNormTest()
-{
-  CPPUNIT_ASSERT_EQUAL( 0., zero.Norm() );
-  CPPUNIT_ASSERT_EQUAL( 0., zero.NormSquared() );
-  CPPUNIT_ASSERT_EQUAL( 1., unit.Norm() );
-  CPPUNIT_ASSERT_EQUAL( 1., unit.NormSquared() );
-  CPPUNIT_ASSERT_EQUAL( 1., otherunit.Norm() );
-  CPPUNIT_ASSERT_EQUAL( 1., otherunit.NormSquared() );
-  CPPUNIT_ASSERT_EQUAL( 2., notunit.NormSquared() );
-  CPPUNIT_ASSERT_EQUAL( sqrt(2.), notunit.Norm() );
-}
-
-/** UnitTest for distances.
- */
-void VectorTest::EuclidianDistancesTest()
-{
-  CPPUNIT_ASSERT_EQUAL( 1., zero.distance(unit) );
-  CPPUNIT_ASSERT_EQUAL( sqrt(2.), otherunit.distance(unit) );
-  CPPUNIT_ASSERT_EQUAL( sqrt(2.), zero.distance(notunit) );
-  CPPUNIT_ASSERT_EQUAL( 1., otherunit.distance(notunit) );
-  CPPUNIT_ASSERT_EQUAL( sqrt(5.), two.distance(notunit) );
-}
-
-/** UnitTest for angles.
- */
-void VectorTest::EuclidianAnglesTest()
-{
-  CPPUNIT_ASSERT_EQUAL( M_PI, zero.Angle(unit) );
-  CPPUNIT_ASSERT_EQUAL( 0., unit.Angle(unit) );
-  CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/2. - otherunit.Angle(unit)) <= LINALG_MYEPSILON() );
-  CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/2. - unit.Angle(notunit)) <= LINALG_MYEPSILON() );
-  CPPUNIT_ASSERT_EQUAL( true, fabs(M_PI/4. - otherunit.Angle(notunit)) <= LINALG_MYEPSILON() );
-};
-
-/** UnitTest for projections.
- */
-void VectorTest::ProjectionTest()
-{
-  CPPUNIT_ASSERT_EQUAL( zero, zero.Projection(unit) );
-  CPPUNIT_ASSERT_EQUAL( zero, otherunit.Projection(unit) );
-  CPPUNIT_ASSERT_EQUAL( Vector(0.4,0.2,0.),  otherunit.Projection(two) );
-  CPPUNIT_ASSERT_EQUAL( Vector(0.,1.,0.),  two.Projection(otherunit) );
-};
-
-/**
- * Unittest for operation with normals
- */
-void VectorTest::NormalsTest(){
-  Vector testVector;
-  // the zero Vector should produce an error
-  CPPUNIT_ASSERT(!testVector.GetOneNormalVector(zero));
-
-  // first one-component system
-  CPPUNIT_ASSERT(testVector.GetOneNormalVector(unit));
-  CPPUNIT_ASSERT(testVector.ScalarProduct(unit) <= LINALG_MYEPSILON());
-
-  // second one-component system
-  CPPUNIT_ASSERT(testVector.GetOneNormalVector(otherunit));
-  CPPUNIT_ASSERT(testVector.ScalarProduct(otherunit) <= LINALG_MYEPSILON());
-
-  // first two-component system
-  CPPUNIT_ASSERT(testVector.GetOneNormalVector(notunit));
-  CPPUNIT_ASSERT(testVector.ScalarProduct(notunit) <= LINALG_MYEPSILON());
-
-  // second two-component system
-  CPPUNIT_ASSERT(testVector.GetOneNormalVector(two));
-  CPPUNIT_ASSERT(testVector.ScalarProduct(two) <= LINALG_MYEPSILON());
-
-  // three component system
-  CPPUNIT_ASSERT(testVector.GetOneNormalVector(three));
-  CPPUNIT_ASSERT(testVector.ScalarProduct(three) <= LINALG_MYEPSILON());
-}
Index: src/LinearAlgebra/unittests/VectorUnitTest.hpp
===================================================================
--- src/LinearAlgebra/unittests/VectorUnitTest.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- * cppunuit.hpp
- *
- *  Created on: Aug 17, 2009
- *      Author: heber
- */
-
-#ifndef VECTORUNITTEST_HPP_
-#define VECTORUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/Vector.hpp"
-
-/********************************************** Test classes **************************************/
-
-class VectorTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( VectorTest) ;
-    CPPUNIT_TEST ( AssignmentTest );
-    CPPUNIT_TEST ( UnityTest );
-    CPPUNIT_TEST ( SimpleAlgebraTest );
-    CPPUNIT_TEST ( OperatorAlgebraTest );
-    CPPUNIT_TEST ( EuclidianScalarProductTest );
-    CPPUNIT_TEST ( EuclidianNormTest );
-    CPPUNIT_TEST ( EuclidianDistancesTest );
-    CPPUNIT_TEST ( EuclidianAnglesTest );
-    CPPUNIT_TEST ( ProjectionTest );
-    CPPUNIT_TEST ( NormalsTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void AssignmentTest();
-    void UnityTest();
-    void OperatorAlgebraTest();
-    void SimpleAlgebraTest();
-    void EuclidianScalarProductTest();
-    void EuclidianNormTest();
-    void EuclidianDistancesTest();
-    void EuclidianAnglesTest();
-    void ProjectionTest();
-    void NormalsTest();
-    void LineIntersectionTest();
-    void VectorRotationTest();
-
-private:
-    // vector to execute tests on, may be modified during run
-    Vector fixture;
-    // never modify these during run, other tests might rely on them
-    Vector zero;
-    Vector unit;
-    Vector otherunit;
-    Vector notunit;
-    Vector two;
-    Vector three;
-};
-
-
-#endif /* VECTORUNITTEST_HPP_ */
Index: src/LinearAlgebra/vector_ops.cpp
===================================================================
--- src/LinearAlgebra/vector_ops.cpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/*
- * 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.
- */
-
-/*
- * vector_ops.cpp
- *
- *  Created on: Apr 1, 2010
- *      Author: crueger
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Info.hpp"
-#include "CodePatterns/Log.hpp"
-#include "CodePatterns/Verbose.hpp"
-#include "LinearAlgebra/defs.hpp"
-#include "LinearAlgebra/fast_functions.hpp"
-#include "LinearAlgebra/leastsquaremin.hpp"
-#include "LinearAlgebra/Plane.hpp"
-#include "LinearAlgebra/Vector.hpp"
-
-#include <gsl/gsl_linalg.h>
-#include <gsl/gsl_matrix.h>
-#include <gsl/gsl_permutation.h>
-#include <gsl/gsl_vector.h>
-#include <gsl/gsl_multimin.h>
-
-/**
- * !@file
- * These files defines several common operation on vectors that should not
- * become part of the main vector class, because they are either to complex
- * or need methods from other subsystems that should not be moved to
- * the LinAlg-Subsystem
- */
-
-/** Creates a new vector as the one with least square distance to a given set of \a vectors.
- * \param *vectors set of vectors
- * \param num number of vectors
- * \return true if success, false if failed due to linear dependency
- */
-bool LSQdistance(Vector &res,const Vector **vectors, int num)
-{
-  int j;
-
-  for (j=0;j<num;j++) {
-    Log() << Verbose(1) << j << "th atom's vector: " << vectors[j] << endl;
-  }
-
-  int np = 3;
-  struct LSQ_params par;
-
-   const gsl_multimin_fminimizer_type *T =
-     gsl_multimin_fminimizer_nmsimplex;
-   gsl_multimin_fminimizer *s = NULL;
-   gsl_vector *ss, *y;
-   gsl_multimin_function minex_func;
-
-   size_t iter = 0, i;
-   int status;
-   double size;
-
-   /* Initial vertex size vector */
-   ss = gsl_vector_alloc (np);
-   y = gsl_vector_alloc (np);
-
-   /* Set all step sizes to 1 */
-   gsl_vector_set_all (ss, 1.0);
-
-   /* Starting point */
-   par.vectors = vectors;
-   par.num = num;
-
-   for (i=NDIM;i--;)
-    gsl_vector_set(y, i, (vectors[0]->at(i) - vectors[1]->at(i))/2.);
-
-   /* Initialize method and iterate */
-   minex_func.f = &LSQ;
-   minex_func.n = np;
-   minex_func.params = (void *)&par;
-
-   s = gsl_multimin_fminimizer_alloc (T, np);
-   gsl_multimin_fminimizer_set (s, &minex_func, y, ss);
-
-   do
-     {
-       iter++;
-       status = gsl_multimin_fminimizer_iterate(s);
-
-       if (status)
-         break;
-
-       size = gsl_multimin_fminimizer_size (s);
-       status = gsl_multimin_test_size (size, 1e-2);
-
-       if (status == GSL_SUCCESS)
-         {
-           printf ("converged to minimum at\n");
-         }
-
-       printf ("%5d ", (int)iter);
-       for (i = 0; i < (size_t)np; i++)
-         {
-           printf ("%10.3e ", gsl_vector_get (s->x, i));
-         }
-       printf ("f() = %7.3f size = %.3f\n", s->fval, size);
-     }
-   while (status == GSL_CONTINUE && iter < 100);
-
-  for (i=(size_t)np;i--;)
-    res[i] = gsl_vector_get(s->x, i);
-   gsl_vector_free(y);
-   gsl_vector_free(ss);
-   gsl_multimin_fminimizer_free (s);
-
-  return true;
-};
Index: src/LinearAlgebra/vector_ops.hpp
===================================================================
--- src/LinearAlgebra/vector_ops.hpp	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ 	(revision )
@@ -1,19 +1,0 @@
-/*
- * vector_ops.hpp
- *
- *  Created on: Apr 1, 2010
- *      Author: crueger
- */
-
-#ifndef VECTOR_OPS_HPP_
-#define VECTOR_OPS_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-bool LSQdistance(Vector &res,const Vector **vectors, int num);
-
-#endif /* VECTOR_OPS_HPP_ */
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -5,5 +5,4 @@
 	RandomNumbers \
 	Parser \
-	LinearAlgebra \
 	Shapes \
 	Graph \
@@ -259,6 +258,6 @@
 libMolecuilder_la_includedir = $(includedir)/MoleCuilder/
 libMolecuilder_la_LIBADD = \
-	LinearAlgebra/libMolecuilderLinearAlgebra.la \
 	Graph/libMolecuilderGraph.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	${CodePatterns_LIBS} \
 	${BOOST_PROGRAM_OPTIONS_LIB}
@@ -304,5 +303,5 @@
 
 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB)
-INCLUDES = -I$(top_srcdir)/src/unittests -I$(top_srcdir)/src/Actions -I$(top_srcdir)/src/UIElements
+INCLUDES = -I$(top_srcdir)/LinearAlgebra/src -I$(top_srcdir)/src/unittests -I$(top_srcdir)/src/Actions -I$(top_srcdir)/src/UIElements
 
 noinst_LIBRARIES = libmenu.a
@@ -327,5 +326,5 @@
 	Parser/libMolecuilderParser.la \
 	Shapes/libMolecuilderShapes.la \
-	LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
@@ -348,5 +347,5 @@
 	Parser/libMolecuilderParser.la \
 	Shapes/libMolecuilderShapes.la \
-	LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
@@ -362,5 +361,5 @@
 	Parser/libMolecuilderParser.la \
 	Shapes/libMolecuilderShapes.la \
-	LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
@@ -375,5 +374,5 @@
 	Parser/libMolecuilderParser.la \
 	Shapes/libMolecuilderShapes.la \
-	LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
Index: src/Parser/Makefile.am
===================================================================
--- src/Parser/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Parser/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = ${CodePatterns_LIBS} -ldl
Index: src/Parser/unittests/Makefile.am
===================================================================
--- src/Parser/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Parser/unittests/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
@@ -21,5 +21,5 @@
 GSLLIBS = \
 	../../Shapes/libMolecuilderShapes.la \
-	../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	../../RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
Index: src/Shapes/Makefile.am
===================================================================
--- src/Shapes/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Shapes/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 # Position-Independent Code necessary for shared library
@@ -22,5 +22,5 @@
 libMolecuilderShapes_la_includedir = $(includedir)/MoleCuilder/Shapes/
 libMolecuilderShapes_la_LIBADD = \
-  ../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+  $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	$(GSL_LIBS)
 nobase_libMolecuilderShapes_la_include_HEADERS = ${SHAPEHEADER}
Index: src/Shapes/unittests/Makefile.am
===================================================================
--- src/Shapes/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/Shapes/unittests/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
@@ -17,5 +17,5 @@
 SHAPELIBS = \
 	../../Shapes/libMolecuilderShapes.la \
-	../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	${CodePatterns_LIBS} \
 	$(BOOST_LIB)
Index: src/UIElements/CommandLineUI/unittests/Makefile.am
===================================================================
--- src/UIElements/CommandLineUI/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/UIElements/CommandLineUI/unittests/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/UIElements
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src -I$(top_srcdir)/src/UIElements
 
 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
@@ -26,5 +26,5 @@
 	../../../Parser/libMolecuilderParser.la \
 	../../../Shapes/libMolecuilderShapes.la \
-	../../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	../../../RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
Index: src/UIElements/Makefile.am
===================================================================
--- src/UIElements/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/UIElements/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -1,5 +1,5 @@
 # Below is all for the User Interface
 
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/UIElements
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src -I$(top_srcdir)/src/UIElements
 
 AM_LDFLAGS = ${CodePatterns_LIBS} -ldl
Index: src/UIElements/Menu/unittests/Makefile.am
===================================================================
--- src/UIElements/Menu/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/UIElements/Menu/unittests/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/UIElements
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src -I$(top_srcdir)/src/UIElements
 
 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
@@ -37,5 +37,5 @@
 	../../../Parser/libMolecuilderParser.la \
 	../../../Shapes/libMolecuilderShapes.la \
-	../../../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	../../../RandomNumbers/libMolecuilderRandomNumbers.la \
 	${CodePatterns_LIBS} \
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision 3e2225f811016c9e0bb983b9e653cc67856805b1)
+++ src/unittests/Makefile.am	(revision bf4b9ff97113f58a6031de8f9e67813336ae63f1)
@@ -5,5 +5,4 @@
 	../Actions/unittests \
 	../Descriptors/unittests \
-	../LinearAlgebra/unittests \
 	../Parser/unittests \
 	../RandomNumbers/unittests \
@@ -12,5 +11,5 @@
 	../UIElements/Menu/unittests
 
-INCLUDES = -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/LinearAlgebra/src
 
 AM_LDFLAGS = ${CodePatterns_LIBS} $(CPPUNIT_LIBS) -ldl
@@ -41,5 +40,5 @@
 GSLLIBS = \
 	../Shapes/libMolecuilderShapes.la \
-	../LinearAlgebra/libMolecuilderLinearAlgebra.la \
+	$(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \
 	../RandomNumbers/libMolecuilderRandomNumbers.la \
 	$(BOOST_LIB)
@@ -67,12 +66,7 @@
   CountBondsUnitTest.cpp \
   FormulaUnitTest.cpp \
-  ../LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.cpp \
-  ../LinearAlgebra/unittests/LineUnitTest.cpp \
   LinkedCellUnitTest.cpp \
   ListOfBondsUnitTest.cpp \
   ../Actions/unittests/ManipulateAtomsUnitTest.cpp \
-  ../LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.cpp \
-  ../LinearAlgebra/unittests/MatrixContentUnitTest.cpp \
-  ../LinearAlgebra/unittests/MatrixUnitTest.cpp \
   ../UIElements/CommandLineUI/unittests/CommandLineParser_ActionRegistry_ConsistenyUnitTest.cpp \
   ../UIElements/Menu/unittests/MenuDescriptionUnitTest.cpp \
@@ -84,11 +78,8 @@
   ../Parser/unittests/ParserXyzUnitTest.cpp \
   PeriodentafelUnitTest.cpp \
-  ../LinearAlgebra/unittests/PlaneUnitTest.cpp \
   ../Shapes/unittests/ShapeUnitTest.cpp \
   TesselationUnitTest.cpp \
   Tesselation_BoundaryTriangleUnitTest.cpp \
   Tesselation_InsideOutsideUnitTest.cpp \
-  ../LinearAlgebra/unittests/VectorContentUnitTest.cpp \
-  ../LinearAlgebra/unittests/VectorUnitTest.cpp \
   WorldTimeUnitTest.cpp
 
@@ -106,12 +97,7 @@
   CountBondsUnitTest.hpp \
   FormulaUnitTest.hpp \
-  ../LinearAlgebra/unittests/LinearSystemOfEquationsUnitTest.hpp \
-  ../LinearAlgebra/unittests/LineUnitTest.hpp \
   LinkedCellUnitTest.hpp \
   ListOfBondsUnitTest.hpp \
   ../Actions/unittests/ManipulateAtomsUnitTest.hpp \
-  ../LinearAlgebra/unittests/MatrixContentSymmetricUnitTest.hpp \
-  ../LinearAlgebra/unittests/MatrixContentUnitTest.hpp \
-  ../LinearAlgebra/unittests/MatrixUnitTest.hpp \
   ../UIElements/CommandLineUI/unittests/CommandLineParser_ActionRegistry_ConsistenyUnitTest.hpp \
   ../UIElements/Menu/unittests/MenuDescriptionUnitTest.hpp \
@@ -123,12 +109,9 @@
   ../Parser/unittests/ParserXyzUnitTest.hpp \
   PeriodentafelUnitTest.hpp \
-  ../LinearAlgebra/unittests/PlaneUnitTest.hpp \
   ../Shapes/unittests/ShapeUnitTest.hpp \
   TesselationUnitTest.hpp \
   Tesselation_BoundaryTriangleUnitTest.hpp \
   Tesselation_InsideOutsideUnitTest.hpp \
-  ../LinearAlgebra/unittests/VectorContentUnitTest.hpp \
-  ../LinearAlgebra/unittests/VectorUnitTest.hpp \
-	WorldTimeUnitTest.hpp
+  WorldTimeUnitTest.hpp
   
 
