Commit 4a401e78 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed threading bug in CM motion removal

parent 39fd6eb6
...@@ -92,8 +92,8 @@ __kernel void removeCenterOfMassMomentum(int numAtoms, __global float4* velm, __ ...@@ -92,8 +92,8 @@ __kernel void removeCenterOfMassMomentum(int numAtoms, __global float4* velm, __
barrier(CLK_LOCAL_MEM_FENCE); barrier(CLK_LOCAL_MEM_FENCE);
if (thread < 2) if (thread < 2)
temp[thread] += temp[thread+2]; temp[thread] += temp[thread+2];
barrier(CLK_LOCAL_MEM_FENCE);
#endif #endif
barrier(CLK_LOCAL_MEM_FENCE);
cm = (temp[0]+temp[1])*INVERSE_TOTAL_MASS; cm = (temp[0]+temp[1])*INVERSE_TOTAL_MASS;
// Now remove the center of mass velocity from each atom. // Now remove the center of mass velocity from each atom.
......
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