Fix overeager VdW radii change note.
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 28 Jun 2013 03:34:13 +0000 (06:34 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Fri, 28 Jun 2013 03:34:13 +0000 (06:34 +0300)
Only print the note about changed VdW radii if the VdW radii are
actually used (and not for all tools that use any guessed property such
as masses).

Also ran the file through uncrustify.

Change-Id: I012ebe5c312c19082d0b066ae14e803196565a16

src/gromacs/gmxlib/atomprop.c

index ed2ffbe666e6bc56565a063407535a106347499b..21bb2a94b76aa87da48b09002dfcbddeea0ddb34 100644 (file)
@@ -63,7 +63,7 @@ typedef struct {
 } aprop_t;
 
 typedef struct gmx_atomprop {
-    gmx_bool          bWarned,bWarnVDW;
+    gmx_bool          bWarned, bWarnVDW;
     aprop_t           prop[epropNR];
     gmx_residuetype_t restype;
 } gmx_atomprop;
@@ -284,9 +284,9 @@ gmx_atomprop_t gmx_atomprop_init(void)
     snew(aps, 1);
 
     gmx_residuetype_init(&aps->restype);
-    aps->bWarned = FALSE;
+    aps->bWarned  = FALSE;
     aps->bWarnVDW = FALSE;
-    
+
     return (gmx_atomprop_t)aps;
 }
 
@@ -335,11 +335,11 @@ static void vdw_warning(FILE *fp)
 {
     if (NULL != fp)
     {
-        fprintf(fp,"NOTE: From version 5.0 %s uses the Van der Waals radii\n",
+        fprintf(fp, "NOTE: From version 5.0 %s uses the Van der Waals radii\n",
                 ShortProgram());
-        fprintf(fp,"from the source below. This means the results may be different\n");
-        fprintf(fp,"compared to previous GROMACS versions.\n");
-        please_cite(fp,"Bondi1964a");
+        fprintf(fp, "from the source below. This means the results may be different\n");
+        fprintf(fp, "compared to previous GROMACS versions.\n");
+        please_cite(fp, "Bondi1964a");
     }
 }
 
@@ -382,7 +382,7 @@ gmx_bool gmx_atomprop_query(gmx_atomprop_t aps,
     j = get_prop_index(&(ap->prop[eprop]), ap->restype, resname,
                        atomname, &bExact);
 
-    if (!ap->bWarnVDW)
+    if (eprop == epropVDW && !ap->bWarnVDW)
     {
         vdw_warning(stdout);
         ap->bWarnVDW = TRUE;