Commit f9bd59ef authored by Jason Swails's avatar Jason Swails
Browse files

Fix Amber custom GB models with both a salt concentration *and* a cutoff.

parent 6ad2aff3
...@@ -217,7 +217,7 @@ def _createEnergyTerms(force, solventDielectric, soluteDielectric, SA, cutoff, k ...@@ -217,7 +217,7 @@ def _createEnergyTerms(force, solventDielectric, soluteDielectric, SA, cutoff, k
"f=sqrt(r^2+B1*B2*exp(-r^2/(4*B1*B2)))"+params, CustomGBForce.ParticlePairNoExclusions) "f=sqrt(r^2+B1*B2*exp(-r^2/(4*B1*B2)))"+params, CustomGBForce.ParticlePairNoExclusions)
else: else:
if kappa > 0: if kappa > 0:
force.addEnergyTerm("-138.935485*(1/soluteDielectric-kappa/solventDielectric)*q1*q2*(1/f-"+str(1/cutoff)+");" force.addEnergyTerm("-138.935485*(1/soluteDielectric-exp(-kappa*f)/solventDielectric)*q1*q2*(1/f-"+str(1/cutoff)+");"
"f=sqrt(r^2+B1*B2*exp(-r^2/(4*B1*B2)))"+params, CustomGBForce.ParticlePairNoExclusions) "f=sqrt(r^2+B1*B2*exp(-r^2/(4*B1*B2)))"+params, CustomGBForce.ParticlePairNoExclusions)
else: else:
force.addEnergyTerm("-138.935485*(1/soluteDielectric-1/solventDielectric)*q1*q2*(1/f-"+str(1/cutoff)+");" force.addEnergyTerm("-138.935485*(1/soluteDielectric-1/solventDielectric)*q1*q2*(1/f-"+str(1/cutoff)+");"
...@@ -380,4 +380,4 @@ def convertParameters(params, gbmodel): ...@@ -380,4 +380,4 @@ def convertParameters(params, gbmodel):
newparams[i] = list(params[i]) newparams[i] = list(params[i])
newparams[i][0] -= offset newparams[i][0] -= offset
newparams[i][1] *= newparams[i][0] newparams[i][1] *= newparams[i][0]
return newparams return newparams
\ No newline at end of file
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