}
}
- // Local state only becomes valid now.
- std::unique_ptr<t_state> stateInstance;
- t_state* state;
-
- gmx_localtop_t top(top_global.ffparams);
ObservablesReducer observablesReducer = observablesReducerBuilder->build();
ForceBuffers f(simulationWork.useMts,
const t_mdatoms* md = mdAtoms->mdatoms();
if (DOMAINDECOMP(cr))
{
- stateInstance = std::make_unique<t_state>();
- state = stateInstance.get();
+ // Local state only becomes valid now.
dd_init_local_state(*cr->dd, state_global, state);
/* Distribute the charge groups over the nodes from the master node */
state,
&f,
mdAtoms,
- &top,
+ top,
fr,
vsite,
constr,
else
{
state_change_natoms(state_global, state_global->natoms);
- /* Copy the pointer to the global state */
- state = state_global;
/* Generate and initialize new topology */
- mdAlgorithmsSetupAtomData(cr, *ir, top_global, &top, fr, &f, mdAtoms, constr, vsite, shellfc);
+ mdAlgorithmsSetupAtomData(cr, *ir, top_global, top, fr, &f, mdAtoms, constr, vsite, shellfc);
upd.updateAfterPartition(state->natoms,
md->cFREEZE ? gmx::arrayRefFromArray(md->cFREEZE, md->nr)
cglo_flags_iteration |= CGLO_STOPCM;
cglo_flags_iteration &= ~CGLO_TEMPERATURE;
}
- if (DOMAINDECOMP(cr) && dd_localTopologyChecker(*cr->dd).shouldCheckNumberOfBondedInteractions()
- && cgloIteration == 0)
- {
- cglo_flags_iteration |= CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS;
- }
compute_globals(gstat,
cr,
ir,
inc_nrnb(nrnb, eNR_STOPCM, md->homenr);
}
}
- if (DOMAINDECOMP(cr))
- {
- dd_localTopologyChecker(cr->dd)->checkNumberOfBondedInteractions(
- &top, makeConstArrayRef(state->x), state->box);
- }
if (ir->eI == IntegrationAlgorithm::VVAK)
{
/* a second call to get the half step temperature initialized as well */
state,
&f,
mdAtoms,
- &top,
+ top,
fr,
vsite,
constr,
* the full step kinetic energy and possibly for T-coupling.*/
/* This may not be quite working correctly yet . . . . */
int cglo_flags = CGLO_GSTAT | CGLO_TEMPERATURE;
- if (DOMAINDECOMP(cr) && dd_localTopologyChecker(*cr->dd).shouldCheckNumberOfBondedInteractions())
- {
- cglo_flags |= CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS;
- }
compute_globals(gstat,
cr,
ir,
cglo_flags,
step,
&observablesReducer);
- if (DOMAINDECOMP(cr))
- {
- dd_localTopologyChecker(cr->dd)->checkNumberOfBondedInteractions(
- &top, makeConstArrayRef(state->x), state->box);
- }
}
clear_mat(force_vir);
pull_work,
bNS,
force_flags,
- &top,
+ top,
constr,
enerd,
state->natoms,
step,
nrnb,
wcycle,
- &top,
+ top,
state->box,
state->x.arrayRefWithPadding(),
&state->hist,
&fcdata,
&MassQ,
&vcm,
- top,
enerd,
&observablesReducer,
ekind,
integrator->set(stateGpu->getCoordinates(),
stateGpu->getVelocities(),
stateGpu->getForces(),
- top.idef,
+ top->idef,
*md);
// Copy data to the GPU after buffers might have being reinitialized
(bGStat ? CGLO_GSTAT : 0) | (!EI_VV(ir->eI) && bCalcEner ? CGLO_ENERGY : 0)
| (!EI_VV(ir->eI) && bStopCM ? CGLO_STOPCM : 0)
| (!EI_VV(ir->eI) ? CGLO_TEMPERATURE : 0)
- | (!EI_VV(ir->eI) ? CGLO_PRESSURE : 0) | CGLO_CONSTRAINT
- | (DOMAINDECOMP(cr) && dd_localTopologyChecker(*cr->dd).shouldCheckNumberOfBondedInteractions()
- ? CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS
- : 0),
+ | (!EI_VV(ir->eI) ? CGLO_PRESSURE : 0) | CGLO_CONSTRAINT,
step,
&observablesReducer);
- if (DOMAINDECOMP(cr))
- {
- dd_localTopologyChecker(cr->dd)->checkNumberOfBondedInteractions(
- &top, makeConstArrayRef(state->x), state->box);
- }
if (!EI_VV(ir->eI) && bStopCM)
{
process_and_stopcm_grp(
state,
&f,
mdAtoms,
- &top,
+ top,
fr,
vsite,
constr,