git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13670 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2015-07-22 14:36:59 +00:00
parent f9b7502079
commit 6e40300d26
15 changed files with 246 additions and 56 deletions

View File

@ -256,6 +256,29 @@ int colvarscript::proc_colvar(int argc, char const *argv[]) {
return COLVARSCRIPT_OK;
}
if (subcmd == "cvcflags") {
if (argc < 4) {
result = "cvcflags: missing parameter: vector of flags";
return COLVARSCRIPT_ERROR;
}
std::string flags_str = argv[3];
std::istringstream is(flags_str);
std::vector<bool> flags;
int flag;
while (is >> flag) {
flags.push_back(flag != 0);
}
int res = cv->set_cvc_flags(flags);
if (res != COLVARS_OK) {
result = "Error setting CVC flags";
return COLVARSCRIPT_ERROR;
}
result = "0";
return COLVARSCRIPT_OK;
}
result = "Syntax error\n" + help_string();
return COLVARSCRIPT_ERROR;
}