Index: src/atom.cpp
===================================================================
--- src/atom.cpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/atom.cpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -17,4 +17,5 @@
 #include "World.hpp"
 #include "molecule.hpp"
+#include "Shapes/Shape.hpp"
 
 /************************************* Functions for class atom *************************************/
@@ -112,7 +113,7 @@
  * \return true - is inside, false - is not
  */
-bool atom::IsInParallelepiped(const Vector offset, const Matrix& parallelepiped) const
-{
-  return (node->IsInParallelepiped(offset, parallelepiped));
+bool atom::IsInShape(const Shape& shape) const
+{
+  return shape.isInside(*node);
 };
 
Index: src/atom.hpp
===================================================================
--- src/atom.hpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/atom.hpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -35,4 +35,5 @@
 class World;
 class molecule;
+class Shape;
 
 /********************************************** declarations *******************************/
@@ -66,5 +67,5 @@
   double DistanceToVector(const Vector &origin) const;
   double DistanceSquaredToVector(const Vector &origin) const;
-  bool IsInParallelepiped(const Vector offset, const Matrix &parallelepiped) const;
+  bool IsInShape(const Shape&) const;
 
   // getter and setter
Index: src/molecule.cpp
===================================================================
--- src/molecule.cpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/molecule.cpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -659,9 +659,9 @@
  * @param three vectors forming the matrix that defines the shape of the parallelpiped
  */
-molecule* molecule::CopyMoleculeFromSubRegion(const Vector offset, const Matrix &parallelepiped) const {
+molecule* molecule::CopyMoleculeFromSubRegion(const Shape &region) const {
   molecule *copy = World::getInstance().createMolecule();
 
   BOOST_FOREACH(atom *iter,atoms){
-    if(iter->IsInParallelepiped(offset,parallelepiped)){
+    if(iter->IsInShape(region)){
       copy->AddCopyAtom(iter);
     }
Index: src/molecule.hpp
===================================================================
--- src/molecule.hpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/molecule.hpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -53,4 +53,5 @@
 class periodentafel;
 class Vector;
+class Shape;
 
 /******************************** Some definitions for easier reading **********************************/
@@ -316,5 +317,5 @@
 
   molecule *CopyMolecule();
-  molecule* CopyMoleculeFromSubRegion(const Vector offset, const Matrix &parallelepiped) const;
+  molecule* CopyMoleculeFromSubRegion(const Shape&) const;
 
   /// Fragment molecule by two different approaches:
Index: src/unittests/vectorunittest.cpp
===================================================================
--- src/unittests/vectorunittest.cpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/unittests/vectorunittest.cpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -215,36 +215,2 @@
   CPPUNIT_ASSERT(testVector.ScalarProduct(three) < MYEPSILON);
 }
-
-
-/**
- * UnitTest for Vector::IsInParallelepiped().
- */
-void VectorTest::IsInParallelepipedTest()
-{
-  Matrix parallelepiped;
-  parallelepiped.at(0,0) = 1;
-  parallelepiped.at(1,0) = 0;
-  parallelepiped.at(2,0) = 0;
-  parallelepiped.at(0,1) = 0;
-  parallelepiped.at(1,1) = 1;
-  parallelepiped.at(2,1) = 0;
-  parallelepiped.at(0,2) = 0;
-  parallelepiped.at(1,2) = 0;
-  parallelepiped.at(2,2) = 1;
-
-  fixture = zero;
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );
-  fixture = Vector(2.5,2.5,2.5);
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );
-  fixture = Vector(1.,1.,1.);
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );
-  fixture = Vector(3.5,3.5,3.5);
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );
-  fixture = Vector(2.,2.,2.);
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );
-  fixture = Vector(2.,3.,2.);
-  CPPUNIT_ASSERT_EQUAL( true, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );
-  fixture = Vector(-2.,2.,-1.);
-  CPPUNIT_ASSERT_EQUAL( false, fixture.IsInParallelepiped(Vector(2.,2.,2.), parallelepiped) );
-}
-
Index: src/unittests/vectorunittest.hpp
===================================================================
--- src/unittests/vectorunittest.hpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/unittests/vectorunittest.hpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -27,5 +27,4 @@
     CPPUNIT_TEST ( ProjectionTest );
     CPPUNIT_TEST ( NormalsTest );
-    CPPUNIT_TEST ( IsInParallelepipedTest );
     CPPUNIT_TEST_SUITE_END();
 
@@ -45,5 +44,4 @@
     void LineIntersectionTest();
     void VectorRotationTest();
-    void IsInParallelepipedTest();
 
 private:
Index: src/vector.cpp
===================================================================
--- src/vector.cpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/vector.cpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -543,23 +543,4 @@
 }
 
-/**
- * Checks whether this vector is within the parallelepiped defined by the given three vectors and
- * their offset.
- *
- * @param offest for the origin of the parallelepiped
- * @param three vectors forming the matrix that defines the shape of the parallelpiped
- */
-bool Vector::IsInParallelepiped(const Vector &offset, const Matrix& _parallelepiped) const
-{
-  Matrix parallelepiped = _parallelepiped.invert();
-  Vector a = parallelepiped * ((*this)-offset);
-  bool isInside = true;
-
-  for (int i=NDIM;i--;)
-    isInside = isInside && ((a[i] <= 1) && (a[i] >= 0));
-
-  return isInside;
-}
-
 
 // some comonly used vectors
Index: src/vector.hpp
===================================================================
--- src/vector.hpp	(revision 205d9b8bb1f1bafa0def6c63eff6b932e15b7885)
+++ src/vector.hpp	(revision c550dde8f9a55abc5bb3d1e577f8d58c31313732)
@@ -60,5 +60,4 @@
   bool GetOneNormalVector(const Vector &x1);
   bool MakeNormalTo(const Vector &y1);
-  bool IsInParallelepiped(const Vector &offset, const Matrix& _parallelepiped) const;
   std::pair<Vector,Vector> partition(const Vector&) const;
   std::pair<pointset,Vector> partition(const pointset&) const;
