Commit cb92103e authored by peastman's avatar peastman
Browse files

Bug fixes

parent ff238051
......@@ -7610,8 +7610,8 @@ string OpenCLIntegrateCustomStepKernel::createPerDofComputation(const string& va
variables["x"] = "position.xyz";
variables["v"] = "velocity.xyz";
variables[forceName] = "f.xyz";
variables["gaussian"] = "gaussian.xyz";
variables["uniform"] = "uniform.xyz";
variables["gaussian"] = "convert_mixed4(gaussian).xyz";
variables["uniform"] = "convert_mixed4(uniform).xyz";
variables["m"] = "mass";
variables["dt"] = "stepSize";
if (energyName != "")
......@@ -7925,7 +7925,7 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
index = 0;
kernel.setArg<cl::Buffer>(index++, sumBuffer.getDeviceBuffer());
kernel.setArg<cl::Buffer>(index++, summedValue.getDeviceBuffer());
kernel.setArg<cl_int>(index++, 3*numAtoms);
kernel.setArg<cl_int>(index++, numAtoms);
}
}
else if (stepType[step] == CustomIntegrator::ConstrainPositions) {
......@@ -8017,7 +8017,7 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
index = 0;
sumKineticEnergyKernel.setArg<cl::Buffer>(index++, sumBuffer.getDeviceBuffer());
sumKineticEnergyKernel.setArg<cl::Buffer>(index++, summedValue.getDeviceBuffer());
sumKineticEnergyKernel.setArg<cl_int>(index++, 3*numAtoms);
sumKineticEnergyKernel.setArg<cl_int>(index++, numAtoms);
// Delete the custom functions.
......
......@@ -37,7 +37,7 @@ __kernel void computePerDof(__global real4* restrict posq, __global real4* restr
mixed4 position = loadPos(posq, posqCorrection, index);
#endif
mixed4 velocity = velm[index];
real4 f = force[index];
mixed4 f = convert_mixed4(force[index]);
mixed mass = 1/velocity.w;
if (velocity.w != 0.0) {
int gaussianIndex = gaussianBaseIndex;
......
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