Project

General

Profile

Bug #386

confout.gro contains PBC-broken molecules after EM in parallel with domain decomposition

Added by Chris Neale almost 10 years ago. Updated almost 10 years ago.

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

Description

The subject line pretty much explains it. You can use the files that I uploaded from bug 383 as a test system or pretty much any lipid bilayer or a protein in water where the protein is actually crossing PBC.

This has come up as a problem in particular for combination of mdrun EM with the inflategro.pl script for inserting a protein into a lipid bilayer, for which the solution is to add a trjconv -pbc mol after each EM.

For more details, please refer to the related mailing list posts:

http://lists.gromacs.org/pipermail/gmx-users/2010-January/047950.html
http://lists.gromacs.org/pipermail/gmx-users/2010-January/047951.html

History

#1 Updated by Erik Lindahl almost 10 years ago

This is not a bug; with domain decomposition all coordinates are local, and there is no trivial way for us to make the molecule whole (since there is no global graph).

In theory that is of course possible to add (at the cost of CPU-cycles and complexity), but from a philosophical point-of-view it is better that the raw coordinates written to the trajectory correspond to the ones actually used for the integration; otherwise it will not get binary identical results with reruns. In addition, all standard analysis programs handle the PBC automatically, so normally it is only for visualization you would want to make the molecule whole.

However, we should probably clarify this in the docs. Is there still any text around saying "gromacs does not write broken molecules"?

#2 Updated by Chris Neale almost 10 years ago

I am not aware of any such mentions, just a program (i.e. inflategro.pl) that expects this. It's no problem for me once I figured out the issue, but others may run into it.

I understand from Justin on-list that a special consideration was made for confout.gro (but not for .xtc .trr) in making the molecules whole; quoting:

###

Now, I am no C expert, but I found the following in md.c (taken from the 4.0.5 source):

fprintf(stderr,"\nWriting final coordinates.\n");
if (ir->ePBC != epbcNONE && !ir->bPeriodicMols && DOMAINDECOMP) {
/* Make molecules whole only for confout writing */
do_pbc_mtop(fplog,ir->ePBC,state->box,top_global,state_global->x);

...after which confout.gro is written.

There are no such lines in the 4.0 source, so I think this was added over the
course of later development.

###

And in fact confout.gro does contain whole molecules when running md, just not when running EM.

Again, I'm ok either way.

Chris.

Also available in: Atom PDF