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 @@ ...@@ -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,
......
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