From 916e2eaa0eb7ed643352a6b5c11db91eb1f4d985 Mon Sep 17 00:00:00 2001 From: Berk Hess Date: Mon, 2 Mar 2020 17:42:03 +0100 Subject: [PATCH] Fix grompp unbound atom check The check in grompp for unbound atoms would check for any potential (and constraints) instead of only potentials involving two atoms. This enabled false negatives. Change-Id: I677b86a4e4bbe8cd0c6a8a0bf43983be622edfa6 --- src/gromacs/gmxpreprocess/grompp.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gromacs/gmxpreprocess/grompp.cpp b/src/gromacs/gmxpreprocess/grompp.cpp index 3922eeb01c..0e68f1bd94 100644 --- a/src/gromacs/gmxpreprocess/grompp.cpp +++ b/src/gromacs/gmxpreprocess/grompp.cpp @@ -3,7 +3,8 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -1353,7 +1354,7 @@ static void checkForUnboundAtoms(const gmx_moltype_t* molt, gmx_bool bVerbose, w for (int ftype = 0; ftype < F_NRE; ftype++) { - if (((interaction_function[ftype].flags & IF_BOND) && ftype != F_CONNBONDS) + if (((interaction_function[ftype].flags & IF_BOND) && NRAL(ftype) == 2 && ftype != F_CONNBONDS) || (interaction_function[ftype].flags & IF_CONSTRAINT) || ftype == F_SETTLE) { const InteractionList& il = molt->ilist[ftype]; -- 2.22.0