| 178 |  | //project the inertial moment of directional atoms into this rigid body | 
| 179 |  | for (std::size_t i = 0; i < atoms_.size(); i++) { | 
| 180 |  | if (atoms_[i]->isDirectional()) { | 
| 181 | < | RectMatrix<double, 3, 3> Iproject = refOrients_[i].transpose() * atoms_[i]->getI(); | 
| 182 | < | Itmp(0, 0) += Iproject(0, 0); | 
| 183 | < | Itmp(1, 1) += Iproject(1, 1); | 
| 184 | < | Itmp(2, 2) += Iproject(2, 2); | 
| 181 | > | Itmp += refOrients_[i].transpose() * atoms_[i]->getI() * refOrients_[i]; | 
| 182 |  | } | 
| 183 |  | } | 
| 184 |  |  | 
| 270 |  | if (atoms_[i]->isDirectional()) { | 
| 271 |  |  | 
| 272 |  | dAtom = (DirectionalAtom *) atoms_[i]; | 
| 273 | < | dAtom->setA(a * refOrients_[i]); | 
| 277 | < | //dAtom->rotateBy( A ); | 
| 273 | > | dAtom->setA(refOrients_[i] * a); | 
| 274 |  | } | 
| 275 |  |  | 
| 276 |  | } | 
| 297 |  | if (atoms_[i]->isDirectional()) { | 
| 298 |  |  | 
| 299 |  | dAtom = (DirectionalAtom *) atoms_[i]; | 
| 300 | < | dAtom->setA(a * refOrients_[i], frame); | 
| 300 | > | dAtom->setA(refOrients_[i] * a, frame); | 
| 301 |  | } | 
| 302 |  |  | 
| 303 |  | } |