Move force buffer resizing to mdsetup
[alexxy/gromacs.git] / src / gromacs / mdrun / mimic.cpp
index 247e25caa608cee1d90a39498aae06365e603d64..bfb2cca0e3b1c92f4e6bd354bf350e1d50256bd9 100644 (file)
@@ -267,14 +267,10 @@ void gmx::LegacySimulator::do_mimic()
     else
     {
         state_change_natoms(state_global, state_global->natoms);
-        /* We need to allocate one element extra, since we might use
-         * (unaligned) 4-wide SIMD loads to access rvec entries.
-         */
-        f.resizeWithPadding(state_global->natoms);
         /* Copy the pointer to the global state */
         state = state_global;
 
-        mdAlgorithmsSetupAtomData(cr, ir, *top_global, &top, fr, mdAtoms, constr, vsite, shellfc);
+        mdAlgorithmsSetupAtomData(cr, ir, *top_global, &top, fr, &f, mdAtoms, constr, vsite, shellfc);
     }
 
     auto mdatoms = mdAtoms->mdatoms();