Index: src/Actions/AnalysisAction/PrincipalAxisSystemAction.cpp
===================================================================
--- src/Actions/AnalysisAction/PrincipalAxisSystemAction.cpp	(revision 4782599cc2cedbb40da7b38c15b2bf5c0d183589)
+++ src/Actions/AnalysisAction/PrincipalAxisSystemAction.cpp	(revision 1f91f4d142b3890c0ea0c60d27ff628498b897f0)
@@ -40,35 +40,12 @@
 /** =========== define the function ====================== */
 Action::state_ptr AnalysisPrincipalAxisSystemAction::performCall() {
-  RealSpaceMatrix InertiaTensor;
-
   DoLog(0) && (Log() << Verbose(0) << "Evaluating prinicipal axis." << endl);
   for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
     molecule *mol = iter->second;
-    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
 
-    // reset inertia tensor
-    InertiaTensor.setZero();
+    // get inertia tensor
+    RealSpaceMatrix InertiaTensor = mol->getInertiaTensor();
 
-    // sum up inertia tensor
-    for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-      Vector x = (*iter)->getPosition();
-      x -= *CenterOfGravity;
-      const double mass = (*iter)->getType()->getMass();
-      InertiaTensor.at(0,0) += mass*(x[1]*x[1] + x[2]*x[2]);
-      InertiaTensor.at(0,1) += mass*(-x[0]*x[1]);
-      InertiaTensor.at(0,2) += mass*(-x[0]*x[2]);
-      InertiaTensor.at(1,0) += mass*(-x[1]*x[0]);
-      InertiaTensor.at(1,1) += mass*(x[0]*x[0] + x[2]*x[2]);
-      InertiaTensor.at(1,2) += mass*(-x[1]*x[2]);
-      InertiaTensor.at(2,0) += mass*(-x[2]*x[0]);
-      InertiaTensor.at(2,1) += mass*(-x[2]*x[1]);
-      InertiaTensor.at(2,2) += mass*(x[0]*x[0] + x[1]*x[1]);
-    }
-    // print InertiaTensor
-    DoLog(0) && (Log() << Verbose(0) << "The inertia tensor of molecule "
-        << mol->getName() <<  " is:"
-        << InertiaTensor << endl);
-
-    // diagonalize matrix
+		// diagonalize matrix
     Vector EigenValues = InertiaTensor.transformToEigenbasis();
 
Index: src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp
===================================================================
--- src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp	(revision 4782599cc2cedbb40da7b38c15b2bf5c0d183589)
+++ src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp	(revision 1f91f4d142b3890c0ea0c60d27ff628498b897f0)
@@ -50,81 +50,11 @@
     mol = iter->second;
     DoLog(0) && (Log() << Verbose(0) << "Converting to prinicipal axis system." << endl);
-    RealSpaceMatrix InertiaTensor;
-    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
 
-    // reset inertia tensor
-    InertiaTensor.setZero();
+    RealSpaceMatrix InertiaTensor = mol->getInertiaTensor();
 
-    // sum up inertia tensor
-    for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-      Vector x = (*iter)->getPosition();
-      x -= *CenterOfGravity;
-      const double mass = (*iter)->getType()->getMass();
-      InertiaTensor.at(0,0) += mass*(x[1]*x[1] + x[2]*x[2]);
-      InertiaTensor.at(0,1) += mass*(-x[0]*x[1]);
-      InertiaTensor.at(0,2) += mass*(-x[0]*x[2]);
-      InertiaTensor.at(1,0) += mass*(-x[1]*x[0]);
-      InertiaTensor.at(1,1) += mass*(x[0]*x[0] + x[2]*x[2]);
-      InertiaTensor.at(1,2) += mass*(-x[1]*x[2]);
-      InertiaTensor.at(2,0) += mass*(-x[2]*x[0]);
-      InertiaTensor.at(2,1) += mass*(-x[2]*x[1]);
-      InertiaTensor.at(2,2) += mass*(x[0]*x[0] + x[1]*x[1]);
-    }
-    // print InertiaTensor for debugging
-    DoLog(0) && (Log() << Verbose(0) << "The inertia tensor is:" << InertiaTensor << endl);
-
-    // diagonalize to determine principal axis system
-    Vector Eigenvalues = InertiaTensor.transformToEigenbasis();
-
-    for(int i=0;i<NDIM;i++)
-      DoLog(0) && (Log() << Verbose(0) << "eigenvalue = " << Eigenvalues[i] << ", eigenvector = " << InertiaTensor.column(i) << endl);
-
-    // check whether we rotate or not
-    DoLog(0) && (Log() << Verbose(0) << "Transforming molecule into PAS ... ");
-
-    // obtain first column, eigenvector to biggest eigenvalue
-    Vector BiggestEigenvector(InertiaTensor.column(Eigenvalues.SmallestComponent()));
-    Vector DesiredAxis(params.Axis);
-
-    // Creation Line that is the rotation axis
-    DesiredAxis.VectorProduct(BiggestEigenvector);
-    Line RotationAxis(Vector(0.,0.,0.), DesiredAxis);
-
-    // determine angle
-    const double alpha = BiggestEigenvector.Angle(params.Axis);
-
-    DoLog(0) && (Log() << Verbose(0) << alpha << endl);
-
-    for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-      *(*iter) -= *CenterOfGravity;
-      (*iter)->setPosition(RotationAxis.rotateVector((*iter)->getPosition(), alpha));
-      *(*iter) += *CenterOfGravity;
-    }
-    DoLog(0) && (Log() << Verbose(0) << "done." << endl);
+    mol->RotateToPrincipalAxisSystem(params.Axis);
 
     // summing anew for debugging (resulting matrix has to be diagonal!)
-    // reset inertia tensor
-    InertiaTensor.setZero();
-
-    // sum up inertia tensor
-    for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-      Vector x = (*iter)->getPosition();
-      x -= *CenterOfGravity;
-      const double mass = (*iter)->getType()->getMass();
-      InertiaTensor.at(0,0) += mass*(x[1]*x[1] + x[2]*x[2]);
-      InertiaTensor.at(0,1) += mass*(-x[0]*x[1]);
-      InertiaTensor.at(0,2) += mass*(-x[0]*x[2]);
-      InertiaTensor.at(1,0) += mass*(-x[1]*x[0]);
-      InertiaTensor.at(1,1) += mass*(x[0]*x[0] + x[2]*x[2]);
-      InertiaTensor.at(1,2) += mass*(-x[1]*x[2]);
-      InertiaTensor.at(2,0) += mass*(-x[2]*x[0]);
-      InertiaTensor.at(2,1) += mass*(-x[2]*x[1]);
-      InertiaTensor.at(2,2) += mass*(x[0]*x[0] + x[1]*x[1]);
-      // print InertiaTensor for debugging
-      DoLog(0) && (Log() << Verbose(0) << "The inertia tensor is:" << InertiaTensor << endl);
-    }
-
-    // free everything
-    delete(CenterOfGravity);
+    InertiaTensor = mol->getInertiaTensor();
   }
   return Action::success;
