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
2b475dd3
Commit
2b475dd3
authored
Mar 21, 2011
by
Peter Eastman
Browse files
Python System objects can be pickled
parent
1e063047
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10754 deletions
+14
-10754
wrappers/python/CMakeLists.txt
wrappers/python/CMakeLists.txt
+4
-4
wrappers/python/simtk/openmm/openmm.py
wrappers/python/simtk/openmm/openmm.py
+0
-10749
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
+10
-1
No files found.
wrappers/python/CMakeLists.txt
View file @
2b475dd3
...
@@ -162,7 +162,7 @@ if(OPENMM_PYTHON_BUILD_SWIG)
...
@@ -162,7 +162,7 @@ if(OPENMM_PYTHON_BUILD_SWIG)
"
${
SWIG_OPENMM_DIR
}
/swigInputConfig.py"
"
${
SWIG_OPENMM_DIR
}
/swigInputConfig.py"
"
${
SWIG_OPENMM_DIR
}
/swigInputBuilder.py"
"
${
SWIG_OPENMM_DIR
}
/swigInputBuilder.py"
"
${
SWIG_OPENMM_DIR
}
/OpenMM_headers.xml"
"
${
SWIG_OPENMM_DIR
}
/OpenMM_headers.xml"
COMMENT
"Creating
Py
OpenMM
reference platform
swig input files..."
COMMENT
"Creating OpenMM
Python
swig input files..."
)
)
#~ swig -python -c++ \
#~ swig -python -c++ \
...
@@ -183,7 +183,7 @@ if(OPENMM_PYTHON_BUILD_SWIG)
...
@@ -183,7 +183,7 @@ if(OPENMM_PYTHON_BUILD_SWIG)
"
${
SWIG_OPENMM_DIR
}
/OpenMM.i"
"
${
SWIG_OPENMM_DIR
}
/OpenMM.i"
${
SWIG_INPUT_FILES_REF
}
${
SWIG_INPUT_FILES_REF
}
${
SWIG_INPUT_FILES2
}
${
SWIG_INPUT_FILES2
}
COMMENT
"Creating
Py
OpenMM module sources with swig..."
COMMENT
"Creating OpenMM
Python
module sources with swig..."
)
)
add_custom_target
(
RunSwig DEPENDS
add_custom_target
(
RunSwig DEPENDS
"
${
SWIG_OPENMM_DIR
}
/OpenMMSwig.cxx"
"
${
SWIG_OPENMM_DIR
}
/OpenMMSwig.cxx"
...
@@ -230,7 +230,7 @@ add_custom_command(
...
@@ -230,7 +230,7 @@ add_custom_command(
${
SHARED_TARGET
}
${
SHARED_TARGET
}
${
STAGING_OUTPUT_FILES
}
${
STAGING_OUTPUT_FILES
}
WORKING_DIRECTORY
${
OPENMM_PYTHON_STAGING_DIR
}
WORKING_DIRECTORY
${
OPENMM_PYTHON_STAGING_DIR
}
COMMENT
"Building
Py
OpenMM binary module..."
COMMENT
"Building OpenMM
Python
binary module..."
)
)
add_custom_target
(
BuildModule ALL DEPENDS
${
STAGING_OUTPUT_FILES
}
)
add_custom_target
(
BuildModule ALL DEPENDS
${
STAGING_OUTPUT_FILES
}
)
...
@@ -271,6 +271,6 @@ add_custom_target(PythonInstall
...
@@ -271,6 +271,6 @@ add_custom_target(PythonInstall
-P
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pysetupinstall.cmake"
-P
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pysetupinstall.cmake"
DEPENDS
${
STAGING_OUTPUT_FILES
}
${
OPENMM_PYTHON_STAGING_DIR
}
/build
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pysetupinstall.cmake"
DEPENDS
${
STAGING_OUTPUT_FILES
}
${
OPENMM_PYTHON_STAGING_DIR
}
/build
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pysetupinstall.cmake"
WORKING_DIRECTORY
${
OPENMM_PYTHON_STAGING_DIR
}
WORKING_DIRECTORY
${
OPENMM_PYTHON_STAGING_DIR
}
COMMENT
"Installing
Py
OpenMM binary module..."
COMMENT
"Installing OpenMM
Python
binary module..."
)
)
wrappers/python/simtk/openmm/openmm.py
deleted
100644 → 0
View file @
1e063047
This diff is collapsed.
Click to expand it.
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
View file @
2b475dd3
...
@@ -147,5 +147,14 @@
...
@@ -147,5 +147,14 @@
}
}
%
extend
OpenMM
::
System
{
%
pythoncode
{
def
__getstate__
(
self
)
:
serializationString
=
XmlSerializer
.
serializeSystem
(
self
)
return
serializationString
def
__setstate__
(
self
,
serializationString
)
:
system
=
XmlSerializer
.
deserializeSystem
(
serializationString
)
self
.
this
=
system
.
this
}
}
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