"platforms/cuda/vscode:/vscode.git/clone" did not exist on "fd7c5465921b1e6a0ba94c1a28c5a148f635c795"
Commit 5196c351 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Include missing factor of 138.93548 (1/4*pi*epsilon0) in nonpolar energy expression

parent 1ae5a332
......@@ -414,7 +414,7 @@ void kReduceGBVIBornForces_kernel()
float ratio = (gbviData.x/bornRadius);
float ratio3 = ratio*ratio*ratio;
energy -= gbviData.z*ratio3;
totalForce += (3.0f*gbviData.z*ratio3)/bornRadius; // 'cavity' term
totalForce += (3.0f*138.93548*gbviData.z*ratio3)/bornRadius; // 'cavity' term
float br2 = bornRadius*bornRadius;
totalForce *= (1.0f/3.0f)*br2*br2;
......@@ -422,7 +422,7 @@ void kReduceGBVIBornForces_kernel()
*pFt = totalForce;
pos += gridDim.x * blockDim.x;
}
cSim.pEnergy[blockIdx.x * blockDim.x + threadIdx.x] += energy;
cSim.pEnergy[blockIdx.x * blockDim.x + threadIdx.x] += 138.93548*energy;
}
void kReduceObcGbsaBornForces(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