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
c36c76ca
Unverified
Commit
c36c76ca
authored
Apr 11, 2022
by
Peter Eastman
Committed by
GitHub
Apr 11, 2022
Browse files
Fixed return type of getTabulatedFunction() (#3565)
parent
aafb8b5b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
wrappers/python/src/swig_doxygen/swigInputBuilder.py
wrappers/python/src/swig_doxygen/swigInputBuilder.py
+1
-0
wrappers/python/tests/TestAPIUnits.py
wrappers/python/tests/TestAPIUnits.py
+3
-0
No files found.
wrappers/python/src/swig_doxygen/swigInputBuilder.py
View file @
c36c76ca
...
...
@@ -125,6 +125,7 @@ def getClassMethodList(classNode, skipMethods):
for
memberNode
in
findNodes
(
section
,
"memberdef"
,
kind
=
"function"
,
prot
=
"public"
):
methDefinition
=
getText
(
"definition"
,
memberNode
)
shortMethDefinition
=
stripOpenmmPrefix
(
methDefinition
)
shortMethDefinition
=
shortMethDefinition
.
replace
(
' &'
,
'&'
)
methName
=
shortMethDefinition
.
split
()[
-
1
]
if
(
shortClassName
,
methName
)
in
skipMethods
:
continue
numParams
=
len
(
findNodes
(
memberNode
,
'param'
))
...
...
wrappers/python/tests/TestAPIUnits.py
View file @
c36c76ca
...
...
@@ -466,6 +466,7 @@ class TestAPIUnits(unittest.TestCase):
force
.
addPerParticleParameter
(
'm'
)
force
.
addParticle
([
1
,
2
,
3
])
force
.
addParticle
([
1
*
coulombs
,
2
*
kilocalories_per_mole
*
angstroms
**
2
,
3
*
kilocalories_per_mole
*
angstroms
**
3
])
force
.
addTabulatedFunction
(
'f'
,
Continuous1DFunction
([
1
,
2
,
3
,
4
,
5
],
0.0
,
2.0
))
self
.
assertEqual
(
force
.
getNumParticles
(),
2
)
charge
,
sigma
,
epsilon
=
force
.
getParticleParameters
(
0
)
...
...
@@ -495,6 +496,8 @@ class TestAPIUnits(unittest.TestCase):
force
.
setNonbondedMethod
(
CustomNonbondedForce
.
CutoffPeriodic
)
self
.
assertTrue
(
force
.
usesPeriodicBoundaryConditions
())
self
.
assertIs
(
type
(
force
.
getTabulatedFunction
(
0
)),
Continuous1DFunction
)
def
testCustomManyParticleForce
(
self
):
""" Tests the CustomManyParticleForce API features """
force
=
CustomManyParticleForce
(
3
,
...
...
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