Move force buffer resizing to mdsetup
[alexxy/gromacs.git] / src / gromacs / mdrun / md.cpp
index 1900f4938c14cde1a393a31f2c34abe0468db67c..4147925cdf1118c7c1051329668822606ee374e6 100644 (file)
@@ -336,12 +336,11 @@ void gmx::LegacySimulator::do_md()
     else
     {
         state_change_natoms(state_global, state_global->natoms);
-        f.resizeWithPadding(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, mdAtoms, constr, vsite, shellfc);
+        mdAlgorithmsSetupAtomData(cr, ir, *top_global, &top, fr, &f, mdAtoms, constr, vsite, shellfc);
 
         upd.setNumAtoms(state->natoms);
     }