Project

General

Profile

Bug #834

g_bond and PBC

Added by Mark Abraham about 6 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

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.

Associated revisions

Revision ab9d7e20 (diff)
Added by Erik Lindahl over 3 years ago

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.

Fixes #834.

Change-Id: I61ecb4957ef11e03bfeef10095a406cbddd23a34

History

#1 Updated by Roland Schulz about 5 years ago

  • Assignee set to Mark Abraham

Mark, since you suggested an OK solution, I assign it to you ;-)

#2 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #834.
Uploader: Erik Lindahl ()
Change-Id: I61ecb4957ef11e03bfeef10095a406cbddd23a34
Gerrit URL: https://gerrit.gromacs.org/3577

#3 Updated by Erik Lindahl over 3 years ago

  • Status changed from New to Fix uploaded
  • Affected version set to 4.6.x

I think this fix should be fine; not that it is only the connectivity we get from the structure file. The actual PBC (in particular the dimensions) are still read from the trajectory.

#4 Updated by Erik Lindahl over 3 years ago

  • Status changed from Fix uploaded to Resolved
  • % Done changed from 0 to 100

#5 Updated by Erik Lindahl over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF