| 157 | 
  | 
     | 
| 158 | 
  | 
    removeComDrift(); | 
| 159 | 
  | 
    // Remove angular drift if we are not using periodic boundary conditions. | 
| 160 | 
< | 
    if(simParams->getPBC()) removeAngularDrift(); | 
| 160 | 
> | 
    if(!simParams->getPBC()) removeAngularDrift(); | 
| 161 | 
  | 
     | 
| 162 | 
  | 
  } | 
| 163 | 
  | 
   | 
| 204 | 
  | 
      // We now need the inverse of the inertia tensor. | 
| 205 | 
  | 
       | 
| 206 | 
  | 
      std::cerr << "Angular Momentum before is " | 
| 207 | 
< | 
         << angularMomentum <<  std::endl; | 
| 208 | 
< | 
 | 
| 207 | 
> | 
                << angularMomentum <<  std::endl; | 
| 208 | 
> | 
      std::cerr << "Inertia Tensor before is " | 
| 209 | 
> | 
                << inertiaTensor <<  std::endl; | 
| 210 | 
  | 
       | 
| 210 | 
– | 
      inertiaTensor.inverse(); | 
| 211 | 
  | 
       | 
| 212 | 
+ | 
      inertiaTensor =inertiaTensor.inverse(); | 
| 213 | 
+ | 
       std::cerr << "Inertia Tensor after inverse is " | 
| 214 | 
+ | 
                << inertiaTensor <<  std::endl; | 
| 215 | 
  | 
       | 
| 216 | 
  | 
      omega = inertiaTensor*angularMomentum; | 
| 217 | 
  | 
       |