}
}
-void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
- warninp_t wi)
+void check_ir(const char *mdparin, const gmx::MdModulesNotifier &mdModulesNotifier,
+ t_inputrec *ir, t_gromppopts *opts, warninp_t wi)
/* Check internal consistency.
* NOTE: index groups are not set here yet, don't check things
* like temperature coupling group options here, but in triple_check
check_nst("nstcalcenergy", ir->nstcalcenergy,
"nstenergy", &ir->nstenergy, wi);
}
+
+ // Inquire all MdModules, if their parameters match with the energy
+ // calculation frequency
+ gmx::EnergyCalculationFrequencyErrors energyCalculationFrequencyErrors(ir->nstcalcenergy);
+ mdModulesNotifier.notifier_.notify(&energyCalculationFrequencyErrors);
+
+ // Emit all errors from the energy calculation frequency checks
+ for (const std::string &energyFrequencyErrorMessage : energyCalculationFrequencyErrors.errorMessages())
+ {
+ warning_error(wi, energyFrequencyErrorMessage);
+ }
}
if (ir->nsteps == 0 && !ir->bContinuation)