diff --git a/src/colvar.cpp b/src/colvar.cpp index 62c156765..be623a5a0 100644 --- a/src/colvar.cpp +++ b/src/colvar.cpp @@ -2560,7 +2560,7 @@ std::string const colvar::get_state_params() const << " x " << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width); - if (is_enabled(f_cv_external)) { + if (is_enabled(f_cv_external) && is_enabled(f_cv_extended_Lagrangian)) { // For an external colvar, x is one timestep in the future after integration // write x at beginning of timestep os << x_reported << "\n"; diff --git a/src/colvarbias.cpp b/src/colvarbias.cpp index 490a07811..7de84e0d5 100644 --- a/src/colvarbias.cpp +++ b/src/colvarbias.cpp @@ -100,11 +100,6 @@ int colvarbias::init(std::string const &conf) colvar_values[i].type(colvars[i]->value().type()); colvar_forces[i].type(colvar_values[i].type()); previous_colvar_forces[i].type(colvar_values[i].type()); - if (!colvars[i]->is_enabled(f_cv_total_force_current_step)) { - // If any colvar does not have current-step total force, then - // we can't do step 0 data - feature_states[f_cvb_step_zero_data].available = false; - } } output_prefix = cvm::output_prefix(); diff --git a/src/colvarbias_abf.cpp b/src/colvarbias_abf.cpp index ae598ce39..db140181a 100644 --- a/src/colvarbias_abf.cpp +++ b/src/colvarbias_abf.cpp @@ -136,6 +136,12 @@ int colvarbias_abf::init(std::string const &conf) enable(f_cvb_extended); } + if (!colvars[i]->is_enabled(f_cv_total_force_current_step)) { + // If any colvar does not have current-step total force, then + // we can't do step 0 data + provide(f_cvb_step_zero_data, false); + } + // Cannot mix and match coarse time steps with ABF because it gives // wrong total force averages - total force needs to be averaged over // every time step