--- trunk/src/primitives/DirectionalAtom.cpp 2005/04/15 22:04:00 507 +++ trunk/src/primitives/DirectionalAtom.cpp 2006/05/17 21:51:42 963 @@ -63,10 +63,10 @@ namespace oopse { if (nLinearAxis > 1) { sprintf( painCave.errMsg, - "Directional Atom error.\n" + "Directional Atom warning.\n" "\tOOPSE found more than one axis in this directional atom with a vanishing \n" "\tmoment of inertia."); - painCave.isFatal = 1; + painCave.isFatal = 0; simError(); } @@ -104,13 +104,13 @@ namespace oopse { setA(m *getA()); } - std::vector DirectionalAtom::getGrad() { - std::vector grad(6, 0.0); + std::vector DirectionalAtom::getGrad() { + std::vector grad(6, 0.0); Vector3d force; Vector3d torque; Vector3d myEuler; - double phi, theta, psi; - double cphi, sphi, ctheta, stheta; + RealType phi, theta, psi; + RealType cphi, sphi, ctheta, stheta; Vector3d ephi; Vector3d etheta; Vector3d epsi; @@ -148,9 +148,9 @@ namespace oopse { for (int j = 0; j < 3; j++ ) { - grad[3] += torque[j]*ephi[j]; - grad[4] += torque[j]*etheta[j]; - grad[5] += torque[j]*epsi[j]; + grad[3] -= torque[j]*ephi[j]; + grad[4] -= torque[j]*etheta[j]; + grad[5] -= torque[j]*epsi[j]; }