"platforms/opencl/vscode:/vscode.git/clone" did not exist on "a6370f5839e3e5232ef10dba2bbd880dead5d387"
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; ...@@ -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) \ #define GETDIHEDRALANGLEBETWEENTHREEVECTORS(vector1, vector2, vector3, signVector, cp0, cp1, angle) \
{ \ { \
CROSS_PRODUCT(vector1, vector2, cp0); \ CROSS_PRODUCT(vector1, vector2, cp0); \
...@@ -108,9 +102,10 @@ static __constant__ cudaGmxSimulation cSim; ...@@ -108,9 +102,10 @@ static __constant__ cudaGmxSimulation cSim;
{ \ { \
CROSS_PRODUCT(vector1, vector2, cp0); \ CROSS_PRODUCT(vector1, vector2, cp0); \
CROSS_PRODUCT(vector2, vector3, cp1); \ CROSS_PRODUCT(vector2, vector3, cp1); \
GETANGLECOSINEBETWEENTWOVECTORS(cp0, cp1, angle, cosine); \ GETANGLEBETWEENTWOVECTORS(cp0, cp1, angle); \
float dp = DOT3(signVector, cp1); \ float dp = DOT3(signVector, cp1); \
angle = (dp >= 0) ? angle : -angle; \ angle = (dp >= 0) ? angle : -angle; \
cosine = cos(angle); \
} }
void SetCalculateLocalForcesSim(gpuContext gpu) 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