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
ffdce362
Commit
ffdce362
authored
May 31, 2013
by
peastman
Browse files
Created Python API for ring polymer contraction
parent
8656e3ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
wrappers/python/src/swig_doxygen/OpenMM.i
wrappers/python/src/swig_doxygen/OpenMM.i
+1
-0
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+1
-0
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
...pers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
+3
-10
No files found.
wrappers/python/src/swig_doxygen/OpenMM.i
View file @
ffdce362
...
...
@@ -31,6 +31,7 @@ namespace std {
%
template
(
vectorstring
)
vector
<
string
>
;
%
template
(
mapstringstring
)
map
<
string
,
string
>
;
%
template
(
mapstringdouble
)
map
<
string
,
double
>
;
%
template
(
mapii
)
map
<
int
,
int
>
;
}
;
%
include
"windows.i"
...
...
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
ffdce362
...
...
@@ -446,5 +446,6 @@ UNITS = {
(
"DrudeLangevinIntegrator"
,
"getDrudeTemperature"
)
:
(
"unit.kelvin"
,
()),
(
"DrudeLangevinIntegrator"
,
"getDrudeFriction"
)
:
(
"1/unit.picosecond"
,
()),
(
"DrudeSCFIntegrator"
,
"getMinimizationErrorTolerance"
)
:
(
"unit.kilojoules_per_mole/unit.nanometer"
,
()),
(
"RPMDIntegrator"
,
"getContractions"
)
:
(
None
,
()),
}
wrappers/python/src/swig_doxygen/swig_lib/python/pythoncode.i
View file @
ffdce362
...
...
@@ -282,16 +282,9 @@ def stripUnits(args):
#
JDC
:
End
workaround
.
#
arg
=
arg
.
value_in_unit_system
(
unit
.
md_unit_system
)
elif
isinstance
(
arg
,
dict
)
:
newArg
=
{}
for
key
in
arg
:
newKey
=
key
newValue
=
arg
[
key
]
if
not
_is_string
(
newKey
)
:
newKey
=
stripUnits
(
newKey
)
if
not
_is_string
(
newValue
)
:
newValue
=
stripUnits
(
newValue
)
newArg
[
newKey
]
=
newValue
arg
=
newArg
newKeys
=
stripUnits
(
arg
.
keys
())
newValues
=
stripUnits
(
arg
.
values
())
arg
=
dict
(
zip
(
newKeys
,
newValues
))
elif
not
_is_string
(
arg
)
:
try
:
iter
(
arg
)
...
...
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