Project

General

Profile

Bug #2275

Inconsistent shifts warning in mdrun with periodic-molecules = yes

Added by Dmitri Ovodok over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdrun
Target version:
Affected version - extra info:
All versions starting from 4.6
Affected version:
Difficulty:
uncategorized
Close

Description

Running mdrun on a system with periodic molecules leads to "There were N inconsistent shifts. Check your topology." warnings even if periodic-molecules parameter in .mdp file is explicitly set to "yes". Those warnings, however, appear only at the end of simulation, on output configuration writing. Setting periodic-molecules to "no" leads to similar warnings during the whole simulation.

Some investigation of Gromacs source code revealed that the source of problem is one change in output configuration writing code. At that stage Gromacs seems to intend to make molecules whole before output configuration writing. This operation should fail for periodic molecules and produces for them the mentioned above "inconsistent shifts" warning. Prior to 4.5.7 version it happens only if there are no periodic molecules in the system:

// Gromacs 4.5.7, src/kernel/md.c, line 1320
if (ir->ePBC != epbcNONE && !ir->bPeriodicMols &&
    DOMAINDECOMP(cr))
{
    /* Make molecules whole only for confout writing */
    do_pbc_mtop(fplog,ir->ePBC,state->box,top_global,state_global->x);
}

However, in 4.6 versions Gromacs seems to check if there are periodic molecules in the system:

// Gromacs 4.6.7, src/kernel/md.c, line 1543
if (fr->bMolPBC)
{
    /* Make molecules whole only for confout writing */
    do_pbc_mtop(fplog, ir->ePBC, state->box, top_global, state_global->x);
}

That change moved to newer versions of Gromacs too (see src/gromacs/mdlib/trajectory_writing.cpp, line 179 as for Gromacs 2016.4).

Perhaps there should be a negation in the condition, if so, this possible bug affects not only systems with periodic molecules but, in other way, all the other systems too.

Associated revisions

Revision 53473bb9 (diff)
Added by Berk Hess over 1 year ago

Fix warning for confout with periodic molecules

With periodic molecules, mdrun would, incorrectly, attempt to make
molecules whole for writing the final state to confout.

Fixes #2275

Change-Id: Ib19ca5c2ae6fcca6126773bcdd8a05c8e141c3ce

History

#1 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2275.
Uploader: Berk Hess ()
Change-Id: gromacs~release-2016~Ib19ca5c2ae6fcca6126773bcdd8a05c8e141c3ce
Gerrit URL: https://gerrit.gromacs.org/7051

#2 Updated by Berk Hess over 1 year ago

  • Status changed from New to Fix uploaded
  • Assignee set to Berk Hess
  • Target version set to 2016.5

Thanks for reporting this and finding the source of the issue.

#3 Updated by Berk Hess over 1 year ago

  • Status changed from Fix uploaded to Resolved

#4 Updated by Berk Hess over 1 year ago

#5 Updated by Erik Lindahl over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF