Optimize grompp VDW parameter-generation allocations
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 26 Jul 2021 02:50:13 +0000 (04:50 +0200)
committerAndrey Alekseenko <al42and@gmail.com>
Wed, 28 Jul 2021 16:28:48 +0000 (16:28 +0000)
src/gromacs/gmxpreprocess/toppush.cpp

index 32ed0111a154ee48b017c68c022d2e144b0ab7a9..dd9dcead983a6a085ddebc2dc9c8c68b438e7abc 100644 (file)
@@ -95,6 +95,7 @@ void generate_nbparams(CombinationRule         comb,
         cPrefetch.emplace_back(*atypes->atomNonBondedParamFromAtomType(i, 0),
                                *atypes->atomNonBondedParamFromAtomType(i, 1));
     }
+    interactions->interactionTypes.reserve(nr * nr);
     switch (ftype)
     {
         case F_LJ: