Intermolecular bonded interaction support added
[alexxy/gromacs.git] / src / gromacs / gmxlib / txtdump.c
index 4d04ff87592bdd4544f93ecfb3031fae0eaa90ca..606a8f4c071633e7f87afd24673067f5f40fd288 100644 (file)
@@ -1882,7 +1882,7 @@ static void pr_molblock(FILE *fp, int indent, const char *title,
 void pr_mtop(FILE *fp, int indent, const char *title, gmx_mtop_t *mtop,
              gmx_bool bShowNumbers)
 {
-    int mt, mb;
+    int mt, mb, j;
 
     if (available(fp, mtop, indent, title))
     {
@@ -1895,6 +1895,16 @@ void pr_mtop(FILE *fp, int indent, const char *title, gmx_mtop_t *mtop,
         {
             pr_molblock(fp, indent, "molblock", &mtop->molblock[mb], mb, mtop->moltype);
         }
+        pr_str(fp, indent, "bIntermolecularInteractions", EBOOL(mtop->bIntermolecularInteractions));
+        if (mtop->bIntermolecularInteractions)
+        {
+            for (j = 0; (j < F_NRE); j++)
+            {
+                pr_ilist(fp, indent, interaction_function[j].longname,
+                         mtop->ffparams.functype,
+                         &mtop->intermolecular_ilist[j], bShowNumbers);
+            }
+        }
         pr_ffparams(fp, indent, "ffparams", &(mtop->ffparams), bShowNumbers);
         pr_atomtypes(fp, indent, "atomtypes", &(mtop->atomtypes), bShowNumbers);
         for (mt = 0; mt < mtop->nmoltype; mt++)
@@ -1917,6 +1927,7 @@ void pr_top(FILE *fp, int indent, const char *title, t_topology *top, gmx_bool b
         pr_atomtypes(fp, indent, "atomtypes", &(top->atomtypes), bShowNumbers);
         pr_block(fp, indent, "cgs", &top->cgs, bShowNumbers);
         pr_block(fp, indent, "mols", &top->mols, bShowNumbers);
+        pr_str(fp, indent, "bIntermolecularInteractions", EBOOL(top->bIntermolecularInteractions));
         pr_blocka(fp, indent, "excls", &top->excls, bShowNumbers);
         pr_idef(fp, indent, "idef", &top->idef, bShowNumbers);
     }