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

Units of nonPolarPrefactor are now kJ/mol/nm^2 (were kcal/mol/A^2)

Changed ReferenceFreeEnergyPlatform name to ReferenceFreeEnergy
Removed references to ParameterFileName in GB/VI
parent 70015b75
...@@ -135,7 +135,7 @@ public: ...@@ -135,7 +135,7 @@ public:
return nonPolarPrefactor; return nonPolarPrefactor;
} }
/** /**
* Set the nonPolarPrefactor. * Set the nonPolarPrefactor; units are kJ/mol/nm^2
*/ */
void setNonPolarPrefactor(double inputNonPolarPrefactor) { void setNonPolarPrefactor(double inputNonPolarPrefactor) {
nonPolarPrefactor = inputNonPolarPrefactor; nonPolarPrefactor = inputNonPolarPrefactor;
......
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
using namespace OpenMM; using namespace OpenMM;
GBSAOBCSoftcoreForce::GBSAOBCSoftcoreForce() : solventDielectric(78.3), soluteDielectric(1.0), nonPolarPrefactor( 0.0054 ){ // units of nonPolarPrefactor are now kJ/mol/nm^2
GBSAOBCSoftcoreForce::GBSAOBCSoftcoreForce() : solventDielectric(78.3), soluteDielectric(1.0), nonPolarPrefactor( 2.25936 ){
} }
int GBSAOBCSoftcoreForce::addParticle(double charge, double radius, double scalingFactor, double nonPolarScalingFactor) { int GBSAOBCSoftcoreForce::addParticle(double charge, double radius, double scalingFactor, double nonPolarScalingFactor) {
......
...@@ -512,10 +512,11 @@ void CudaFreeEnergyCalcGBSAOBCSoftcoreForceKernel::initialize(const System& syst ...@@ -512,10 +512,11 @@ void CudaFreeEnergyCalcGBSAOBCSoftcoreForceKernel::initialize(const System& syst
charge[i] = static_cast<float>( particleCharge); charge[i] = static_cast<float>( particleCharge);
nonPolarScalingFactors[i] = static_cast<float>( particleNonPolarScalingFactor); nonPolarScalingFactors[i] = static_cast<float>( particleNonPolarScalingFactor);
} }
gpuObcGbsaSoftcore = gpuSetObcSoftcoreParameters(gpu, static_cast<float>( force.getSoluteDielectric()), gpuObcGbsaSoftcore = gpuSetObcSoftcoreParameters(gpu, static_cast<float>( force.getSoluteDielectric()),
static_cast<float>( force.getSolventDielectric()), static_cast<float>( force.getSolventDielectric()),
static_cast<float>( force.getNonPolarPrefactor()), static_cast<float>( force.getNonPolarPrefactor()),
radius, scale, charge, nonPolarScalingFactors ); radius, scale, charge, nonPolarScalingFactors );
} }
void CudaFreeEnergyCalcGBSAOBCSoftcoreForceKernel::executeForces(ContextImpl& context) { void CudaFreeEnergyCalcGBSAOBCSoftcoreForceKernel::executeForces(ContextImpl& context) {
......
...@@ -265,7 +265,7 @@ GpuObcGbsaSoftcore* gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDiele ...@@ -265,7 +265,7 @@ GpuObcGbsaSoftcore* gpuSetObcSoftcoreParameters(gpuContext gpu, float innerDiele
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;
for (unsigned int i = 0; i < atoms; i++) for (unsigned int i = 0; i < atoms; i++)
{ {
(*gpu->psObcData)[i].x = radius[i] - dielectricOffset; (*gpu->psObcData)[i].x = radius[i] - dielectricOffset;
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
// class PlatformData; // class PlatformData;
ReferenceFreeEnergyPlatform(); ReferenceFreeEnergyPlatform();
const std::string& getName() const { const std::string& getName() const {
static const std::string name = "ReferenceFreeEnergyPlatform"; static const std::string name = "ReferenceFreeEnergy";
return name; return name;
} }
#if 0 #if 0
......
...@@ -334,7 +334,13 @@ void ReferenceFreeEnergyCalcGBSAOBCSoftcoreForceKernel::initialize(const System& ...@@ -334,7 +334,13 @@ void ReferenceFreeEnergyCalcGBSAOBCSoftcoreForceKernel::initialize(const System&
obcParameters->setSolventDielectric( static_cast<RealOpenMM>(force.getSolventDielectric()) ); obcParameters->setSolventDielectric( static_cast<RealOpenMM>(force.getSolventDielectric()) );
obcParameters->setSoluteDielectric( static_cast<RealOpenMM>(force.getSoluteDielectric()) ); obcParameters->setSoluteDielectric( static_cast<RealOpenMM>(force.getSoluteDielectric()) );
obcParameters->setNonPolarPrefactor( static_cast<RealOpenMM>(force.getNonPolarPrefactor()) );
// nonPolarPrefactor is in units of kJ/mol/nm^2 convert to kcal/mol/A^2
// to be consistent w/ polar part of OBC calculation
RealOpenMM nonPolarPrefactor = static_cast<RealOpenMM>(force.getNonPolarPrefactor());
nonPolarPrefactor /= static_cast<RealOpenMM>(418.4);
obcParameters->setNonPolarPrefactor( nonPolarPrefactor );
// If there is a NonbondedForce in this system, use it to initialize cutoffs and periodic boundary conditions. // If there is a NonbondedForce in this system, use it to initialize cutoffs and periodic boundary conditions.
......
...@@ -38,8 +38,6 @@ extern "C" { ...@@ -38,8 +38,6 @@ extern "C" {
} }
#endif #endif
const std::string GBVISoftcoreParameters::ParameterFileName = std::string( "params.agb" );
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
GBVISoftcoreParameters: GBVISoftcoreParameters:
......
...@@ -34,8 +34,6 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters { ...@@ -34,8 +34,6 @@ class GBVISoftcoreParameters : public ImplicitSolventParameters {
public: public:
static const std::string ParameterFileName;
/** /**
* This is an enumeration of the different methods that may be used for scaling of the Born radii. * This is an enumeration of the different methods that may be used for scaling of the Born radii.
*/ */
......
...@@ -118,7 +118,7 @@ ObcSoftcoreParameters::ObcSoftcoreParameters( int numberOfAtoms, ObcSoftcorePara ...@@ -118,7 +118,7 @@ ObcSoftcoreParameters::ObcSoftcoreParameters( int numberOfAtoms, ObcSoftcorePara
_nonPolarScaleFactors = NULL; _nonPolarScaleFactors = NULL;
_nonPolarPreFactor = 0.054; _nonPolarPreFactor = 2.25936;
setObcTypeParameters( obcType ); setObcTypeParameters( obcType );
......
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