Unverified Commit ed049af1 authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Fixed an incorrectly sized array (#4061)

parent 7af565ed
......@@ -86,7 +86,7 @@ ReferenceCustomCVForce::ReferenceCustomCVForce(const CustomCVForce& force) {
paramDerivExpressions.clear();
for (auto& name : paramDerivNames)
paramDerivExpressions.push_back(energyExpr.differentiate(name).createCompiledExpression());
globalValues.resize(variableNames.size());
globalValues.resize(globalParameterNames.size());
cvValues.resize(numCVs);
map<string, double*> variableLocations;
for (int i = 0; i < globalParameterNames.size(); i++)
......
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