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
9f700f0d
"platforms/cuda/vscode:/vscode.git/clone" did not exist on "c85acb36a151aa97cc51f8686e4cb24035be50a3"
Commit
9f700f0d
authored
Jun 17, 2011
by
Peter Eastman
Browse files
Added the enforcePeriodicBox flag to the Python wrapper
parent
fdf9b4ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
+11
-6
No files found.
wrappers/python/src/swig_doxygen/swig_lib/python/extend.i
View file @
9f700f0d
...
...
@@ -3,7 +3,8 @@
int
getVelocities
=
0
,
int
getForces
=
0
,
int
getEnergy
=
0
,
int
getParameters
=
0
)
{
int
getParameters
=
0
,
int
enforcePeriodic
=
0
)
{
int
types
;
double
simTime
;
PyObject
*
pPeriodicBoxVectorsList
;
...
...
@@ -20,7 +21,7 @@
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
State
state
=
self-
>
getState
(
types
)
;
State
state
=
self-
>
getState
(
types
,
enforcePeriodic
)
;
simTime
=
state
.
getTime
()
;
...
...
@@ -84,14 +85,16 @@
getVelocities
=
False
,
getForces
=
False
,
getEnergy
=
False
,
getParameters
=
False
)
:
getParameters
=
False
,
enforcePeriodicBox
=
False
)
:
"""
getState(self,
getPositions = False,
getVelocities = False,
getForces = False,
getEnergy=False,
getParameters=False)
getEnergy = False,
getParameters = False
enforcePeriodicBox = False)
-> State
"""
...
...
@@ -105,10 +108,12 @@
else
:
getE
=
0
if
getParameters
:
getPa
=
1
else
:
getPa
=
0
if
enforcePeriodicBox
:
enforcePeriodic
=
1
else
:
enforcePeriodic
=
0
(
simTime
,
periodicBoxVectorsList
,
energy
,
coordList
,
velList
,
forceList
,
paramMap
)
=
\
self
.
getStateAsLists
(
getP
,
getV
,
getF
,
getE
,
getPa
)
self
.
getStateAsLists
(
getP
,
getV
,
getF
,
getE
,
getPa
,
enforcePeriodic
)
state
=
State
(
simTime
=
simTime
,
energy
=
energy
,
...
...
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