Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda-ABF implementation for the NAMD interface #649

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix parsing of white-space only blocks
  • Loading branch information
jhenin committed Nov 29, 2024
commit b99011a70e7500521ab558f83d86a9967a9146a4
5 changes: 3 additions & 2 deletions src/colvarparse.cpp
Original file line number Diff line number Diff line change
@@ -592,7 +592,7 @@ int colvarparse::check_keywords(std::string &conf, char const *key)
{
if (cvm::debug())
cvm::log("Configuration string for \""+std::string(key)+
"\": \"\n"+conf+"\".\n");
"\":\n\""+conf+"\".\n");

strip_values(conf);
// after stripping, the config string has either empty lines, or
@@ -833,7 +833,8 @@ bool colvarparse::key_lookup(std::string const &conf,
data_end) + 1;
}

if (data != NULL) {
// data_end < data_begin means that the data or block contains only whitespace
if (data != NULL && data_end > data_begin) {
data->append(line, data_begin, (data_end-data_begin));

if (cvm::debug()) {