Fixed return value of gmx_mtop_bondeds_free_energy
authorBerk Hess <hess@kth.se>
Mon, 25 Nov 2013 16:46:48 +0000 (17:46 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 26 Nov 2013 22:22:05 +0000 (23:22 +0100)
The return value was always true, which was harmless, since it
could only cause a small performance hit of useless sorting.

Fixes #1387

Change-Id: I088a3747ddb3517fbb5e416b791bd542bd49fed2

include/topsort.h
src/gmxlib/topsort.c

index a6c852be09b862805e061c53d6967cef994831e9..505868c8b0de572fc3a33d7895d7305bfd9b5cfa 100644 (file)
@@ -43,7 +43,7 @@ extern "C" {
 #endif
 
 
-/* Returns if the are bonded interactions for free energy calculations */
+/* Returns if there are perturbed bonded interactions */
 GMX_LIBGMX_EXPORT
 gmx_bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop);
 
index 373da9ddbf0bf4360ae9d7b24f409fb45e9a7183..58e267ffcb1a8acb86db5198eccf3be214d97029 100644 (file)
@@ -193,7 +193,7 @@ gmx_bool gmx_mtop_bondeds_free_energy(const gmx_mtop_t *mtop)
         }
     }
 
-    return (bPert ? ilsortFE_UNSORTED : ilsortNO_FE);
+    return bPert;
 }
 
 void gmx_sort_ilist_fe(t_idef *idef, const real *qA, const real *qB)