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
708c4246
Commit
708c4246
authored
Feb 26, 2014
by
Lee-Ping
Browse files
Merge branch 'master' of github.com:SimTk/openmm
parents
d284e2b8
ec90b4bb
Changes
85
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
21 deletions
+30
-21
wrappers/python/simtk/openmm/app/internal/amber_file_parser.py
...ers/python/simtk/openmm/app/internal/amber_file_parser.py
+1
-1
wrappers/python/simtk/openmm/app/internal/customgbforces.py
wrappers/python/simtk/openmm/app/internal/customgbforces.py
+7
-7
wrappers/python/simtk/openmm/app/pdbfile.py
wrappers/python/simtk/openmm/app/pdbfile.py
+2
-0
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+5
-0
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
...pers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
+15
-13
No files found.
wrappers/python/simtk/openmm/app/internal/amber_file_parser.py
View file @
708c4246
...
...
@@ -890,7 +890,7 @@ def readAmberSystem(prmtop_filename=None, prmtop_loader=None, shake=None, gbmode
else
:
raise
Exception
(
"Illegal value specified for implicit solvent model"
)
for
iAtom
in
range
(
prmtop
.
getNumAtoms
()):
if
gbmodel
==
'OBC2'
:
if
gbmodel
==
'OBC2'
and
implicitSolventKappa
==
0
:
gb
.
addParticle
(
charges
[
iAtom
],
gb_parms
[
iAtom
][
0
],
gb_parms
[
iAtom
][
1
])
elif
gbmodel
==
'GBn2'
:
gb
.
addParticle
([
charges
[
iAtom
],
gb_parms
[
iAtom
][
0
],
gb_parms
[
iAtom
][
1
],
...
...
wrappers/python/simtk/openmm/app/internal/customgbforces.py
View file @
708c4246
...
...
@@ -6,9 +6,9 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012 University of Virginia and the Authors.
Portions copyright (c) 2012
-2014
University of Virginia and the Authors.
Authors: Christoph Klein, Michael R. Shirts
Contributors: Jason M. Swails
Contributors: Jason M. Swails
, Peter Eastman
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
...
...
@@ -31,7 +31,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
from
__future__
import
division
from
simtk.openmm
import
CustomGBForce
from
simtk.openmm
import
CustomGBForce
,
Discrete1DFunction
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
,
...
...
@@ -331,8 +331,8 @@ def GBSAGBnForce(solventDielectric=78.5, soluteDielectric=1, SA=None,
custom
.
addGlobalParameter
(
"neckScale"
,
0.361825
)
custom
.
addGlobalParameter
(
"neckCut"
,
0.68
)
custom
.
addFunction
(
"getd0"
,
d0
,
0
,
440
)
custom
.
addFunction
(
"getm0"
,
m0
,
0
,
440
)
custom
.
add
Tabulated
Function
(
"getd0"
,
Discrete1DFunction
(
d0
)
)
custom
.
add
Tabulated
Function
(
"getm0"
,
Discrete1DFunction
(
m0
)
)
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);"
...
...
@@ -380,8 +380,8 @@ def GBSAGBn2Force(solventDielectric=78.5, soluteDielectric=1, SA=None,
custom
.
addGlobalParameter
(
"neckScale"
,
0.826836
)
custom
.
addGlobalParameter
(
"neckCut"
,
0.68
)
custom
.
addFunction
(
"getd0"
,
d0
,
0
,
440
)
custom
.
addFunction
(
"getm0"
,
m0
,
0
,
440
)
custom
.
add
Tabulated
Function
(
"getd0"
,
Discrete1DFunction
(
d0
)
)
custom
.
add
Tabulated
Function
(
"getm0"
,
Discrete1DFunction
(
m0
)
)
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);"
...
...
wrappers/python/simtk/openmm/app/pdbfile.py
View file @
708c4246
...
...
@@ -116,6 +116,8 @@ class PDBFile(object):
element
=
elem
.
lithium
elif
upper
.
startswith
(
'K'
):
element
=
elem
.
potassium
elif
upper
.
startswith
(
'ZN'
):
element
=
elem
.
zinc
elif
(
len
(
residue
)
==
1
and
upper
.
startswith
(
'CA'
)
):
element
=
elem
.
calcium
else
:
...
...
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
708c4246
...
...
@@ -136,6 +136,10 @@ NO_OUTPUT_ARGS = [('LocalEnergyMinimizer', 'minimize', 'context'),
STEAL_OWNERSHIP
=
{(
"Platform"
,
"registerPlatform"
)
:
[
0
],
(
"System"
,
"addForce"
)
:
[
0
],
(
"System"
,
"setVirtualSite"
)
:
[
1
],
(
"CustomNonbondedForce"
,
"addTabulatedFunction"
)
:
[
1
],
(
"CustomGBForce"
,
"addTabulatedFunction"
)
:
[
1
],
(
"CustomHbondForce"
,
"addTabulatedFunction"
)
:
[
1
],
(
"CustomCompoundBondForce"
,
"addTabulatedFunction"
)
:
[
1
],
}
# This is a list of units to attach to return values and method args.
...
...
@@ -179,6 +183,7 @@ UNITS = {
(
"*"
,
"getSolventDielectric"
)
:
(
None
,
()),
(
"*"
,
"getStepSize"
)
:
(
"unit.picosecond"
,
()),
(
"*"
,
"getSystem"
)
:
(
None
,
()),
(
"*"
,
"getTabulatedFunction"
)
:
(
None
,
()),
(
"*"
,
"getUseDispersionCorrection"
)
:
(
None
,
()),
(
"*"
,
"getTemperature"
)
:
(
"unit.kelvin"
,
()),
(
"*"
,
"getUseDispersionCorrection"
)
:
(
None
,
()),
...
...
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
View file @
708c4246
...
...
@@ -219,19 +219,21 @@ class State(_object):
#
Strings
can
cause
trouble
#
as
can
any
container
that
has
infinite
levels
of
containment
def
_is_string
(
x
)
:
#
step
1
)
String
is
always
a
container
#
and
its
contents
are
themselves
containers
.
try
:
first_item
=
iter
(
x
)
.
next
()
inner_item
=
iter
(
first_item
)
.
next
()
if
first_item
==
inner_item
:
return
True
else
:
return
False
except
TypeError
:
return
False
except
StopIteration
:
return
False
#
step
1
)
String
is
always
a
container
#
and
its
contents
are
themselves
containers
.
try
:
first_item
=
iter
(
x
)
.
next
()
inner_item
=
iter
(
first_item
)
.
next
()
if
first_item
==
inner_item
:
return
True
else
:
return
False
except
TypeError
:
return
False
except
StopIteration
:
return
False
except
ValueError
:
return
False
def
stripUnits
(
args
)
:
"""
...
...
Prev
1
2
3
4
5
Next
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