--- trunk/OOPSE-4/src/primitives/RigidBody.cpp 2005/01/13 19:40:37 1937 +++ trunk/OOPSE-4/src/primitives/RigidBody.cpp 2005/01/25 17:45:23 1957 @@ -172,6 +172,16 @@ void RigidBody::calcRefCoords() { Itmp(0, 0) += mtmp * r2; Itmp(1, 1) += mtmp * r2; Itmp(2, 2) += mtmp * r2; + } + + //project the inertial moment of directional atoms into this rigid body + for (std::size_t i = 0; i < atoms_.size(); i++) { + if (atoms_[i]->isDirectional()) { + RectMatrix Iproject = refOrients_[i].transpose() * atoms_[i]->getI(); + Itmp(0, 0) += Iproject(0, 0); + Itmp(1, 1) += Iproject(1, 1); + Itmp(2, 2) += Iproject(2, 2); + } } //diagonalize