Merge release-5-0 into master
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / hackblock.c
index c7919872c1786e63e063223499e88cc63bc7b08f..0da489f4a2c03b340025e8630579e40eaf1cda54 100644 (file)
@@ -43,6 +43,7 @@
 #include "hackblock.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/math/vec.h"
+#include "names.h"
 
 /* these MUST correspond to the enum in hackblock.h */
 const char *btsNames[ebtsNR] = { "bonds", "angles", "dihedrals", "impropers", "exclusions", "cmap" };
@@ -175,7 +176,8 @@ static void copy_t_rbonded(t_rbonded *s, t_rbonded *d)
     {
         d->a[i] = safe_strdup(s->a[i]);
     }
-    d->s = safe_strdup(s->s);
+    d->s     = safe_strdup(s->s);
+    d->match = s->match;
 }
 
 static gmx_bool contains_char(t_rbonded *s, char c)
@@ -394,7 +396,7 @@ void dump_hb(FILE *out, int nres, t_hackblock hb[])
                     }
                     fprintf(out, " %s]", SS(hb[i].rb[j].b[k].s));
                 }
-                fprintf(out, "\n");
+                fprintf(out, " Entry matched: %s\n", yesno_names[hb[i].rb[j].b[k].match]);
             }
         }
         fprintf(out, "\n");