@@ -912,9 +912,9 @@ int colvarbias_meta::reflect_hill_multid(cvm::real const &h_scale)
912912 case multiple_replicas:
913913 add_hill (hill (cvm::step_absolute (), hill_weight*h_scale, curr_cv_values, colvar_sigmas, replica_id));
914914 std::ostream &replica_hills_os =
915- cvm::proxy->output_stream (replica_hills_file);
915+ cvm::proxy->output_stream (replica_hills_file, " replica hills file " );
916916 if (replica_hills_os) {
917- replica_hills_os << hills.back ();
917+ write_hill ( replica_hills_os, hills.back () );
918918 } else {
919919 return cvm::error (" Error: in metadynamics bias \" " +this ->name +" \" " +
920920 ((comm != single_replica) ? " , replica \" " +replica_id+" \" " : " " )+
@@ -1170,7 +1170,7 @@ int colvarbias_meta::update_bias()
11701170 std::ostream &replica_hills_os =
11711171 cvm::proxy->output_stream (replica_hills_file, " replica hills file" );
11721172 if (replica_hills_os) {
1173- replica_hills_os << hills.back ();
1173+ write_hill ( replica_hills_os, hills.back () );
11741174 } else {
11751175 return cvm::error (" Error: in metadynamics bias \" " +this ->name +" \" " +
11761176 ((comm != single_replica) ? " , replica \" " +replica_id+" \" " : " " )+
@@ -2471,7 +2471,10 @@ template <typename OST> OST &colvarbias_meta::write_state_data_template_(OST &os
24712471
24722472 // this is a very good time to project hills, if you haven't done
24732473 // it already!
2474- project_hills (new_hills_begin, hills.end (), hills_energy, hills_energy_gradients);
2474+ project_hills (new_hills_begin, hills.end (),
2475+ hills_energy, hills_energy_gradients,
2476+ which_int_llimit_cv, which_int_ulimit_cv,
2477+ interval_llimit, interval_ulimit);
24752478 new_hills_begin = hills.end ();
24762479
24772480 // write down the grids to the restart file
0 commit comments