finish_em(cr, outf, walltime_accounting, wcycle);
/* To print the actual number of steps we needed somewhere */
- inputrec->nsteps = count;
+ {
+ // TODO: Avoid changing inputrec (#3854)
+ auto* nonConstInputrec = const_cast<t_inputrec*>(inputrec);
+ nonConstInputrec->nsteps = count;
+ }
walltime_accounting_set_nsteps_done(walltime_accounting, count);
}
print_em_start(fplog, cr, walltime_accounting, wcycle, NM);
/* fudge nr of steps to nr of atoms */
- inputrec->nsteps = atom_index.size() * 2;
+ {
+ // TODO: Avoid changing inputrec (#3854)
+ auto* nonConstInputrec = const_cast<t_inputrec*>(inputrec);
+ nonConstInputrec->nsteps = atom_index.size() * 2;
+ }
if (bIsMaster)
{