}
}
+/* TODO Decide whether this function can be consolidated with
+ * gmx_mtop_ftype_count */
static gmx_bool nint_ftype(gmx_mtop_t *mtop, t_molinfo *mi, int ftype)
{
int nint, mb;
nmismatch, (nmismatch == 1) ? "" : "s", topfile, confin);
warning(wi, buf);
}
+
+ /* Do more checks, mostly related to constraints */
if (bVerbose)
{
fprintf(stderr, "double-checking input for internal consistency...\n");
}
- double_check(ir, state->box, nint_ftype(sys, molinfo, F_CONSTR), wi);
+ {
+ int bHasNormalConstraints = 0 < (nint_ftype(sys, molinfo, F_CONSTR) +
+ nint_ftype(sys, molinfo, F_CONSTRNC));
+ int bHasAnyConstraints = bHasNormalConstraints || 0 < nint_ftype(sys, molinfo, F_SETTLE);
+ double_check(ir, state->box,
+ bHasNormalConstraints,
+ bHasAnyConstraints,
+ wi);
+ }
}
if (bGenVel)
check_disre(sys);
}
-void double_check(t_inputrec *ir, matrix box, gmx_bool bConstr, warninp_t wi)
+void double_check(t_inputrec *ir, matrix box,
+ gmx_bool bHasNormalConstraints,
+ gmx_bool bHasAnyConstraints,
+ warninp_t wi)
{
real min_size;
gmx_bool bTWIN;
warning_error(wi, ptr);
}
- if (bConstr && ir->eConstrAlg == econtSHAKE)
+ if (bHasNormalConstraints && ir->eConstrAlg == econtSHAKE)
{
if (ir->shake_tol <= 0.0)
{
}
}
- if ( (ir->eConstrAlg == econtLINCS) && bConstr)
+ if ( (ir->eConstrAlg == econtLINCS) && bHasNormalConstraints)
{
/* If we have Lincs constraints: */
if (ir->eI == eiMD && ir->etc == etcNO &&
}
}
- if (bConstr && ir->epc == epcMTTK)
+ if (bHasAnyConstraints && ir->epc == epcMTTK)
{
warning_note(wi, "MTTK with constraints is deprecated, and will be removed in GROMACS 5.1");
}
int search_string(const char *s, int ng, char *gn[]);
/* Returns the index of string s in the index groups */
-void double_check(t_inputrec *ir, matrix box, gmx_bool bConstr,
+void double_check(t_inputrec *ir, matrix box,
+ gmx_bool bHasNormalConstraints,
+ gmx_bool bHasAnyConstraints,
warninp_t wi);
/* Do more checks */