if (MASTER(cr))
{
MimicCommunicator::init();
- auto nonConstGlobalTopology = const_cast<gmx_mtop_t*>(top_global);
+ auto nonConstGlobalTopology = const_cast<gmx_mtop_t*>(&top_global);
MimicCommunicator::sendInitData(nonConstGlobalTopology, state_global->x);
// TODO: Avoid changing inputrec (#3854)
auto* nonConstInputrec = const_cast<t_inputrec*>(inputrec);
gmx_bcast(sizeof(ir->nsteps), &nonConstInputrec->nsteps, cr->mpi_comm_mygroup);
}
- const SimulationGroups* groups = &top_global->groups;
+ const SimulationGroups* groups = &top_global.groups;
{
- auto nonConstGlobalTopology = const_cast<gmx_mtop_t*>(top_global);
- nonConstGlobalTopology->intermolecularExclusionGroup = genQmmmIndices(*top_global);
+ auto nonConstGlobalTopology = const_cast<gmx_mtop_t*>(&top_global);
+ nonConstGlobalTopology->intermolecularExclusionGroup = genQmmmIndices(top_global);
}
initialize_lambdas(fplog, *ir, MASTER(cr), &state_global->fep_state, state_global->lambda);
simulationsShareState,
ms);
gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
- *top_global,
+ top_global,
*ir,
pull_work,
mdoutf_get_fp_dhdl(outf),
runScheduleWork->simulationWork.useGpuPme);
{
- double io = compute_io(ir, top_global->natoms, *groups, energyOutput.numEnergyTerms(), 1);
+ double io = compute_io(ir, top_global.natoms, *groups, energyOutput.numEnergyTerms(), 1);
if ((io > 2000) && MASTER(cr))
{
fprintf(stderr, "\nWARNING: This run will generate roughly %.0f Mb of data\n\n", io);
std::unique_ptr<t_state> stateInstance;
t_state* state;
- gmx_localtop_t top(top_global->ffparams);
+ gmx_localtop_t top(top_global.ffparams);
if (DOMAINDECOMP(cr))
{
TRUE,
1,
state_global,
- *top_global,
+ top_global,
*ir,
imdSession,
pull_work,
/* Copy the pointer to the global state */
state = state_global;
- mdAlgorithmsSetupAtomData(cr, *ir, *top_global, &top, fr, &f, mdAtoms, constr, vsite, shellfc);
+ mdAlgorithmsSetupAtomData(cr, *ir, top_global, &top, fr, &f, mdAtoms, constr, vsite, shellfc);
}
auto mdatoms = mdAtoms->mdatoms();
checkNumberOfBondedInteractions(mdlog,
cr,
totalNumberOfBondedInteractions,
- *top_global,
+ top_global,
&top,
makeConstArrayRef(state->x),
state->box,
if (MASTER(cr))
{
- fprintf(stderr, "starting MiMiC MD run '%s'\n\n", *(top_global->name));
+ fprintf(stderr, "starting MiMiC MD run '%s'\n\n", *(top_global.name));
if (mdrunOptions.verbose)
{
fprintf(stderr,
bMasterState,
nstglobalcomm,
state_global,
- *top_global,
+ top_global,
*ir,
imdSession,
pull_work,
checkNumberOfBondedInteractions(mdlog,
cr,
totalNumberOfBondedInteractions,
- *top_global,
+ top_global,
&top,
makeConstArrayRef(state->x),
state->box,
}
{
- gmx::HostVector<gmx::RVec> fglobal(top_global->natoms);
+ gmx::HostVector<gmx::RVec> fglobal(top_global.natoms);
gmx::ArrayRef<gmx::RVec> ftemp;
gmx::ArrayRef<const gmx::RVec> flocal = f.view().force();
if (DOMAINDECOMP(cr))