diff --git a/src/colvar_geometricpath.h b/src/colvar_geometricpath.h index ae28f6dda..51f97bb67 100644 --- a/src/colvar_geometricpath.h +++ b/src/colvar_geometricpath.h @@ -8,13 +8,13 @@ // Colvars repository at GitHub. -#include "colvarmodule.h" - -#include -#include #include +#include #include -#include +#include + +#include "colvarmodule.h" + namespace GeometricPathCV { @@ -172,10 +172,14 @@ void GeometricPathBase::determineClosestFr sign = -1; } if (cvm::fabs(static_cast(frame_index[0]) - static_cast(frame_index[1])) > 1) { - std::cout << "Warning: Geometrical pathCV relies on the assumption that the second closest frame is the neighbouring frame\n"; - std::cout << " Please check your configuration or increase restraint on z(σ)\n"; + std::string message( + "Warning: Geometrical pathCV relies on the assumption that the second closest frame is " + "the neighbouring frame\n" + " Please check your configuration or increase restraint on z(σ)\n"); for (size_t i_frame = 0; i_frame < frame_index.size(); ++i_frame) { - std::cout << "Frame index: " << frame_index[i_frame] << " ; optimal RMSD = " << frame_distances[frame_index[i_frame]] << "\n"; + message += "Frame index: " + cvm::to_str(frame_index[i_frame]) + + " ; optimal RMSD = " + cvm::to_str(frame_distances[frame_index[i_frame]]) + + "\n"; } } min_frame_index_1 = frame_index[0]; // s_m