Fix incorrectly sized ga2la hash table
[alexxy/gromacs.git] / src / gromacs / mdlib / updategroupscog.cpp
index 2739a398bce31f0ca5e9d5bce6bf5cd267f3d473..a929f5e92f8acb2af728db45076ef7237033a414 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2021, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -138,7 +138,7 @@ void UpdateGroupsCog::clear()
     cogIndices_.clear();
     cogs_.clear();
     numAtomsPerCog_.clear();
-    globalToLocalMap_.clear();
+    globalToLocalMap_.clearAndResizeHashTable();
 }
 
 } // namespace gmx