Commit c1bdee13 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Added missing Born radii switching derivative

parent 643ea90e
......@@ -380,6 +380,7 @@ void kReduceGBVIBornForces_kernel()
{
float bornRadius = cSim.pBornRadii[pos];
float4 gbviData = cSim.pGBVIData[pos];
float switchDeriv = cSim.pGBVISwitchDerivative[pos];
float totalForce = 0.0f;
float* pFt = cSim.pBornForce + pos;
......@@ -416,7 +417,7 @@ void kReduceGBVIBornForces_kernel()
energy -= gbviData.z*ratio3;
totalForce += (3.0f*gbviData.z*ratio3)/bornRadius; // 'cavity' term
float br2 = bornRadius*bornRadius;
totalForce *= (1.0f/3.0f)*br2*br2;
totalForce *= (1.0f/3.0f)*br2*br2*switchDeriv;
pFt = cSim.pBornForce + pos;
*pFt = totalForce;
......
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