"platforms/reference/vscode:/vscode.git/clone" did not exist on "8190f24389d8c025f3dc99c99bd94c961c3114d9"
Commit 90007de2 authored by Peter Eastman's avatar Peter Eastman
Browse files

Added option to RPMDIntegrator.getState() to specify force groups

parent 6f6bee35
...@@ -145,8 +145,10 @@ public: ...@@ -145,8 +145,10 @@ public:
* @param enforcePeriodicBox if false, the position of each particle will be whatever position * @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 * 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. * positions will be translated so the center of every molecule lies in the same periodic box.
* @param groups a set of bit flags for which force groups to include when computing forces
* and energies. Group i will be included if (groups&(1<<i)) != 0. The default value includes all groups.
*/ */
State getState(int copy, int types, bool enforcePeriodicBox=false); State getState(int copy, int types, bool enforcePeriodicBox=false, int groups=0xFFFFFFFF);
/** /**
* Advance a simulation through time by taking a series of time steps. * Advance a simulation through time by taking a series of time steps.
* *
......
...@@ -81,9 +81,9 @@ void RPMDIntegrator::setVelocities(int copy, const vector<Vec3>& velocities) { ...@@ -81,9 +81,9 @@ void RPMDIntegrator::setVelocities(int copy, const vector<Vec3>& velocities) {
hasSetVelocity = true; hasSetVelocity = true;
} }
State RPMDIntegrator::getState(int copy, int types, bool enforcePeriodicBox) { State RPMDIntegrator::getState(int copy, int types, bool enforcePeriodicBox, int groups) {
dynamic_cast<IntegrateRPMDStepKernel&>(kernel.getImpl()).copyToContext(copy, *context); dynamic_cast<IntegrateRPMDStepKernel&>(kernel.getImpl()).copyToContext(copy, *context);
return context->getOwner().getState(types, enforcePeriodicBox); return context->getOwner().getState(types, enforcePeriodicBox, groups);
} }
void RPMDIntegrator::step(int steps) { 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