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
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 @@
...
@@ -3,7 +3,8 @@
int
getVelocities
=
0
,
int
getVelocities
=
0
,
int
getForces
=
0
,
int
getForces
=
0
,
int
getEnergy
=
0
,
int
getEnergy
=
0
,
int
getParameters
=
0
)
{
int
getParameters
=
0
,
int
enforcePeriodic
=
0
)
{
int
types
;
int
types
;
double
simTime
;
double
simTime
;
PyObject
*
pPeriodicBoxVectorsList
;
PyObject
*
pPeriodicBoxVectorsList
;
...
@@ -20,7 +21,7 @@
...
@@ -20,7 +21,7 @@
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getForces
)
types
|=
State
::
Forces
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getEnergy
)
types
|=
State
::
Energy
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
if
(
getParameters
)
types
|=
State
::
Parameters
;
State
state
=
self-
>
getState
(
types
)
;
State
state
=
self-
>
getState
(
types
,
enforcePeriodic
)
;
simTime
=
state
.
getTime
()
;
simTime
=
state
.
getTime
()
;
...
@@ -84,14 +85,16 @@
...
@@ -84,14 +85,16 @@
getVelocities
=
False
,
getVelocities
=
False
,
getForces
=
False
,
getForces
=
False
,
getEnergy
=
False
,
getEnergy
=
False
,
getParameters
=
False
)
:
getParameters
=
False
,
enforcePeriodicBox
=
False
)
:
"""
"""
getState(self,
getState(self,
getPositions = False,
getPositions = False,
getVelocities = False,
getVelocities = False,
getForces = False,
getForces = False,
getEnergy=False,
getEnergy = False,
getParameters=False)
getParameters = False
enforcePeriodicBox = False)
-> State
-> State
"""
"""
...
@@ -105,10 +108,12 @@
...
@@ -105,10 +108,12 @@
else
:
getE
=
0
else
:
getE
=
0
if
getParameters
:
getPa
=
1
if
getParameters
:
getPa
=
1
else
:
getPa
=
0
else
:
getPa
=
0
if
enforcePeriodicBox
:
enforcePeriodic
=
1
else
:
enforcePeriodic
=
0
(
simTime
,
periodicBoxVectorsList
,
energy
,
coordList
,
velList
,
(
simTime
,
periodicBoxVectorsList
,
energy
,
coordList
,
velList
,
forceList
,
paramMap
)
=
\
forceList
,
paramMap
)
=
\
self
.
getStateAsLists
(
getP
,
getV
,
getF
,
getE
,
getPa
)
self
.
getStateAsLists
(
getP
,
getV
,
getF
,
getE
,
getPa
,
enforcePeriodic
)
state
=
State
(
simTime
=
simTime
,
state
=
State
(
simTime
=
simTime
,
energy
=
energy
,
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