Fix warning for confout with periodic molecules
authorBerk Hess <hess@kth.se>
Wed, 18 Oct 2017 18:18:31 +0000 (20:18 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 20 Oct 2017 09:48:06 +0000 (11:48 +0200)
With periodic molecules, mdrun would, incorrectly, attempt to make
molecules whole for writing the final state to confout.

Fixes #2275

Change-Id: Ib19ca5c2ae6fcca6126773bcdd8a05c8e141c3ce

src/gromacs/mdlib/trajectory_writing.cpp

index d210d731c5f4e02c7bb2bc88bc9bbb8e6b5573a1..206bb1f83b05d4c539f571b7aeabb37b003eff4d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -176,7 +176,7 @@ do_md_trajectory_writing(FILE           *fplog,
              * at the last step.
              */
             fprintf(stderr, "\nWriting final coordinates.\n");
-            if (fr->bMolPBC)
+            if (fr->bMolPBC && !ir->bPeriodicMols)
             {
                 /* Make molecules whole only for confout writing */
                 do_pbc_mtop(fplog, ir->ePBC, state->box, top_global, x_for_confout);