gmx::ArrayRef<real> lambda = MASTER(cr) ? state_global->lambda : gmx::ArrayRef<real>();
initialize_lambdas(fplog, *ir, MASTER(cr), fep_state, lambda);
- if (ir->eI == eiNM)
+ if (ir->eI == IntegrationAlgorithm::NM)
{
GMX_ASSERT(shellfc != nullptr, "With NM we always support shells");
cr, ir, *top_global, top, fr, &ems->f, mdAtoms, constr, vsite, shellfc ? *shellfc : nullptr);
}
- update_mdatoms(mdAtoms->mdatoms(), ems->s.lambda[efptMASS]);
+ update_mdatoms(mdAtoms->mdatoms(), ems->s.lambda[FreeEnergyPerturbationCouplingType::Mass]);
if (constr)
{
// TODO how should this cross-module support dependency be managed?
- if (ir->eConstrAlg == econtSHAKE && gmx_mtop_ftype_count(top_global, F_CONSTR) > 0)
+ if (ir->eConstrAlg == ConstraintAlgorithm::Shake && gmx_mtop_ftype_count(top_global, F_CONSTR) > 0)
{
gmx_fatal(FARGS,
"Can not do energy minimization with %s, use %s\n",
- econstr_names[econtSHAKE],
- econstr_names[econtLINCS]);
+ enumValueToString(ConstraintAlgorithm::Shake),
+ enumValueToString(ConstraintAlgorithm::Lincs));
}
if (!ir->bContinuation)
ems->s.x.arrayRefWithPadding(),
ArrayRef<RVec>(),
ems->s.box,
- ems->s.lambda[efptFEP],
+ ems->s.lambda[FreeEnergyPerturbationCouplingType::Fep],
&dvdl_constr,
gmx::ArrayRefWithPadding<RVec>(),
computeVirial,
s2->x.arrayRefWithPadding(),
ArrayRef<RVec>(),
s2->box,
- s2->lambda[efptBONDED],
+ s2->lambda[FreeEnergyPerturbationCouplingType::Bonded],
&dvdl_constr,
gmx::ArrayRefWithPadding<RVec>(),
false,
}
// We should move this check to the different minimizers
- if (!validStep && ir->eI != eiSteep)
+ if (!validStep && ir->eI != IntegrationAlgorithm::Steep)
{
gmx_fatal(FARGS,
"The coordinates could not be constrained. Minimizer '%s' can not handle "
"constraint failures, use minimizer '%s' before using '%s'.",
- EI(ir->eI),
- EI(eiSteep),
- EI(ir->eI));
+ enumValueToString(ir->eI),
+ enumValueToString(IntegrationAlgorithm::Steep),
+ enumValueToString(ir->eI));
}
}
clear_mat(pres);
/* Communicate stuff when parallel */
- if (PAR(cr) && inputrec->eI != eiNM)
+ if (PAR(cr) && inputrec->eI != IntegrationAlgorithm::NM)
{
wallcycle_start(wcycle, ewcMoveE);
if (fr->dispersionCorrection)
{
/* Calculate long range corrections to pressure and energy */
- const DispersionCorrection::Correction correction =
- fr->dispersionCorrection->calculate(ems->s.box, ems->s.lambda[efptVDW]);
+ const DispersionCorrection::Correction correction = fr->dispersionCorrection->calculate(
+ ems->s.box, ems->s.lambda[FreeEnergyPerturbationCouplingType::Vdw]);
enerd->term[F_DISPCORR] = correction.energy;
enerd->term[F_EPOT] += correction.energy;
f,
f.unpaddedArrayRef(),
ems->s.box,
- ems->s.lambda[efptBONDED],
+ ems->s.lambda[FreeEnergyPerturbationCouplingType::Bonded],
&dvdl_constr,
gmx::ArrayRefWithPadding<RVec>(),
computeVirial,
clear_mat(ekin);
enerd->term[F_PRES] = calc_pres(fr->pbcType, inputrec->nwall, ems->s.box, ekin, vir, pres);
- if (inputrec->efep != efepNO)
+ if (inputrec->efep != FreeEnergyPerturbationType::No)
{
accumulateKineticLambdaComponents(enerd, ems->s.lambda, *inputrec->fepvals);
}