| 48 |  |  | 
| 49 |  | namespace OpenMD { | 
| 50 |  |  | 
| 51 | + |  | 
| 52 |  | void MolecularRestraint::calcForce(std::vector<Vector3d> struc, | 
| 53 |  | Vector3d molCom){ | 
| 54 |  |  | 
| 142 |  |  | 
| 143 |  | Quat4d quat = A.toQuaternion(); | 
| 144 |  |  | 
| 144 | – | quat.getTwistSwingAxisAngle(twistAngle, swingAngle, swingAxis); | 
| 145 | – |  | 
| 145 |  | RealType tw, sx, sy, ttw, swingX, swingY; | 
| 146 | < | quat.toTwistSwing(tw, sx, sy); | 
| 148 | < | quat.toSwingTwist(swingX, swingY, ttw); | 
| 146 | > | quat.toSwingTwist(swingX, swingY, twistAngle); | 
| 147 |  |  | 
| 150 | – | // std::cerr << eularAngles << "\t[" << twistAngle << "," << swingAngle << | 
| 151 | – | // "]\t[" << tw << "," << sx << "," << sy << "]\t[" << ttw << | 
| 152 | – | // "," << ssx << "," << ssy << "]" << std::endl; | 
| 153 | – |  | 
| 148 |  | RealType dVdtwist, dVdswing, dVdswingX, dVdswingY; | 
| 149 |  | RealType dTwist, dSwing, dSwingX, dSwingY; | 
| 150 |  | RealType p; |