g_bond and PBC
Originally, g_bond was intended to get box information only from the trajectory file. This dates from the days when mdrun would not write broken molecules, so PBC was somewhat moot. David allowed it to read a structure file to get atom names for printing average bond distances (commit dcade687). An update from Berk to the PBC code (commit e418751) perhaps accidentally permitted g_bond -noaverdist to trigger reading PBC information from the
-s file, which was probably never David's intention.
This mess led to Julius Su's post http://lists.gromacs.org/pipermail/gmx-developers/2011-November/005440.html
I think the best solution is to require
-s in order to get accurate PBC information and use the names from that for
-d as required.
Thus read_tps_conf() is always called. Documentation will need updating. The present behaviour is evidently buggy, but my suggested fix will change the function of
g_bond on trajectories that have box sizes inconsistent with the original simulation and/or trajectories with broken molecules. So I am not sure how this should be addressed in release-4-5-patches.
Perhaps this kind of phenomenon also explains some reported weird behaviour of
g_dist, as Justin has noted on gmx-users recently.
Force g_bond to use structure file
Previous versions of Gromacs never wrote broken molecules, but
this is no longer true for domain decomposition. Box dimensions
are set from the trajectory, but the molecular connectivity
from the structure file.