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
5061a032
Commit
5061a032
authored
Apr 24, 2014
by
peastman
Browse files
Created Python API for LocalCoordinatesSite
parent
c88213f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
wrappers/python/src/swig_doxygen/swigInputConfig.py
wrappers/python/src/swig_doxygen/swigInputConfig.py
+4
-0
wrappers/python/src/swig_doxygen/swig_lib/python/typemaps.i
wrappers/python/src/swig_doxygen/swig_lib/python/typemaps.i
+8
-0
No files found.
wrappers/python/src/swig_doxygen/swigInputConfig.py
View file @
5061a032
...
...
@@ -191,6 +191,10 @@ UNITS = {
(
"*"
,
"getWeight12"
)
:
(
None
,
()),
(
"*"
,
"getWeight13"
)
:
(
None
,
()),
(
"*"
,
"getWeightCross"
)
:
(
None
,
()),
(
"LocalCoordinatesSite"
,
"getOriginWeights"
)
:
(
None
,
()),
(
"LocalCoordinatesSite"
,
"getXWeights"
)
:
(
None
,
()),
(
"LocalCoordinatesSite"
,
"getYWeights"
)
:
(
None
,
()),
(
"LocalCoordinatesSite"
,
"getLocalPosition"
)
:
(
"unit.nanometer"
,
()),
(
"SerializationNode"
,
"getChildren"
)
:
(
None
,
()),
(
"SerializationNode"
,
"getChildNode"
)
:
(
None
,
()),
(
"SerializationNode"
,
"getProperties"
)
:
(
None
,
()),
...
...
wrappers/python/src/swig_doxygen/swig_lib/python/typemaps.i
View file @
5061a032
...
...
@@ -117,6 +117,14 @@
Py_DECREF
(
args
)
;
}
%
typemap
(
out
)
const
Vec3&
{
PyObject
*
mm
=
PyImport_AddModule
(
"simtk.openmm"
)
;
PyObject
*
vec3
=
PyObject_GetAttrString
(
mm
,
"Vec3"
)
;
PyObject
*
args
=
Py_BuildValue
(
"(d,d,d)"
,
(
*
$
1
)[
0
],
(
*
$
1
)[
1
],
(
*
$
1
)[
2
])
;
$
result
=
PyObject_CallObject
(
vec3
,
args
)
;
Py_DECREF
(
args
)
;
}
/* Convert C++ (Vec3&, Vec3&, Vec3&) object to python tuple or tuples */
%
typemap
(
argout
)
(
Vec3&
a
,
Vec3&
b
,
Vec3&
c
)
{
// %typemap(argout) (Vec3& a, Vec3& b, Vec3& c)
...
...
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