Merge branch 'release-5-0'
[alexxy/gromacs.git] / src / gromacs / mdlib / mdatom.cpp
index 31165cfa8ebb2a80ff0f68f85491d6b8bcb1484a..3d1c2e2a96cb99bc419e9e40fda3fad3599c7b35 100644 (file)
@@ -150,27 +150,24 @@ void atoms2md(gmx_mtop_t *mtop, t_inputrec *ir,
         srenew(md->massT, md->nalloc);
         srenew(md->invmass, md->nalloc);
         srenew(md->chargeA, md->nalloc);
+        srenew(md->typeA, md->nalloc);
+        if (md->nPerturbed)
+        {
+            srenew(md->chargeB, md->nalloc);
+            srenew(md->typeB, md->nalloc);
+        }
         if (bLJPME)
         {
             srenew(md->sqrt_c6A, md->nalloc);
             srenew(md->sigmaA, md->nalloc);
             srenew(md->sigma3A, md->nalloc);
-        }
-        if (md->nPerturbed)
-        {
-            srenew(md->chargeB, md->nalloc);
-            if (bLJPME)
+            if (md->nPerturbed)
             {
                 srenew(md->sqrt_c6B, md->nalloc);
                 srenew(md->sigmaB, md->nalloc);
                 srenew(md->sigma3B, md->nalloc);
             }
         }
-        srenew(md->typeA, md->nalloc);
-        if (md->nPerturbed)
-        {
-            srenew(md->typeB, md->nalloc);
-        }
         srenew(md->ptype, md->nalloc);
         if (opts->ngtc > 1)
         {