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
196d01be
Commit
196d01be
authored
Jul 03, 2013
by
Robert McGibbon
Browse files
move after the unitstrip
parent
b4607862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
...pers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
+2
-4
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
View file @
196d01be
...
@@ -274,9 +274,6 @@ def stripUnits(args):
...
@@ -274,9 +274,6 @@ def stripUnits(args):
"""
"""
newArgList
=
[]
newArgList
=
[]
for
arg
in
args
:
for
arg
in
args
:
if
'
numpy
'
in
sys
.
modules
and
isinstance
(
arg
,
numpy
.
ndarray
)
:
arg
=
arg
.
tolist
()
if
unit
.
is_quantity
(
arg
)
:
if
unit
.
is_quantity
(
arg
)
:
#
JDC
:
Ugly
workaround
for
OpenMM
using
'
bar
'
for
fundamental
pressure
unit
.
#
JDC
:
Ugly
workaround
for
OpenMM
using
'
bar
'
for
fundamental
pressure
unit
.
if
arg
.
unit
.
is_compatible
(
unit
.
bar
)
:
if
arg
.
unit
.
is_compatible
(
unit
.
bar
)
:
...
@@ -284,7 +281,8 @@ def stripUnits(args):
...
@@ -284,7 +281,8 @@ def stripUnits(args):
else
:
else
:
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
#
JDC
:
End
workaround
.
#
JDC
:
End
workaround
.
#
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
if
'
numpy
'
in
sys
.
modules
and
isinstance
(
arg
,
numpy
.
ndarray
)
:
arg
=
arg
.
tolist
()
elif
isinstance
(
arg
,
dict
)
:
elif
isinstance
(
arg
,
dict
)
:
newKeys
=
stripUnits
(
arg
.
keys
())
newKeys
=
stripUnits
(
arg
.
keys
())
newValues
=
stripUnits
(
arg
.
values
())
newValues
=
stripUnits
(
arg
.
values
())
...
...
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