Skip to content

Commit

Permalink
Fix the force accumulation in the reference platform (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raimondas Galvelis authored Sep 27, 2021
1 parent 76f55e7 commit bca1b1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/reference/src/ReferenceTorchKernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ double ReferenceCalcTorchForceKernel::execute(ContextImpl& context, bool include
double* outputForces = forceTensor.data_ptr<double>();
for (int i = 0; i < numParticles; i++)
for (int j = 0; j < 3; j++)
force[i][j] = -outputForces[3*i+j];
force[i][j] -= outputForces[3*i+j];
}
return energyTensor.item<double>();
}

0 comments on commit bca1b1d

Please sign in to comment.