def GBSAOBC1Force(solventDielectric=78.5, soluteDielectric=1, SA=None, cutoff=None): custom = CustomGBForce() custom.addPerParticleParameter("q") custom.addPerParticleParameter("radius") custom.addPerParticleParameter("scale") custom.addGlobalParameter("solventDielectric", solventDielectric) custom.addGlobalParameter("soluteDielectric", soluteDielectric) custom.addGlobalParameter("offset", 0.009) custom.addComputedValue( "I", "step(r+sr2-or1)*excl*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);" "excl=step(abs(q1)-0.00000001)*step(abs(q2)-0.00000001);" # exclude pair where one atom is not charged "U=r+sr2;" "L=max(or1, D);" "D=abs(r-sr2);" "sr2 = scale2*or2;" "or1 = radius1-offset; or2 = radius2-offset", CustomGBForce.ParticlePairNoExclusions, ) custom.addComputedValue( "B", "1/(1/or-tanh(0.8*psi+2.909125*psi^3)/radius);" "psi=I*or; or=radius-offset", CustomGBForce.SingleParticle, ) _createEnergyTerms(custom, SA, cutoff) return custom
def GBSAOBC1Force(solventDielectric=78.5, soluteDielectric=1, SA=None, cutoff=None): custom = CustomGBForce() custom.addPerParticleParameter("q") custom.addPerParticleParameter("radius") custom.addPerParticleParameter("scale") custom.addGlobalParameter("solventDielectric", solventDielectric) custom.addGlobalParameter("soluteDielectric", soluteDielectric) custom.addGlobalParameter("offset", 0.009) custom.addComputedValue( "I", "step(r+sr2-or1)*excl*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);" "excl=step(abs(q1)-0.00000001)*step(abs(q2)-0.00000001);" # exclude pair where one atom is not charged "U=r+sr2;" "L=max(or1, D);" "D=abs(r-sr2);" "sr2 = scale2*or2;" "or1 = radius1-offset; or2 = radius2-offset", CustomGBForce.ParticlePairNoExclusions, ) custom.addComputedValue( "B", "1/(1/or-tanh(0.8*psi+2.909125*psi^3)/radius);" "psi=I*or; or=radius-offset", CustomGBForce.SingleParticle, ) _createEnergyTerms(custom, SA, cutoff) return custom
def GBSAGBn2Force(solventDielectric=78.5, soluteDielectric=1, SA=None, cutoff=None): """ Indexing for tables: input: radius1, radius2 index = (radius2*200-20)*21 + (radius1*200-20) output: index of desired value in row-by-row, 1D version of Tables 3 & 4 """ custom = CustomGBForce() custom.addPerParticleParameter("q") custom.addPerParticleParameter("radius") custom.addPerParticleParameter("scale") custom.addPerParticleParameter("alpha") custom.addPerParticleParameter("beta") custom.addPerParticleParameter("gamma") custom.addGlobalParameter("solventDielectric", solventDielectric) custom.addGlobalParameter("soluteDielectric", soluteDielectric) custom.addGlobalParameter("offset", 0.019_514_1) custom.addGlobalParameter("neckScale", 0.826_836) custom.addGlobalParameter("neckCut", 0.68) custom.addFunction("getd0", d0, 0, 440) custom.addFunction("getm0", m0, 0, 440) custom.addComputedValue( "I", "Ivdw+neckScale*Ineck;" "Ineck=step(radius1+radius2+neckCut-r)*getm0(index)/(1+100*(r-getd0(index))^2+0.3*1000000*(r-getd0(index))^6);" "index = (radius2*200-20)*21 + (radius1*200-20);" "Ivdw=step(r+sr2-or1)*excl*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);" "excl=step(abs(q1)-0.00000001)*step(abs(q2)-0.00000001);" # exclude pair where one atom is not charged "U=r+sr2;" "L=max(or1, D);" "D=abs(r-sr2);" "sr2 = scale2*or2;" "or1 = radius1-offset; or2 = radius2-offset", CustomGBForce.ParticlePairNoExclusions, ) custom.addComputedValue( "B", "1/(1/or-tanh(alpha*psi-beta*psi^2+gamma*psi^3)/radius);" "psi=I*or; or=radius-offset", CustomGBForce.SingleParticle, ) _createEnergyTerms(custom, SA, cutoff) return custom
def GBSAGBn2Force(solventDielectric=78.5, soluteDielectric=1, SA=None, cutoff=None): """ Indexing for tables: input: radius1, radius2 index = (radius2*200-20)*21 + (radius1*200-20) output: index of desired value in row-by-row, 1D version of Tables 3 & 4 """ custom = CustomGBForce() custom.addPerParticleParameter("q") custom.addPerParticleParameter("radius") custom.addPerParticleParameter("scale") custom.addPerParticleParameter("alpha") custom.addPerParticleParameter("beta") custom.addPerParticleParameter("gamma") custom.addGlobalParameter("solventDielectric", solventDielectric) custom.addGlobalParameter("soluteDielectric", soluteDielectric) custom.addGlobalParameter("offset", 0.019_514_1) custom.addGlobalParameter("neckScale", 0.826_836) custom.addGlobalParameter("neckCut", 0.68) custom.addFunction("getd0", d0, 0, 440) custom.addFunction("getm0", m0, 0, 440) custom.addComputedValue( "I", "Ivdw+neckScale*Ineck;" "Ineck=step(radius1+radius2+neckCut-r)*getm0(index)/(1+100*(r-getd0(index))^2+0.3*1000000*(r-getd0(index))^6);" "index = (radius2*200-20)*21 + (radius1*200-20);" "Ivdw=step(r+sr2-or1)*excl*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);" "excl=step(abs(q1)-0.00000001)*step(abs(q2)-0.00000001);" # exclude pair where one atom is not charged "U=r+sr2;" "L=max(or1, D);" "D=abs(r-sr2);" "sr2 = scale2*or2;" "or1 = radius1-offset; or2 = radius2-offset", CustomGBForce.ParticlePairNoExclusions, ) custom.addComputedValue( "B", "1/(1/or-tanh(alpha*psi-beta*psi^2+gamma*psi^3)/radius);" "psi=I*or; or=radius-offset", CustomGBForce.SingleParticle, ) _createEnergyTerms(custom, SA, cutoff) return custom