From a464aad037e7e6b8e0a79f8ce14a4c8fb0981d70 Mon Sep 17 00:00:00 2001 From: Erik Lindahl Date: Tue, 12 Dec 2017 22:51:18 +0100 Subject: [PATCH] Fix PBC error in gmx_spatial Fix provided by Alexey Anikeenko. Fixes #2157. Change-Id: I2ac8a4ffac5acb0f3e432036ded3b380d720a719 --- src/gromacs/gmxana/gmx_spatial.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gromacs/gmxana/gmx_spatial.cpp b/src/gromacs/gmxana/gmx_spatial.cpp index 1badcc8d64..bdcb6b2020 100644 --- a/src/gromacs/gmxana/gmx_spatial.cpp +++ b/src/gromacs/gmxana/gmx_spatial.cpp @@ -181,7 +181,8 @@ int gmx_spatial(int argc, char *argv[]) get_index(atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, &nidxp, &indexp, &grpnmp); /* The first time we read data is a little special */ - natoms = read_first_frame(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &fr, flags); + read_first_frame(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &fr, flags); + natoms = fr.natoms; /* Memory Allocation */ MINBIN[XX] = MAXBIN[XX] = fr.x[0][XX]; -- 2.11.4.GIT