Create topology/atom_id.h
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 18 Sep 2015 06:47:23 +0000 (09:47 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 18 Sep 2015 19:17:37 +0000 (21:17 +0200)
This was the only thing remaining in types/simple.h that still forced
some code to include it directly.  Remove most includes of
types/simple.h that were only including it for atom_id definition.
This removes some widespread dependencies on legacyheaders/, but does
not yet make any whole additional directories independent of them.

Change-Id: Ic3678bdb0160a820cf39157fc76ac21365cfb8dd

22 files changed:
src/gromacs/fileio/confio.h
src/gromacs/fileio/espio.h
src/gromacs/fileio/g96io.h
src/gromacs/fileio/groio.h
src/gromacs/fileio/pdbio.h
src/gromacs/fileio/tngio_for_tools.h
src/gromacs/gmxpreprocess/read-conformation.cpp
src/gromacs/gmxpreprocess/read-conformation.h
src/gromacs/legacyheaders/oenv.h
src/gromacs/legacyheaders/types/simple.h
src/gromacs/pbcutil/mshift.h
src/gromacs/selection/centerofmass.h
src/gromacs/selection/indexutil.h
src/gromacs/topology/CMakeLists.txt
src/gromacs/topology/atom_id.h [new file with mode: 0644]
src/gromacs/topology/block.h
src/gromacs/topology/idef.h
src/gromacs/topology/index.h
src/gromacs/topology/invblock.cpp
src/gromacs/topology/invblock.h
src/gromacs/topology/mtop_util.cpp
src/gromacs/trajectoryanalysis/modules/surfacearea.h

index d3fa161fff2005692d1b0ced5dfb30ae2f3bb2b1..67477ccf47a92208326cd59f64dd77db1dfe7610 100644 (file)
@@ -37,9 +37,9 @@
 #ifndef GMX_FILEIO_CONFIO_H
 #define GMX_FILEIO_CONFIO_H
 
-#include <stdio.h>
-
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
+#include "gromacs/utility/basedefinitions.h"
 
 /* For reading coordinate files it is assumed that enough memory
  * has been allocated beforehand.
index fdd54fc08e9bbd1a9e7f8f5811b8c4cbefe2aa42..21d315f1fdb4f09f47dfd9930321dd578e34e5b4 100644 (file)
@@ -38,8 +38,8 @@
 
 #include <cstdio>
 
-#include "gromacs/legacyheaders/types/simple.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
 
 struct t_atoms;
 struct t_topology;
index d30bfc7a9a164498c159d09e8ef8e3e6251e4f13..e49b3a723165faf3175a262180c06e698241cd0f 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <stdio.h>
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
 
 #ifdef __cplusplus
 extern "C" {
index 57fd493efad474b526e40ea1c10b21ce91e8e525..fd6f3029881392867f12292c106caa72c6077917 100644 (file)
@@ -39,7 +39,9 @@
 
 #include <stdio.h>
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
+#include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index f87c3195893e782e216b7fbfdeefe20b14860a2b..a88150d635f31691385260c9efad138a3116727a 100644 (file)
 
 #include <stdio.h>
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
index c4993a272597c699af2e7447b9246e6040b04d1d..7d34bc989f617c016dcf2f1a2b4ed3ad03241f63 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
@@ -39,7 +39,7 @@
 
 #include "tng/tng_io_fwd.h"
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
index 5278609d34604fb7734d090e28a03c6a59beb2be..59b99e0fc299841a7020d3867fa4770dc7f7f409 100644 (file)
 #include "read-conformation.h"
 
 #include "gromacs/fileio/confio.h"
-#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/types/simple.h"
 #include "gromacs/topology/atomprop.h"
 #include "gromacs/topology/atoms.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/smalloc.h"
 
index fae7446719d6fe87722591db2d39f967da8c1c42..a862bda2517d92671daf19596e7b1f043692fce2 100644 (file)
@@ -35,7 +35,8 @@
 #ifndef GMX_GMXPREPROCESS_READ_CONFORMATION_H
 #define GMX_GMXPREPROCESS_READ_CONFORMATION_H
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/utility/real.h"
 
 struct gmx_atomprop;
 struct t_atoms;
index f12bfed2767f2b35f6255e7b0901a799e59e10e8..6f5fe6754ddf3583188f6e001f96dc29147e8f07 100644 (file)
@@ -39,7 +39,9 @@
 #define _oenv_h
 
 #include "gromacs/legacyheaders/types/oenv.h"
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
index ec8e23a860a1793dc1b7906a330dbccf41e952b5..04efe2b4990887c2bbf086d0a384db080ece3030 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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 _simple_h
 
 #include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
-typedef int         atom_id;      /* To indicate an atoms id         */
-#define NO_ATID     (atom_id)(~0) /* Use this to indicate invalid atid */
-
 #endif
index 2dfee50ff0598c948853578484ac815956f68e13..c37a2fde5ebc9a6446a2d7c5227a86612facf007 100644 (file)
@@ -39,8 +39,8 @@
 
 #include <stdio.h>
 
-#include "gromacs/legacyheaders/types/simple.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
index 4aa7cf8288139ef599f024c977ed446427144a6c..0c51fa49ba522adb79e5f97631a6018fed7bd52f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2013,2014,2015, 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.
@@ -74,8 +74,8 @@
 #ifndef GMX_SELECTION_CENTEROFMASS_H
 #define GMX_SELECTION_CENTEROFMASS_H
 
-#include "gromacs/legacyheaders/types/simple.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
 
 struct t_block;
 struct t_blocka;
index 9ac9364008ba028178a82269af688450ca373f41..9572a9b1bd036c22a61a24dd948c77f8bd3613ef 100644 (file)
@@ -65,7 +65,7 @@
 
 #include <string>
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/block.h"
 
 namespace gmx
index e84a9da319e85f1922f8eb07ce20085477eb1dcb..b8aee023f5e80abefd3a8fd7da7d1889a50a940e 100644 (file)
@@ -36,6 +36,7 @@ file(GLOB TOPOLOGY_SOURCES *.cpp)
 set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TOPOLOGY_SOURCES} PARENT_SCOPE)
 
 gmx_install_headers(
+    atom_id.h
     atomprop.h
     atoms.h
     block.h
diff --git a/src/gromacs/topology/atom_id.h b/src/gromacs/topology/atom_id.h
new file mode 100644 (file)
index 0000000..8c866c1
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2015, 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.
+ */
+#ifndef GMX_TOPOLOGY_ATOM_ID_H
+#define GMX_TOPOLOGY_ATOM_ID_H
+
+typedef int         atom_id;      /* To indicate an atoms id         */
+#define NO_ATID     (atom_id)(~0) /* Use this to indicate invalid atid */
+
+#endif
index a3680e1a62a9d5e3ae4c04a7f824aa67266e3f5d..8a3592175d6ba83f7cccc5f4bafd2fc95046ee86 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) 2010,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2015, 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.
@@ -37,7 +37,8 @@
 #ifndef GMX_TOPOLOGY_BLOCK_H
 #define GMX_TOPOLOGY_BLOCK_H
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
+#include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index e243e453f1b4171c8556be1acccaa7e26139503e..6a566f6a65b32594ede8d94501e4b5f5646f6ca2 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
@@ -37,7 +37,9 @@
 #ifndef GMX_TOPOLOGY_IDEF_H
 #define GMX_TOPOLOGY_IDEF_H
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
+#include "gromacs/utility/real.h"
 
 #ifdef __cplusplus
 extern "C" {
index e361be73d5e3f819e5ea5d42962c07bb6478c448..95ce40257773dae35801f41985242ecd259f30a8 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) 2010,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2015, 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.
@@ -39,7 +39,8 @@
 
 #include <stdio.h>
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
+#include "gromacs/utility/basedefinitions.h"
 
 #ifdef __cplusplus
 extern "C" {
index 64c982f00a696df0ca8827d0df662fe5ae381379..9ef722b89daf1f2d0062c34d79b4cb97db03a76d 100644 (file)
@@ -39,7 +39,7 @@
 
 #include "invblock.h"
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index f30e98a95798c3229de2bd245d4b3f5b466171ab..f7a1487f760b874aea56e9b5084a471b300c7104 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) 2010,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2015, 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.
@@ -37,7 +37,7 @@
 #ifndef GMX_TOPOLOGY_INVBLOCK_H
 #define GMX_TOPOLOGY_INVBLOCK_H
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/topology/atom_id.h"
 
 #ifdef __cplusplus
 extern "C" {
index a975a3db9a868dbcd10c26b82f9489aedd4dc2aa..e2b1bc597a649cfb520866e61d5ab820f736b20c 100644 (file)
@@ -45,7 +45,6 @@
 #include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/legacyheaders/types/inputrec.h"
-#include "gromacs/legacyheaders/types/simple.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/topology/atoms.h"
 #include "gromacs/topology/block.h"
index 94c8c1e8900b1b20cfb7ab0e9cefcd422d8235f6..19b3f00e2266dd0081e743d79691bc5a7f8b28ae 100644 (file)
 #ifndef GMX_TRAJECTORYANALYSIS_SURFACEAREA_H
 #define GMX_TRAJECTORYANALYSIS_SURFACEAREA_H
 
-#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atom_id.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/classhelpers.h"
+#include "gromacs/utility/real.h"
 
 struct t_pbc;