Made gmx dos work again.
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Mon, 27 Jun 2016 12:47:24 +0000 (14:47 +0200)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Mon, 27 Jun 2016 13:25:07 +0000 (15:25 +0200)
Due to an error in the index handling gmx dos always stopped with a fatal
error.

Fixes #1996

Change-Id: Iba7685c1e1b86acc92427902a2187eb4e6c9f260

src/gromacs/gmxana/gmx_dos.c

index 5ac2090141823f2d2a777fe6b98036675984139b..d67ac344f1a2e8ea7b3ec135900df200a21ff30c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016, 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.
@@ -89,7 +89,7 @@ static int calcMoleculesInIndexGroup(t_block *mols, int natoms, atom_id *index,
                 gmx_fatal(FARGS, "The index group does not consist of whole molecules");
             }
             i++;
-            if (i == natoms)
+            if (i > natoms)
             {
                 gmx_fatal(FARGS, "Index contains atom numbers larger than the topology");
             }