"platforms/cuda/vscode:/vscode.git/clone" did not exist on "f454559761e7781bff8ad3624547fbcbfaffd4e2"
Commit f38f956d authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Fix for calculation of RB angle

parent 172d41e5
......@@ -89,12 +89,6 @@ static __constant__ cudaGmxSimulation cSim;
} \
}
#define GETANGLECOSINEBETWEENTWOVECTORS(v1, v2, angle, cosine) \
{ \
GETNORMEDDOTPRODUCT(v1, v2, cosine); \
angle = acos(cosine); \
}
#define GETDIHEDRALANGLEBETWEENTHREEVECTORS(vector1, vector2, vector3, signVector, cp0, cp1, angle) \
{ \
CROSS_PRODUCT(vector1, vector2, cp0); \
......@@ -108,9 +102,10 @@ static __constant__ cudaGmxSimulation cSim;
{ \
CROSS_PRODUCT(vector1, vector2, cp0); \
CROSS_PRODUCT(vector2, vector3, cp1); \
GETANGLECOSINEBETWEENTWOVECTORS(cp0, cp1, angle, cosine); \
GETANGLEBETWEENTWOVECTORS(cp0, cp1, angle); \
float dp = DOT3(signVector, cp1); \
angle = (dp >= 0) ? angle : -angle; \
cosine = cos(angle); \
}
void SetCalculateLocalForcesSim(gpuContext gpu)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment