"platforms/cuda/vscode:/vscode.git/clone" did not exist on "c85acb36a151aa97cc51f8686e4cb24035be50a3"
Commit 9f700f0d authored by Peter Eastman's avatar Peter Eastman
Browse files

Added the enforcePeriodicBox flag to the Python wrapper

parent fdf9b4ae
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment