diff --git a/src/tools/Keywords.cpp b/src/tools/Keywords.cpp index 9daa2efd7d..778765d4d1 100644 --- a/src/tools/Keywords.cpp +++ b/src/tools/Keywords.cpp @@ -202,7 +202,7 @@ void Keywords::add( const std::string & t, const std::string & k, const std::str void Keywords::addFlag( const std::string & k, const bool def, const std::string & d ) { plumed_massert( !exists(k) && !reserved(k), "keyword " + k + " has already been registered"); std::string defstr; plumed_massert( !def, "the second argument to addFlag must be false " + k ); - if( def ) { defstr="( default=on ) "; } else { defstr="( default=off ) "; } + defstr="( default=off ) "; types.insert( std::pair(k,KeyType("flag")) ); documentation.insert( std::pair(k,defstr + d) ); allowmultiple.insert( std::pair(k,false) );