Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
dafd0f97
Commit
dafd0f97
authored
May 27, 2015
by
peastman
Browse files
GBn now uses Discrete2DFunctions
parent
142fc4da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
wrappers/python/simtk/openmm/app/internal/customgbforces.py
wrappers/python/simtk/openmm/app/internal/customgbforces.py
+10
-10
No files found.
wrappers/python/simtk/openmm/app/internal/customgbforces.py
View file @
dafd0f97
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
...
@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012-201
4
University of Virginia and the Authors.
Portions copyright (c) 2012-201
5
University of Virginia and the Authors.
Authors: Christoph Klein, Michael R. Shirts
Authors: Christoph Klein, Michael R. Shirts
Contributors: Jason M. Swails, Peter Eastman
Contributors: Jason M. Swails, Peter Eastman
...
@@ -31,7 +31,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
...
@@ -31,7 +31,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
from
__future__
import
division
from
__future__
import
division
from
simtk.openmm
import
CustomGBForce
,
Discrete
1
DFunction
from
simtk.openmm
import
CustomGBForce
,
Discrete
2
DFunction
d0
=
[
2.26685
,
2.32548
,
2.38397
,
2.44235
,
2.50057
,
2.55867
,
2.61663
,
2.67444
,
d0
=
[
2.26685
,
2.32548
,
2.38397
,
2.44235
,
2.50057
,
2.55867
,
2.61663
,
2.67444
,
2.73212
,
2.78965
,
2.84705
,
2.9043
,
2.96141
,
3.0184
,
3.07524
,
3.13196
,
2.73212
,
2.78965
,
2.84705
,
2.9043
,
2.96141
,
3.0184
,
3.07524
,
3.13196
,
...
@@ -308,12 +308,12 @@ def GBSAGBnForce(solventDielectric=78.5, soluteDielectric=1, SA=None,
...
@@ -308,12 +308,12 @@ def GBSAGBnForce(solventDielectric=78.5, soluteDielectric=1, SA=None,
custom
.
addPerParticleParameter
(
"or"
)
# Offset radius
custom
.
addPerParticleParameter
(
"or"
)
# Offset radius
custom
.
addPerParticleParameter
(
"sr"
)
# Scaled offset radius
custom
.
addPerParticleParameter
(
"sr"
)
# Scaled offset radius
custom
.
addTabulatedFunction
(
"getd0"
,
Discrete
1
DFunction
(
d0
))
custom
.
addTabulatedFunction
(
"getd0"
,
Discrete
2
DFunction
(
21
,
21
,
d0
))
custom
.
addTabulatedFunction
(
"getm0"
,
Discrete
1
DFunction
(
m0
))
custom
.
addTabulatedFunction
(
"getm0"
,
Discrete
2
DFunction
(
21
,
21
,
m0
))
custom
.
addComputedValue
(
"I"
,
"Ivdw+neckScale*Ineck;"
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);"
"Ineck=step(radius1+radius2+neckCut-r)*getm0(index
1,index2
)/(1+100*(r-getd0(index
1,index2
))^2+0.3*1000000*(r-getd0(index
1,index2
))^6);"
"index
= (
radius
2
*200-20
)*21 + (
radius
1
*200-20
)
;"
"index
1=
radius
1
*200-20
; index2=
radius
2
*200-20;"
"Ivdw=step(r+sr2-or1)*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);"
"Ivdw=step(r+sr2-or1)*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);"
"U=r+sr2;"
"U=r+sr2;"
"L=max(or1, D);"
"L=max(or1, D);"
...
@@ -350,12 +350,12 @@ def GBSAGBn2Force(solventDielectric=78.5, soluteDielectric=1, SA=None,
...
@@ -350,12 +350,12 @@ def GBSAGBn2Force(solventDielectric=78.5, soluteDielectric=1, SA=None,
custom
.
addPerParticleParameter
(
"beta"
)
custom
.
addPerParticleParameter
(
"beta"
)
custom
.
addPerParticleParameter
(
"gamma"
)
custom
.
addPerParticleParameter
(
"gamma"
)
custom
.
addTabulatedFunction
(
"getd0"
,
Discrete
1
DFunction
(
d0
))
custom
.
addTabulatedFunction
(
"getd0"
,
Discrete
2
DFunction
(
21
,
21
,
d0
))
custom
.
addTabulatedFunction
(
"getm0"
,
Discrete
1
DFunction
(
m0
))
custom
.
addTabulatedFunction
(
"getm0"
,
Discrete
2
DFunction
(
21
,
21
,
m0
))
custom
.
addComputedValue
(
"I"
,
"Ivdw+neckScale*Ineck;"
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);"
"Ineck=step(radius1+radius2+neckCut-r)*getm0(index
1,index2
)/(1+100*(r-getd0(index
1,index2
))^2+0.3*1000000*(r-getd0(index
1,index2
))^6);"
"index
= (
radius
2
*200-20
)*21 + (
radius
1
*200-20
)
;"
"index
1=
radius
1
*200-20
; index2=
radius
2
*200-20;"
"Ivdw=step(r+sr2-or1)*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);"
"Ivdw=step(r+sr2-or1)*0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r);"
"U=r+sr2;"
"U=r+sr2;"
"L=max(or1, D);"
"L=max(or1, D);"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment