"vscode:/vscode.git/clone" did not exist on "d17a00e02bc34423728038096d025131d1e99245"
Commit 45cbddce authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

gpuSetObcSoftcoreParameters was not returning GpuObcGbsaSoftcore reference

parent 1e52c490
...@@ -527,6 +527,7 @@ void CudaFreeEnergyCalcGBSAOBCSoftcoreForceKernel::executeForces(ContextImpl& co ...@@ -527,6 +527,7 @@ void CudaFreeEnergyCalcGBSAOBCSoftcoreForceKernel::executeForces(ContextImpl& co
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
_gpuContext* gpu = data.gpu; _gpuContext* gpu = data.gpu;
int debug = 1; int debug = 1;
static int call = 0; static int call = 0;
......
...@@ -40,7 +40,7 @@ GpuObcGbsaSoftcore::~GpuObcGbsaSoftcore( ){ ...@@ -40,7 +40,7 @@ GpuObcGbsaSoftcore::~GpuObcGbsaSoftcore( ){
// initialize NonPolarScalingFactors array // initialize NonPolarScalingFactors array
int GpuObcGbsaSoftcore::initializeNonPolarScalingFactors( unsigned int numberOfParticles ){ int GpuObcGbsaSoftcore::initializeNonPolarScalingFactors( unsigned int numberOfParticles ){
_psNonPolarScalingFactors = new CUDAStream<float>( numberOfParticles, 1, "ObcSoftcoreNonPolarScalingFactors"); _psNonPolarScalingFactors = new CUDAStream<float>( numberOfParticles, 1, "ObcSoftcoreNonPolarScaling");
for( unsigned int ii = 0; ii < numberOfParticles; ii++ ){ for( unsigned int ii = 0; ii < numberOfParticles; ii++ ){
(*_psNonPolarScalingFactors)[ii] = 1.0f; (*_psNonPolarScalingFactors)[ii] = 1.0f;
} }
......
...@@ -244,9 +244,9 @@ void kReduceObcGbsaBornSum(gpuContext gpu) ...@@ -244,9 +244,9 @@ void kReduceObcGbsaBornSum(gpuContext gpu)
*/ */
extern "C" extern "C"
void gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDielectric, float solventDielectric, float nonPolarPrefactor, GpuObcGbsaSoftcore* gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDielectric, float solventDielectric, float nonPolarPrefactor,
const std::vector<float>& radius, const std::vector<float>& scale, const std::vector<float>& radius, const std::vector<float>& scale,
const std::vector<float>& charge, const std::vector<float>& nonPolarScalingFactors) const std::vector<float>& charge, const std::vector<float>& nonPolarScalingFactors)
{ {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -264,6 +264,7 @@ void gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDielectric, float so ...@@ -264,6 +264,7 @@ void gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDielectric, float so
// gpu->bIncludeGBSA = true; // gpu->bIncludeGBSA = true;
GpuObcGbsaSoftcore* gpuObcGbsaSoftcore = new GpuObcGbsaSoftcore(); GpuObcGbsaSoftcore* gpuObcGbsaSoftcore = new GpuObcGbsaSoftcore();
gpuObcGbsaSoftcore->initializeNonPolarScalingFactors( gpu->sim.paddedNumberOfAtoms ); gpuObcGbsaSoftcore->initializeNonPolarScalingFactors( gpu->sim.paddedNumberOfAtoms );
gpu->sim.surfaceAreaFactor = -6.0f*PI*4.0f*nonPolarPrefactor*1000.0f*0.4184f; gpu->sim.surfaceAreaFactor = -6.0f*PI*4.0f*nonPolarPrefactor*1000.0f*0.4184f;
for (unsigned int i = 0; i < atoms; i++) for (unsigned int i = 0; i < atoms; i++)
{ {
...@@ -301,6 +302,8 @@ void gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDielectric, float so ...@@ -301,6 +302,8 @@ void gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDielectric, float so
gpu->psPosq4->Upload(); gpu->psPosq4->Upload();
gpu->sim.preFactor = 2.0f*electricConstant*((1.0f/innerDielectric)-(1.0f/solventDielectric))*gpu->sim.forceConversionFactor; gpu->sim.preFactor = 2.0f*electricConstant*((1.0f/innerDielectric)-(1.0f/solventDielectric))*gpu->sim.forceConversionFactor;
return gpuObcGbsaSoftcore;
} }
void kCalculateObcGbsaSoftcoreBornSum(gpuContext gpu) void kCalculateObcGbsaSoftcoreBornSum(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