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() ...@@ -414,7 +414,7 @@ void kReduceGBVIBornForces_kernel()
float ratio = (gbviData.x/bornRadius); float ratio = (gbviData.x/bornRadius);
float ratio3 = ratio*ratio*ratio; float ratio3 = ratio*ratio*ratio;
energy -= gbviData.z*ratio3; 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; float br2 = bornRadius*bornRadius;
totalForce *= (1.0f/3.0f)*br2*br2; totalForce *= (1.0f/3.0f)*br2*br2;
...@@ -422,7 +422,7 @@ void kReduceGBVIBornForces_kernel() ...@@ -422,7 +422,7 @@ void kReduceGBVIBornForces_kernel()
*pFt = totalForce; *pFt = totalForce;
pos += gridDim.x * blockDim.x; 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) 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