Commit e772769e authored by Peter Eastman's avatar Peter Eastman
Browse files

Added enforcePeriodicBox flag to RPMDIntegrator::getState()

parent 8b1c12e7
......@@ -142,8 +142,11 @@ public:
* @param copy the index of the copy for which to retrieve state information
* @param types the set of data types which should be stored in the State object. This
* should be a union of DataType values, e.g. (State::Positions | State::Velocities).
* @param enforcePeriodicBox if false, the position of each particle will be whatever position
* is stored by the integrator, regardless of periodic boundary conditions. If true, particle
* positions will be translated so the center of every molecule lies in the same periodic box.
*/
State getState(int copy, int types);
State getState(int copy, int types, bool enforcePeriodicBox=false);
/**
* Advance a simulation through time by taking a series of time steps.
*
......
......@@ -79,9 +79,9 @@ void RPMDIntegrator::setVelocities(int copy, const vector<Vec3>& velocities) {
hasSetVelocity = true;
}
State RPMDIntegrator::getState(int copy, int types) {
State RPMDIntegrator::getState(int copy, int types, bool enforcePeriodicBox) {
dynamic_cast<const IntegrateRPMDStepKernel&>(kernel.getImpl()).copyToContext(copy, *context);
return context->getOwner().getState(types);
return context->getOwner().getState(types, enforcePeriodicBox);
}
void RPMDIntegrator::step(int steps) {
......
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