From 99f228b04707e025a0fd60518c575c1e974ed162 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Mon, 25 Nov 2013 17:46:48 +0100 Subject: [PATCH] Fixed return value of gmx_mtop_bondeds_free_energy 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 | 2 +- src/gmxlib/topsort.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/topsort.h b/include/topsort.h index a6c852be09..505868c8b0 100644 --- a/include/topsort.h +++ b/include/topsort.h @@ -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); diff --git a/src/gmxlib/topsort.c b/src/gmxlib/topsort.c index 373da9ddbf..58e267ffcb 100644 --- a/src/gmxlib/topsort.c +++ b/src/gmxlib/topsort.c @@ -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) -- 2.22.0