"platforms/vscode:/vscode.git/clone" did not exist on "74ef687d1855f7d9ea7e987d4fafde0199804b55"
Commit 285a4d88 authored by Peter Eastman's avatar Peter Eastman
Browse files

LocalEnergyMinimizer does not move massless particles

parent c3ca5fc0
...@@ -63,7 +63,7 @@ static lbfgsfloatval_t evaluate(void *instance, const lbfgsfloatval_t *x, lbfgsf ...@@ -63,7 +63,7 @@ static lbfgsfloatval_t evaluate(void *instance, const lbfgsfloatval_t *x, lbfgsf
State state = context.getState(State::Forces | State::Energy); State state = context.getState(State::Forces | State::Energy);
const vector<Vec3>& forces = state.getForces(); const vector<Vec3>& forces = state.getForces();
for (int i = 0; i < numParticles; i++) { for (int i = 0; i < numParticles; i++) {
if (system.isVirtualSite(i)) { if (system.getParticleMass(i) == 0) {
g[3*i] = 0.0; g[3*i] = 0.0;
g[3*i+1] = 0.0; g[3*i+1] = 0.0;
g[3*i+2] = 0.0; g[3*i+2] = 0.0;
......
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