gmx_cpp_t handle;
char *tmp_line=NULL;
char warn_buf[STRLEN];
-
+ const char *floating_point_arithmetic_tip =
+ "Total charge should normally be an integer. See\n"
+ "http://www.gromacs.org/Documentation/Floating_Point_Arithmetic\n"
+ "for discussion on how close it should be to an integer.\n";
/* We need to open the output file before opening the input file,
* because cpp_open_file can change the current working directory.
*/
if(!title)
title=put_symtab(symtab,"");
if (fabs(qt) > 1e-4) {
- sprintf(warn_buf,"System has non-zero total charge: %e\n\n",qt);
+ sprintf(warn_buf,"System has non-zero total charge: %.6f\n%s\n",qt,floating_point_arithmetic_tip);
warning_note(wi,warn_buf);
}
if (fabs(qBt) > 1e-4 && !gmx_within_tol(qBt,qt,1e-6)) {
- sprintf(warn_buf,"State B has non-zero total charge: %e\n\n",qBt);
+ sprintf(warn_buf,"State B has non-zero total charge: %.6f\n%s\n",qBt,floating_point_arithmetic_tip);
warning_note(wi,warn_buf);
}
DS_Done (&DS);