t_state* state,
t_state* state_global,
ObservablesHistory* observablesHistory,
- const gmx_mtop_t* top_global,
+ const gmx_mtop_t& top_global,
t_forcerec* fr,
gmx_mdoutf_t outf,
const gmx::EnergyOutput& energyOutput,
// This duplication is needed while both legacy and modular code paths are in use.
// TODO: Remove duplication asap, make sure to keep in sync in the meantime.
mdoutf_write_to_trajectory_files(
- fplog, cr, outf, mdof_flags, top_global->natoms, step, t, state, state_global, observablesHistory, f, &checkpointDataHolder);
+ fplog, cr, outf, mdof_flags, top_global.natoms, step, t, state, state_global, observablesHistory, f, &checkpointDataHolder);
if (bLastStep && step_rel == ir->nsteps && bDoConfOut && MASTER(cr) && !bRerunMD)
{
if (fr->bMolPBC && state == state_global)
if (fr->bMolPBC && !ir->bPeriodicMols)
{
/* Make molecules whole only for confout writing */
- do_pbc_mtop(ir->pbcType, state->box, top_global, x_for_confout);
+ do_pbc_mtop(ir->pbcType, state->box, &top_global, x_for_confout);
}
write_sto_conf_mtop(ftp2fn(efSTO, nfile, fnm),
- *top_global->name,
+ *top_global.name,
top_global,
x_for_confout,
state_global->v.rvec_array(),