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
5e687c30
Unverified
Commit
5e687c30
authored
Feb 15, 2022
by
Raimondas Galvelis
Committed by
GitHub
Feb 15, 2022
Browse files
Fix GIL for OpenMM::CustomCVForce::getCollectiveVariableValues (#3463)
parent
4358f071
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
wrappers/python/src/swig_doxygen/swig_lib/python/exceptions.i
...pers/python/src/swig_doxygen/swig_lib/python/exceptions.i
+14
-0
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/exceptions.i
View file @
5e687c30
...
...
@@ -65,3 +65,17 @@
}
PyEval_RestoreThread
(
_savePythonThreadState
)
;
}
%
exception
OpenMM
::
CustomCVForce
::
getCollectiveVariableValues
{
PyThreadState
*
_savePythonThreadState
=
PyEval_SaveThread
()
;
try
{
$
action
}
catch
(
std
::
exception
&
e)
{
PyEval_RestoreThread
(
_savePythonThreadState
)
;
PyObject
*
mm
=
PyImport_AddModule
(
"openmm"
)
;
PyObject
*
openmm_exception
=
PyObject_GetAttrString
(
mm
,
"OpenMMException"
)
;
PyErr_SetString
(
openmm_exception
,
const_cast
<
char
*>
(
e
.
what
()))
;
return
NULL
;
}
PyEval_RestoreThread
(
_savePythonThreadState
)
;
}
\ No newline at end of file
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