Merge release-2019 branch into master
[alexxy/gromacs.git] / src / gromacs / mdrun / md.cpp
index ee93053af17439e8af65a94aa54a298cdcff8e79..765ffd18a627c57c52c7687a4235ee1284a6a9f2 100644 (file)
@@ -1526,6 +1526,13 @@ void gmx::Integrator::do_md()
     walltime_accounting_set_nsteps_done(walltime_accounting, step_rel);
 
     destroy_enerdata(enerd);
+
     sfree(enerd);
+
+    /* Clean up topology. top->atomtypes has an allocated pointer if no domain decomposition*/
+    if (!DOMAINDECOMP(cr))
+    {
+        done_atomtypes(&top->atomtypes);
+    }
     sfree(top);
 }