Stopped header files including state.h
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 7 Nov 2016 11:49:51 +0000 (12:49 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 23 Jan 2017 16:29:16 +0000 (17:29 +0100)
This reduces the number of source files that depend on state.h from
about 97 to 43, thereby reducing compilation coupling.

Removed depencency of boxutilities on t_state, which didn't seem
useful or necessary.

Change-Id: I72517330909767a5a31975b6d545dc1d8fc8d8a7

35 files changed:
src/gromacs/domdec/domdec.h
src/gromacs/essentialdynamics/edsam.cpp
src/gromacs/ewald/pme-load-balancing.cpp
src/gromacs/ewald/pme-load-balancing.h
src/gromacs/fileio/enxio.cpp
src/gromacs/fileio/enxio.h
src/gromacs/fileio/tpxio.cpp
src/gromacs/fileio/tpxio.h
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_tune_pme.cpp
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/imd/imd.cpp
src/gromacs/mdlib/constr.cpp
src/gromacs/mdlib/coupling.cpp
src/gromacs/mdlib/expanded.cpp
src/gromacs/mdlib/force.h
src/gromacs/mdlib/integrator.h
src/gromacs/mdlib/mdebin.cpp
src/gromacs/mdlib/mdebin.h
src/gromacs/mdlib/mdoutf.cpp
src/gromacs/mdlib/mdoutf.h
src/gromacs/mdlib/minimize.cpp
src/gromacs/mdlib/shellfc.cpp
src/gromacs/mdlib/shellfc.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/tpi.cpp
src/gromacs/mdlib/trajectory_writing.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdlib/update.h
src/gromacs/pbcutil/boxutilities.cpp
src/gromacs/pbcutil/boxutilities.h
src/gromacs/swap/swapcoords.cpp
src/gromacs/tools/check.cpp
src/programs/mdrun/repl_ex.cpp

index 7934b5bdc008768e34c13fe5c867955ab46d4e09..cdf5da8b1ed3441c41a2703d2a68475f2315c999 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2005,2006,2007,2008,2009,2010,2012,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.
@@ -67,7 +67,6 @@
 #include "gromacs/mdlib/vsite.h"
 #include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/mdatom.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/idef.h"
@@ -80,6 +79,7 @@ struct gmx_ddbox_t;
 struct gmx_domdec_zones_t;
 struct t_commrec;
 struct t_inputrec;
+class t_state;
 
 /*! \brief Returns the global topology atom number belonging to local atom index i.
  *
index 2f14c359ab0fad850fe9a563b78474d75d2621d0..a42e6be86edd1d1fb38a69386551154ed5bd2ebb 100644 (file)
@@ -61,6 +61,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/mtop_lookup.h"
 #include "gromacs/topology/topology.h"
index 40f12fac3feb8e499aee377e335467e32c404dba..559244fb5893cb36a2f39a47e36c4f82f13aec29 100644 (file)
@@ -67,6 +67,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/cstringutil.h"
index 80ddbbebb3b6c2ac2c2b468b6efa44bb8b067a29..3052ac05a5df619b72ff5365da21e2731675ae2f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
 
 #include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/interaction_const.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 
 struct t_commrec;
 struct t_inputrec;
+class t_state;
 
 namespace gmx
 {
index 964b35e805ae08d97abc8099dc9904093e5a0222..feedd8a99fbd00672abfc22996b351a8bd1d926c 100644 (file)
@@ -50,6 +50,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/compare.h"
index f9ccc534111858a9a5a5ae7b96f950d75125a05a..00e9083ec96b2f1aa89e8272519032048785aa7b 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, 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.
 #define GMX_FILEIO_ENXIO_H
 
 #include "gromacs/fileio/xdr_datatype.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/trajectory/energy.h"
+#include "gromacs/utility/basedefinitions.h"
 
 struct gmx_groups_t;
 struct t_fileio;
 struct t_inputrec;
+class t_state;
 
 /**************************************************************
  * These are the base datatypes + functions for reading and
index 338866545c85047223090f59ae9597eaed7aa411..cdd4a22389ba916c820c762a5303e4f3aee98909 100644 (file)
@@ -3228,7 +3228,7 @@ static int do_tpx(t_fileio *fio, gmx_bool bRead,
             do_inputrec(fio, ir, bRead, fileVersion, mtop ? &mtop->ffparams.fudgeQQ : nullptr);
             if (fileVersion < 51)
             {
-                set_box_rel(ir, state);
+                set_box_rel(ir, state->box_rel, state->box);
             }
             if (fileVersion < 53)
             {
index 7201e38633fa828defe819fc61c3770a203633d1..1e06ad67bac6c9c535dd1cdf0bac928e3c30411d 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, 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.
 
 #include <cstdio>
 
-#include "gromacs/mdtypes/state.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/real.h"
 
 struct gmx_mtop_t;
 struct t_atoms;
 struct t_block;
 struct t_inputrec;
+class t_state;
 struct t_topology;
 
 struct t_tpxheader
index cfbfed333c45ebc43c18875a641025ed9c4d1a25..d3a0bb019d565571ace959c8e0f5aec2f645cff1 100644 (file)
@@ -56,6 +56,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/random/threefry.h"
 #include "gromacs/random/uniformintdistribution.h"
 #include "gromacs/topology/mtop_util.h"
index f2087a4069f29e5e7d5fb237e96afbf584dea5ab..e0d76d6dfafd77d95c5d9883939cac9e7401702e 100644 (file)
@@ -60,6 +60,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/walltime_accounting.h"
 #include "gromacs/topology/topology.h"
index 9748824baa041e3a0f256277a945c59da7fe3003..812ab007566d5dd589450ae947d49e53771c6d94 100644 (file)
@@ -65,6 +65,7 @@
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/pull-params.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pulling/pull.h"
 #include "gromacs/random/tabulatednormaldistribution.h"
 #include "gromacs/random/threefry.h"
index 26db602a6603d8c0785ab4608c56f793083cc52b..53bd278a5a503a728dc17a938163a4ecf3a8d30a 100644 (file)
@@ -636,7 +636,7 @@ new_status(const char *topfile, const char *topppfile, const char *confin,
         sfree(v);
     }
     /* This call fixes the box shape for runs with pressure scaling */
-    set_box_rel(ir, state);
+    set_box_rel(ir, state->box_rel, state->box);
 
     nmismatch = check_atom_names(topfile, confin, sys, &conftop->atoms);
     done_top(conftop);
@@ -812,7 +812,7 @@ static void cont_status(const char *slog, const char *ener,
      * Note that this call can lead to differences in the last bit
      * with respect to using gmx convert-tpr to create a [REF].tpx[ref] file.
      */
-    set_box_rel(ir, state);
+    set_box_rel(ir, state->box_rel, state->box);
 
     fprintf(stderr, "Using frame at t = %g ps\n", use_time);
     fprintf(stderr, "Starting time for run is %g ps\n", ir->init_t);
index 1faf0b15609c59575c71701b75cefa4bf21fe233..26c96cb4193d6775e0570864dd886e4cca2055cb 100644 (file)
@@ -77,6 +77,7 @@
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/mtop_util.h"
index bdae1014e08bb238c6004ba27419cace70a1f3fb..2cdf9fdc5567065fb3d4a308634f99cec5a706da 100644 (file)
@@ -60,6 +60,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
 #include "gromacs/topology/block.h"
index 8e8eb8b018ddb2e91ff15208167aae9b1ea41776..4f602a1d0bc82435cbe4ed21a3d32a27637f3b21 100644 (file)
@@ -55,6 +55,7 @@
 #include "gromacs/mdtypes/group.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/boxutilities.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/random/gammadistribution.h"
index 0a6c248e63de75adab8548bd3ab3f827eaeadf1e..4edb6b1c8e878291e21407cc46d43f0e865d6fe6 100644 (file)
@@ -59,6 +59,7 @@
 #include "gromacs/mdlib/update.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/random/threefry.h"
 #include "gromacs/random/uniformrealdistribution.h"
 #include "gromacs/timing/wallcycle.h"
index 903cc5cde26980e79ccad49231f5264147fc200b..44c1a1007fa8b27cca9e0b1b50c83797f5bcc41a 100644 (file)
@@ -41,7 +41,6 @@
 #include "gromacs/mdlib/vsite.h"
 #include "gromacs/mdtypes/fcdata.h"
 #include "gromacs/mdtypes/forcerec.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/arrayref.h"
 
index 962e0edd3b417e26a95dcb40f62269a5a14561ce..2ad80e70b1526229b0db92de791b145b19cf68d8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -48,7 +48,6 @@
 #include "gromacs/mdtypes/fcdata.h"
 #include "gromacs/mdtypes/forcerec.h"
 #include "gromacs/mdtypes/mdatom.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/timing/walltime_accounting.h"
 #include "gromacs/utility/basedefinitions.h"
@@ -61,6 +60,7 @@ struct gmx_output_env_t;
 struct t_commrec;
 struct t_filenm;
 struct t_inputrec;
+class t_state;
 
 namespace gmx
 {
index 1c6308ca4af2f351b4618cf685f2e32836831540..477bb9d6fb4116b2bea07ccfd7ea6d1135f88b8f 100644 (file)
@@ -59,6 +59,7 @@
 #include "gromacs/mdtypes/group.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
 #include "gromacs/topology/mtop_util.h"
index a5aff5be00bd1cf67d2d1245b3265ffad6489635..34c97e767e99cca841e8cc0cde5f65ccbc360c48 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, 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.
@@ -42,7 +42,6 @@
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/mdlib/ebin.h"
 #include "gromacs/mdtypes/forcerec.h"
-#include "gromacs/mdtypes/state.h"
 
 class energyhistory_t;
 struct gmx_constr;
@@ -53,6 +52,7 @@ struct t_expanded;
 struct t_fcdata;
 struct t_grpopts;
 struct t_lambda;
+class t_state;
 
 /* The functions & data structures here determine the content for outputting
    the .edr file; the file format and actual writing is done with functions
index cd6767c76948c4c378dba4bf5398705c56c1ed84..6f05961919df9b493a523864fed156c8d0c075bd 100644 (file)
@@ -51,6 +51,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/pleasecite.h"
index addd7f042566c781fb8565ad2b5473feeb410d2c..42b74310f60bd8accb224d39d3a55b615ae542b4 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.
@@ -38,6 +38,7 @@
 #include <stdio.h>
 
 #include "gromacs/fileio/enxio.h"
+#include "gromacs/math/paddedvector.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/basedefinitions.h"
index 1eba0227b4d3fc07476bf2166bf58a752d59cf6c..7d655098b461195e18023cd6aba41263db745a5a 100644 (file)
@@ -87,6 +87,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
index e92597b46032cbcd3558f72911daf71c0531b289..581dc1777952f3d0a9c818e9f6c2429b3c6a903c 100644 (file)
@@ -62,6 +62,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/mtop_lookup.h"
index 58cb2056b46305c70ee346e2eef17c56fd94dd89..a18b023498ae3e02905f24e1773220f77a85d5d3 100644 (file)
@@ -39,8 +39,8 @@
 
 #include <cstdio>
 
+#include "gromacs/math/paddedvector.h"
 #include "gromacs/mdlib/vsite.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 
 struct gmx_constr;
index 9cc24b911fe3f11f832356f74d3fc1aabc51bca3..555678cd89f43510a467629d3bc4b596b869f734 100644 (file)
@@ -88,6 +88,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
index db0d76f71483047eb948f82a678b27db05c129c1..8cc2237958068a044e50afaaae8fbc26463b25ea 100644 (file)
@@ -78,6 +78,7 @@
 #include "gromacs/mdtypes/group.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/random/threefry.h"
 #include "gromacs/random/uniformrealdistribution.h"
index 740b761654aaa220e2ddcb6d09c94558b7f189d9..1f99e72529bec64a7663c884a45ea57876f6d085 100644 (file)
@@ -46,6 +46,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/energyhistory.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/smalloc.h"
index 079e3d992d0458263c9f896d7d5d1499affca26e..15c6b431bc20aea9dc9a80dcc19aea06e1a9c4a5 100644 (file)
@@ -64,6 +64,7 @@
 #include "gromacs/mdtypes/group.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/boxutilities.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
index efb558efe827485bcd5796e4586681aaf889e261..717eb2db423427117cb9703076b2b5bf86f41d3f 100644 (file)
@@ -37,8 +37,8 @@
 #ifndef GMX_MDLIB_UPDATE_H
 #define GMX_MDLIB_UPDATE_H
 
+#include "gromacs/math/paddedvector.h"
 #include "gromacs/math/vectypes.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
index fd3c858611aebd3248b90b31fb6ac3c61ca94124..a192625e66f72e9be0d6430c1ef3bd5fb783216b 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
-#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
@@ -89,23 +88,23 @@ static void do_box_rel(const t_inputrec *ir, matrix box_rel,
     }
 }
 
-void preserve_box_shape(const t_inputrec *ir, matrix box_rel, matrix b)
+void preserve_box_shape(const t_inputrec *ir, matrix box_rel, matrix box)
 {
     if (inputrecPreserveShape(ir))
     {
-        do_box_rel(ir, box_rel, b, FALSE);
+        do_box_rel(ir, box_rel, box, FALSE);
     }
 }
 
-void set_box_rel(const t_inputrec *ir, t_state *state)
+void set_box_rel(const t_inputrec *ir, matrix box_rel, matrix box)
 {
     /* Make sure the box obeys the restrictions before we fix the ratios */
-    correct_box(nullptr, 0, state->box, nullptr);
+    correct_box(nullptr, 0, box, nullptr);
 
-    clear_mat(state->box_rel);
+    clear_mat(box_rel);
 
     if (inputrecPreserveShape(ir))
     {
-        do_box_rel(ir, state->box_rel, state->box, TRUE);
+        do_box_rel(ir, box_rel, box, TRUE);
     }
 }
index 824cd62ad1721eff664909d42ac33407e4ca18e4..5699c0f3779f9223df161ed4ae23f9d226c38824 100644 (file)
@@ -42,7 +42,6 @@
 #include "gromacs/utility/real.h"
 
 struct t_inputrec;
-class t_state;
 
 /*! \brief Make sure the relative box shape remains the same
  *
@@ -50,18 +49,19 @@ class t_state;
  * preserved, which otherwise might diffuse away due to rounding
  * errors in pressure coupling or the deform option.
  *
- * \param[in] ir      Input record
- * \param[in] box_rel Relative box
- * \param[out] b      The corrected box
+ * \param[in]    ir      Input record
+ * \param[in]    box_rel Relative box dimensions
+ * \param[inout] box     The corrected actual box dimensions
  */
-void preserve_box_shape(const t_inputrec *ir, matrix box_rel, matrix b);
+void preserve_box_shape(const t_inputrec *ir, matrix box_rel, matrix box);
 
 /*! \brief Determine the relative box components
  *
- * Set state->box_rel used in mdrun to preserve the box shape
- * \param[in] ir       Input record
- * \param[inout] state Structure containing the box
+ * Set box_rel e.g. used in mdrun state, used to preserve the box shape
+ * \param[in]    ir      Input record
+ * \param[inout] box_rel Relative box dimensions
+ * \param[inout] box     Actual box dimensions
  */
-void set_box_rel(const t_inputrec *ir, t_state *state);
+void set_box_rel(const t_inputrec *ir, matrix box_rel, matrix box);
 
 #endif
index 2b8c903f1ac1d9df42f38c14aa31882c5b48dd9a..fe9700ce91aebbd0040f592c0e983159ec078446 100644 (file)
@@ -60,6 +60,7 @@
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/mtop_lookup.h"
index 68a79f23421dcc9e7b906828acd27982fb8865ca..5b916196ea07ebba5147dcf08cd72b1fa647f4a8 100644 (file)
@@ -53,6 +53,7 @@
 #include "gromacs/mdrunutility/mdmodules.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/atomprop.h"
 #include "gromacs/topology/block.h"
index 1021f43966be5930bc9dc95a9362f57b5dc4cee4..2a25b7d3c1d106852e5ea8182b661b9ee3548f08 100644 (file)
@@ -53,6 +53,7 @@
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/state.h"
 #include "gromacs/random/threefry.h"
 #include "gromacs/random/uniformintdistribution.h"
 #include "gromacs/random/uniformrealdistribution.h"