"not supported in combination with shell particles.\nPlease make a new tpr file.",
nstcalcenergy);
}
- if (usingDomainDecomposition)
+ if (nshell > 0 && usingDomainDecomposition)
{
gmx_fatal(
FARGS,
int a0, a1;
gmx_domdec_t* dd = nullptr;
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
dd = cr->dd;
a0 = 0;
std::vector<t_shell>& shells = shfc->shells;
shells.clear();
- auto ptype = md.ptype;
+ auto* ptype = md.ptype;
for (int i = a0; i < a1; i++)
{
if (ptype[i] == ParticleType::Shell)
double dt, w_dt;
int n, d;
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
n = dd_ac1;
}
rvec* x_old = as_rvec_array(xOld.paddedArrayRef().data());
rvec* x = as_rvec_array(xCurrent.paddedArrayRef().data());
- auto ptype = md.ptype;
- auto invmass = gmx::arrayRefFromArray(md.invmass, md.nr);
- dt = ir->delta_t;
+ auto* ptype = md.ptype;
+ auto invmass = gmx::arrayRefFromArray(md.invmass, md.nr);
+ dt = ir->delta_t;
- /* Does NOT work with freeze groups (yet) */
+ /* Does NOT work with freeze or acceleration groups (yet) */
for (n = 0; n < end; n++)
{
w_dt = invmass[n] * dt;
gmx::ForceBuffersView* f,
tensor force_vir,
const t_mdatoms& md,
+ CpuPpLongRangeNonbondeds* longRangeNonbondeds,
t_nrnb* nrnb,
- gmx_wallcycle_t wcycle,
+ gmx_wallcycle* wcycle,
gmx_shellfc_t* shfc,
t_forcerec* fr,
gmx::MdrunScheduleWorkload* runScheduleWork,
ArrayRef<t_shell> shells = shfc->shells;
const int nflexcon = shfc->nflexcon;
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
nat = dd_natoms_vsite(*cr->dd);
if (nflexcon > 0)
ArrayRef<RVec> x = xPadded.unpaddedArrayRef();
ArrayRef<RVec> v = vPadded.unpaddedArrayRef();
- if (bDoNS && inputrec->pbcType != PbcType::No && !DOMAINDECOMP(cr))
+ if (bDoNS && inputrec->pbcType != PbcType::No && !haveDDAtomOrdering(*cr))
{
/* This is the only time where the coordinates are used
* before do_force is called, which normally puts all
* charge groups in the box.
*/
- put_atoms_in_box_omp(fr->pbcType, box, x.subArray(0, md.homenr), gmx_omp_nthreads_get(emntDefault));
+ put_atoms_in_box_omp(
+ fr->pbcType, box, x.subArray(0, md.homenr), gmx_omp_nthreads_get(ModuleMultiThread::Default));
}
if (nflexcon)
mu_tot,
t,
nullptr,
+ longRangeNonbondeds,
(bDoNS ? GMX_FORCE_NS : 0) | shellfc_flags,
ddBalanceRegionHandler);
mu_tot,
t,
nullptr,
+ longRangeNonbondeds,
shellfc_flags,
ddBalanceRegionHandler);
accumulatePotentialEnergies(enerd, lambda, inputrec->fepvals.get());