#include "warninp.h"
#include "gmx_fatal.h"
-/* find an entry; return index, or -1 if not found */
-static int search_einp(int ninp, const t_inpfile *inp, const char *name);
-
-
t_inpfile *read_inpfile(const char *fn, int *ninp,
warninp_t wi)
{
}
}
-static int search_einp(int ninp, const t_inpfile *inp, const char *name)
+int search_einp(int ninp, const t_inpfile *inp, const char *name)
{
int i;
snew(dumstr[0], STRLEN);
snew(dumstr[1], STRLEN);
+ if (-1 == search_einp(ninp, inp, "cutoff-scheme"))
+ {
+ sprintf(warn_buf,
+ "%s did not specify a value for the .mdp option "
+ "\"cutoff-scheme\". Probably it was first intended for use "
+ "with GROMACS before 4.6. In 4.6, the Verlet scheme was "
+ "introduced, but the group scheme was still the default. "
+ "The default is now the Verlet scheme, so you will observe "
+ "different behaviour.", mdparin);
+ warning_note(wi, warn_buf);
+ }
+
/* remove the following deprecated commands */
REM_TYPE("title");
REM_TYPE("cpp");
void replace_inp_entry(int ninp, t_inpfile *inp,
const char *old_entry, const char *new_entry);
+int search_einp(int ninp, const t_inpfile *inp, const char *name);
+/* Return the index of an .mdp field with the given name within the
+ * inp array, if it exists. Return -1 if it does not exist. */
+
int get_eint(int *ninp, t_inpfile **inp, const char *name, int def,
warninp_t wi);