[gmx-users] g_mindist on 51-frame trajectory gives 51 minimum distances but <51 atom pairs

Matthew Zwier mczwier at gmail.com
Thu Jan 26 18:32:15 CET 2012

Hi all,

I'm running g_mindist (from 4.5.5) on a slew of very short
trajectories (51 frames) in order to obtain both minimum distances and
the corresponding atom pairs, using

echo 10 11 | g_mindist -nice 10 -f seg.xtc -n $NDX -s $TPR -nopbc -o
mindist_pairs.out -xvg none

where NDX and TPR are (valid) index and topology files, respectively,
and nopbc is specified because there is no periodic box (these are
GB/SA simulations).  This is on a 64-bit Linux box, with GROMACS and
all dependencies compiled with GCC.  For all trajectories, the
resulting mindist.xvg always contains 51 entries with reasonable
values (in the 1.1-1.5 nm range), but for a subset of the
trajectories, the corresponding mindist_pairs.out contains less than
51 entries (as low as ~30 in some cases).

Reading the source for gmx_mindist.c, it appears that this should
never occur, at least not without giving a nonsense value of the
minimum distance for that frame in the process (1 mm, it would appear
from the source!).  I'm either missing something in my reading of
gmx_mindist.c, I've found a bug (unlikely), or I've managed to
convince GCC to mis-compile g_mindist somehow (more likely, though
still somewhat baffling).  Can anyone help me figure out what's going

Matt Z.

More information about the gromacs.org_gmx-users mailing list