Add C++ version of t_ilist
[alexxy/gromacs.git] / src / gromacs / listed-forces / disre.cpp
index a1b677fe5443bf93586df4f1ccaa7702c9521b96..d43cdb268b0393ab01678ef375353fa09e9b5fbd 100644 (file)
@@ -71,13 +71,13 @@ void init_disres(FILE *fplog, const gmx_mtop_t *mtop,
                  const gmx_multisim_t *ms,
                  t_fcdata *fcd, t_state *state, gmx_bool bIsREMD)
 {
-    int                  fa, nmol, npair, np;
-    t_disresdata        *dd;
-    history_t           *hist;
-    gmx_mtop_ilistloop_t iloop;
-    const t_ilist       *il;
-    char                *ptr;
-    int                  type_min, type_max;
+    int                    fa, nmol, npair, np;
+    t_disresdata          *dd;
+    history_t             *hist;
+    gmx_mtop_ilistloop_t   iloop;
+    const InteractionList *il;
+    char                  *ptr;
+    int                    type_min, type_max;
 
     dd = &(fcd->disres);
 
@@ -132,13 +132,13 @@ void init_disres(FILE *fplog, const gmx_mtop_t *mtop,
     iloop     = gmx_mtop_ilistloop_init(mtop);
     while (gmx_mtop_ilistloop_next(iloop, &il, &nmol))
     {
-        if (nmol > 1 && il[F_DISRES].nr > 0 && ir->eDisre != edrEnsemble)
+        if (nmol > 1 && il[F_DISRES].size() > 0 && ir->eDisre != edrEnsemble)
         {
             gmx_fatal(FARGS, "NMR distance restraints with multiple copies of the same molecule are currently only supported with ensemble averaging. If you just want to restrain distances between atom pairs using a flat-bottomed potential, use a restraint potential (bonds type 10) instead.");
         }
 
         np = 0;
-        for (fa = 0; fa < il[F_DISRES].nr; fa += 3)
+        for (fa = 0; fa < il[F_DISRES].size(); fa += 3)
         {
             int type;