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
a34bb184
Unverified
Commit
a34bb184
authored
Aug 12, 2019
by
peastman
Committed by
GitHub
Aug 12, 2019
Browse files
Merge pull request #2368 from peastman/select
Improved robustness of custom GB forces
parents
3c5d19f8
c2153753
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wrappers/python/simtk/openmm/app/internal/customgbforces.py
wrappers/python/simtk/openmm/app/internal/customgbforces.py
+3
-3
No files found.
wrappers/python/simtk/openmm/app/internal/customgbforces.py
View file @
a34bb184
...
...
@@ -541,7 +541,7 @@ class GBSAHCTForce(CustomAmberGBForceBase):
self
.
addPerParticleParameter
(
"charge"
)
self
.
addPerParticleParameter
(
"or"
)
# Offset radius
self
.
addPerParticleParameter
(
"sr"
)
# Scaled offset radius
self
.
addComputedValue
(
"I"
,
"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);"
self
.
addComputedValue
(
"I"
,
"
select(
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)
, 0)
;"
"U=r+sr2;"
"L=max(or1, D);"
"D=abs(r-sr2)"
,
...
...
@@ -607,7 +607,7 @@ class GBSAOBC1Force(CustomAmberGBForceBase):
self
.
addPerParticleParameter
(
"charge"
)
self
.
addPerParticleParameter
(
"or"
)
# Offset radius
self
.
addPerParticleParameter
(
"sr"
)
# Scaled offset radius
self
.
addComputedValue
(
"I"
,
"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);"
self
.
addComputedValue
(
"I"
,
"
select(
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)
, 0)
;"
"U=r+sr2;"
"L=max(or1, D);"
"D=abs(r-sr2)"
,
CustomGBForce
.
ParticlePairNoExclusions
)
...
...
@@ -675,7 +675,7 @@ class GBSAOBC2Force(GBSAOBC1Force):
self
.
addPerParticleParameter
(
"charge"
)
self
.
addPerParticleParameter
(
"or"
)
# Offset radius
self
.
addPerParticleParameter
(
"sr"
)
# Scaled offset radius
self
.
addComputedValue
(
"I"
,
"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);"
self
.
addComputedValue
(
"I"
,
"
select(
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)
, 0)
;"
"U=r+sr2;"
"L=max(or1, D);"
"D=abs(r-sr2)"
,
CustomGBForce
.
ParticlePairNoExclusions
)
...
...
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