Skip to content

Commit

Permalink
fix: ensure the compatibility with PLUMED again
Browse files Browse the repository at this point in the history
PLUMED does not write "min_" and "max_" for periodic CVs.
  • Loading branch information
HanatoK committed Sep 5, 2024
1 parent 51ba7c2 commit 0558c4b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/colvarbias_opes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1684,11 +1684,13 @@ int colvarbias_opes::write_output_files() {
os_kernels << "#! SET kernel_cutoff " << m_cutoff << "\n";
os_kernels << "#! SET compression_threshold " << m_compression_threshold << "\n";
for (size_t i = 0; i < num_variables(); ++i) {
if (variables(i)->is_enabled(f_cv_lower_boundary)) {
os_kernels << "#! SET min_" + variables(i)->name + " " << variables(i)->lower_boundary.real_value << "\n";
}
if (variables(i)->is_enabled(f_cv_upper_boundary)) {
os_kernels << "#! SET max_" + variables(i)->name + " " << variables(i)->upper_boundary.real_value << "\n";
if (variables(i)->is_enabled(f_cv_periodic)) {
if (variables(i)->is_enabled(f_cv_lower_boundary)) {
os_kernels << "#! SET min_" + variables(i)->name + " " << variables(i)->lower_boundary.real_value << "\n";
}
if (variables(i)->is_enabled(f_cv_upper_boundary)) {
os_kernels << "#! SET max_" + variables(i)->name + " " << variables(i)->upper_boundary.real_value << "\n";
}
}
}
}
Expand Down

0 comments on commit 0558c4b

Please sign in to comment.