Unverified Commit 81bad1bc authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2255 from peastman/minimize

Improved behavior of energy minimizer
parents a770038f a515a27a
...@@ -152,7 +152,7 @@ void LocalEnergyMinimizer::minimize(Context& context, double tolerance, int maxI ...@@ -152,7 +152,7 @@ void LocalEnergyMinimizer::minimize(Context& context, double tolerance, int maxI
int numParticles = system.getNumParticles(); int numParticles = system.getNumParticles();
double constraintTol = context.getIntegrator().getConstraintTolerance(); double constraintTol = context.getIntegrator().getConstraintTolerance();
double workingConstraintTol = std::max(1e-4, constraintTol); double workingConstraintTol = std::max(1e-4, constraintTol);
double k = tolerance/workingConstraintTol; double k = 100/workingConstraintTol;
lbfgsfloatval_t *x = lbfgs_malloc(numParticles*3); lbfgsfloatval_t *x = lbfgs_malloc(numParticles*3);
if (x == NULL) if (x == NULL)
throw OpenMMException("LocalEnergyMinimizer: Failed to allocate memory"); throw OpenMMException("LocalEnergyMinimizer: Failed to allocate memory");
......
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