Merge branch release-2020 into master
[alexxy/gromacs.git] / src / gromacs / mdlib / md_support.cpp
index 9eb763a25d1a47b826353e1950c422999c3cd49e..33056bc855cf580e759f91c09bd65d88b06ab5c3 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
+ * Copyright (c) 2013,2014,2015,2016,2017 The GROMACS development team.
  * Copyright (c) 2018,2019,2020, 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
@@ -505,7 +505,7 @@ void rerun_parallel_comm(t_commrec* cr, t_trxframe* fr, gmx_bool* bLastStep)
 }
 
 // TODO Most of this logic seems to belong in the respective modules
-void set_state_entries(t_state* state, const t_inputrec* ir)
+void set_state_entries(t_state* state, const t_inputrec* ir, bool useModularSimulator)
 {
     /* The entries in the state in the tpx file might not correspond
      * with what is needed, so we correct this here.
@@ -535,7 +535,10 @@ void set_state_entries(t_state* state, const t_inputrec* ir)
         if ((ir->epc == epcPARRINELLORAHMAN) || (ir->epc == epcMTTK))
         {
             state->flags |= (1 << estBOXV);
-            state->flags |= (1 << estPRES_PREV);
+            if (!useModularSimulator)
+            {
+                state->flags |= (1 << estPRES_PREV);
+            }
         }
         if (inputrecNptTrotter(ir) || (inputrecNphTrotter(ir)))
         {