From fc6b17b82a02ea1ea9142db5be8f7e882ad16ff5 Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Thu, 26 Aug 2021 22:28:44 -0400 Subject: [PATCH] improve whitespace handling previously, spaces inside of custom 'rxn' functions could cause issues --- src/REACTION/fix_bond_react.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index afde115ef1..bb245f0ee3 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -2118,6 +2118,7 @@ double FixBondReact::custom_constraint(std::string varstr) evlstr.push_back(varstr.substr(prev3+1,pos1-(prev3+1))); prev3 = pos3; argstr = varstr.substr(pos2+1,pos3-pos2-1); + argstr.erase(remove_if(argstr.begin(), argstr.end(), isspace), argstr.end()); // remove whitespace pos2 = argstr.find(","); if (pos2 != std::string::npos) { varid = argstr.substr(0,pos2);