Update Colvars to version 2020-07-07

This update contains several fixes and small new features or usability
improvements.  Descriptions and authorship information can be accessed from
the pull requests listed below.

Skip the zero-step also when multiple run commands are executed in sequence (@giacomofiorin)
https://github.com/Colvars/colvars/pull/357

Do not accumulate data at step 0 (@giacomofiorin)
https://github.com/Colvars/colvars/pull/345

Support for symmetry permutations of atoms in RMSD (@jhenin)
https://github.com/Colvars/colvars/pull/344

Detect new grid parameters (@jhenin)
https://github.com/Colvars/colvars/pull/341

Only access the output streams in non-threaded regions (@giacomofiorin)
https://github.com/Colvars/colvars/pull/338

Fix incomplete setting of default colvarsRestartFrequency (@giacomofiorin)
https://github.com/Colvars/colvars/pull/334

Fix typo (@e-kwsm)
https://github.com/Colvars/colvars/pull/333

Convert the input keyword to lowercase in read_state_data_key (@HanatoK)
https://github.com/Colvars/colvars/pull/332

Implement reflecting b.c. for ext Lagrangian (@jhenin)
https://github.com/Colvars/colvars/pull/329
This commit is contained in:
Giacomo Fiorin
2020-09-04 14:46:27 -04:00
parent d995ed0d87
commit 85c394453c
45 changed files with 3238 additions and 1582 deletions

View File

@ -30,9 +30,10 @@ int colvarbias_histogram::init(std::string const &conf)
size_t i;
get_keyval(conf, "outputFile", out_name, std::string(""));
get_keyval(conf, "outputFileDX", out_name_dx, std::string(""));
get_keyval(conf, "outputFreq", output_freq, cvm::restart_out_freq);
get_keyval(conf, "outputFile", out_name, "");
// Write DX file by default only in dimension >= 3
std::string default_name_dx = this->num_variables() > 2 ? "" : "none";
get_keyval(conf, "outputFileDX", out_name_dx, default_name_dx);
/// with VMD, this may not be an error
// if ( output_freq == 0 ) {
@ -146,8 +147,10 @@ int colvarbias_histogram::update()
bin[i] = grid->current_bin_scalar(i);
}
if (grid->index_ok(bin)) {
grid->acc_value(bin, 1.0);
if (can_accumulate_data()) {
if (grid->index_ok(bin)) {
grid->acc_value(bin, 1.0);
}
}
} else {
// update indices for vector/array values
@ -163,10 +166,6 @@ int colvarbias_histogram::update()
}
}
if (output_freq && (cvm::step_absolute() % output_freq) == 0) {
write_output_files();
}
error_code |= cvm::get_error();
return error_code;
}
@ -179,7 +178,7 @@ int colvarbias_histogram::write_output_files()
return COLVARS_OK;
}
if (out_name.size()) {
if (out_name.size() && out_name != "none") {
cvm::log("Writing the histogram file \""+out_name+"\".\n");
cvm::backup_file(out_name.c_str());
std::ostream *grid_os = cvm::proxy->output_stream(out_name);
@ -191,7 +190,7 @@ int colvarbias_histogram::write_output_files()
cvm::proxy->close_output_stream(out_name);
}
if (out_name_dx.size()) {
if (out_name_dx.size() && out_name_dx != "none") {
cvm::log("Writing the histogram file \""+out_name_dx+"\".\n");
cvm::backup_file(out_name_dx.c_str());
std::ostream *grid_os = cvm::proxy->output_stream(out_name_dx);