| 172 |  | Itmp(0, 0) += mtmp * r2; | 
| 173 |  | Itmp(1, 1) += mtmp * r2; | 
| 174 |  | Itmp(2, 2) += mtmp * r2; | 
| 175 | + | } | 
| 176 | + |  | 
| 177 | + | //project the inertial moment of directional atoms into this rigid body | 
| 178 | + | for (std::size_t i = 0; i < atoms_.size(); i++) { | 
| 179 | + | if (atoms_[i]->isDirectional()) { | 
| 180 | + | RectMatrix<double, 3, 3> Iproject = refOrients_[i].transpose() * atoms_[i]->getI(); | 
| 181 | + | Itmp(0, 0) += Iproject(0, 0); | 
| 182 | + | Itmp(1, 1) += Iproject(1, 1); | 
| 183 | + | Itmp(2, 2) += Iproject(2, 2); | 
| 184 | + | } | 
| 185 |  | } | 
| 186 |  |  | 
| 187 |  | //diagonalize |