Do not include headers related to ObservablesHistory
authorMagnus Lundborg <lundborg.magnus@gmail.com>
Tue, 10 Oct 2017 12:13:45 +0000 (14:13 +0200)
committerBerk Hess <hess@kth.se>
Fri, 13 Oct 2017 06:46:09 +0000 (08:46 +0200)
Define  destructor for ObservablesHistory to avoid having to include
many extra headers.

Change-Id: I2681b519ace728dc494f967d17db5478af09f5df

src/gromacs/mdtypes/edsamhistory.h
src/gromacs/mdtypes/observableshistory.cpp [new file with mode: 0644]
src/gromacs/mdtypes/observableshistory.h
src/gromacs/mdtypes/swaphistory.h
src/programs/mdrun/runner.cpp

index bd418beed9f07ff81d78feaa790ff4da15fe6bbb..0c33bebd2cb050429adc5d5b0cf8794a690e9e81 100644 (file)
@@ -41,6 +41,9 @@
 #ifndef GMX_MDLIB_EDSAMHISTORY_H
 #define GMX_MDLIB_EDSAMHISTORY_H
 
+#include "gromacs/math/vectypes.h"
+#include "gromacs/utility/basedefinitions.h"
+
 /* Helper structure to be able to make essential dynamics / flooding group(s) whole
  *
  * If one uses essential dynamics or flooding on a group of atoms from
diff --git a/src/gromacs/mdtypes/observableshistory.cpp b/src/gromacs/mdtypes/observableshistory.cpp
new file mode 100644 (file)
index 0000000..be86a2b
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+
+#include "gmxpre.h"
+
+#include "observableshistory.h"
+
+#include "gromacs/mdtypes/edsamhistory.h"
+#include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/swaphistory.h"
+
+ObservablesHistory::ObservablesHistory()  = default;
+ObservablesHistory::~ObservablesHistory() = default;
index d4dfd9f00a8364ad63709b415ae26a52c9a1c74a..2f1e9f9c283d287766be0c8b3cf49eeb6857ec42 100644 (file)
@@ -71,6 +71,12 @@ struct ObservablesHistory
 
     //! Ion/water position swapping history
     std::unique_ptr<swaphistory_t> swapHistory;
+
+    //! Default constructor
+    ObservablesHistory();
+
+    //! Default destructor
+    ~ObservablesHistory();
 };
 
 #endif
index 080a8c066988844abc740375d39066d4b5b7d302..3bc865259b61347cb121001446e7b02214e13ce2 100644 (file)
@@ -41,6 +41,8 @@
 #ifndef GMX_MDLIB_SWAPHISTORY_H
 #define GMX_MDLIB_SWAPHISTORY_H
 
+#include "gromacs/mdtypes/md_enums.h"
+
 /* History of an ion type used in position swapping
  */
 typedef struct swapstateIons_t
index 7ac7975338efb5434c88a11698e48b7588a7a0c6..69c7abfc7859281c7114fb4157cf4a605154738c 100644 (file)
 #include "gromacs/mdrunutility/mdmodules.h"
 #include "gromacs/mdrunutility/threadaffinity.h"
 #include "gromacs/mdtypes/commrec.h"
-#include "gromacs/mdtypes/edsamhistory.h"
-#include "gromacs/mdtypes/energyhistory.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/observableshistory.h"
 #include "gromacs/mdtypes/state.h"
-#include "gromacs/mdtypes/swaphistory.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
 #include "gromacs/pulling/pull_rotation.h"