Merge branch release-2018 into master
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / topio.cpp
index 73e5abf4228468846380dccb78944812aab55903..9c466cc29aa8a5f6e48b04d6f5bceafe78602f89 100644 (file)
@@ -192,7 +192,7 @@ double check_mol(gmx_mtop_t *mtop, warninp_t wi)
     /* Check mass and charge */
     q = 0.0;
 
-    for (mb = 0; mb < mtop->nmoltype; mb++)
+    for (mb = 0; mb < mtop->nmolblock; mb++)
     {
         atoms = &mtop->moltype[mtop->molblock[mb].type].atoms;
         nmol  = mtop->molblock[mb].nmol;