"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "f680718e03f24febbf14a01eec52fdf064b862f7"
Commit a515a27a authored by Peter Eastman's avatar Peter Eastman
Browse files

Improved behavior of energy minimizer

parent a770038f
...@@ -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