Move part of macros.h to grompp-impl.h
authorRoland Schulz <roland@utk.edu>
Sun, 20 Apr 2014 17:56:55 +0000 (13:56 -0400)
committerRoland Schulz <roland@utk.edu>
Sun, 20 Apr 2014 17:58:22 +0000 (13:58 -0400)
Part of #1415.

Change-Id: I360ae1f220b6c51e90edbbe136053fd2e1c0ad5b

src/gromacs/gmxpreprocess/gen_vsite.c
src/gromacs/gmxpreprocess/genhydro.c
src/gromacs/gmxpreprocess/gpp_atomtype.c
src/gromacs/gmxpreprocess/gpp_nextnb.c
src/gromacs/gmxpreprocess/grompp-impl.h
src/gromacs/gmxpreprocess/hackblock.c
src/gromacs/gmxpreprocess/tomorse.c
src/gromacs/gmxpreprocess/topshake.c
src/gromacs/legacyheaders/macros.h

index 98414db3e98ca16b771fffcce7400afcc87da35b..a5f06b0c881e0f4d89d194547afa5a5371b437c3 100644 (file)
@@ -54,7 +54,6 @@
 #include "gromacs/utility/futil.h"
 #include "gpp_atomtype.h"
 #include "fflibutil.h"
-#include "macros.h"
 
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index b5a8e831b21eac7cb1d23ed4f751c4208d56afd8..34ff0fc82a404e0213b94d7e66407b3e809f73ec 100644 (file)
@@ -56,7 +56,6 @@
 #include "resall.h"
 #include "pgutil.h"
 #include "network.h"
-#include "macros.h"
 
 static void copy_atom(t_atoms *atoms1, int a1, t_atoms *atoms2, int a2)
 {
index a44dcb95c1c365dcd21a984b206317a19678e824..ca66a1f85c4d6670fb1575de9d5e50d331cbf152 100644 (file)
@@ -42,7 +42,6 @@
 #include <string.h>
 
 #include "gromacs/utility/smalloc.h"
-#include "macros.h"
 #include "topdirs.h"
 #include "toputil.h"
 #include "topdirs.h"
index 41a026d072c18bcb9915c6da9dd162de7cf47132..b2dcf122e66b56482cbf705c4a0311e63e1f8abd 100644 (file)
@@ -41,7 +41,6 @@
 
 #include <stdlib.h>
 
-#include "macros.h"
 /* #define DEBUG_NNB */
 #include "gpp_nextnb.h"
 #include "toputil.h"
index 8e0cef6d7e39a5a6ac0f44ae8cd942dc7ae08db5..da1f4d9bb15c5a29b2871946464bccdcfec560d6 100644 (file)
@@ -54,6 +54,28 @@ typedef struct {
  * non-bonded parameter combinations, which will be copied to t_params.
  */
 
+#ifndef __cplusplus
+/*
+ * With the macros below you don't
+ * have to use an index if you don't wan't to. You can eg. use
+ * param.C0 instead of param.c[0].
+ * In a similar fashion, you can use param.AI instead of
+ * param.a[0]
+ *
+ * For C++ those should be replaced with member functions.
+ */
+
+#define AI  a[0]
+#define AJ  a[1]
+#define AK  a[2]
+#define AL  a[3]
+#define AM  a[4]
+
+#define C0  c[0]
+#define C1  c[1]
+#define C2  c[2]
+#endif
+
 typedef struct {
     atom_id    a[MAXATOMLIST];   /* The atom list (eg. bonds: particle */
     /* i = a[0] (AI), j = a[1] (AJ))   */
index 4d576a1651d871111a650360131648ecab7d4c61..e65a8d9b8053e4a05e9cbae2e8738ea2e3bdc247 100644 (file)
@@ -43,7 +43,6 @@
 #include "hackblock.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/math/vec.h"
-#include "macros.h"
 
 /* these MUST correspond to the enum in hackblock.h */
 const char *btsNames[ebtsNR] = { "bonds", "angles", "dihedrals", "impropers", "exclusions", "cmap" };
index 330616115f3d56ed3d8adf563bb4242bdb9d5953..abab6f87fe1d290ce3092308ca5ed4247292e458 100644 (file)
@@ -52,7 +52,6 @@
 #include "toputil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gpp_atomtype.h"
-#include "macros.h"
 
 #include "tomorse.h"
 
index 56bc0c55bfe3d70a953080bdbbf3d1775ea2f6d6..b19f76e45fe7204c310e12dc1e7951eaa3523d84 100644 (file)
@@ -43,7 +43,6 @@
 #include <math.h>
 
 #include "physics.h"
-#include "macros.h"
 #include "readir.h"
 #include "typedefs.h"
 #include "topshake.h"
index fb8f022ec08f29c8706e5f13776faf1a80167580..4d7a04763a6b71a606847f30b2da194a6125267a 100644 (file)
 
 /* no extern "C" for this header because it only defines Macros */
 
-/*
- * With the macros below you don't
- * have to use an index if you don't wan't to. You can eg. use
- * angle.C0[23] instead if angle.c[0][23].
- * In a similar fashion, you can use angle.AI[3] instead of
- * angle.a[0][3]
- */
 #ifndef __cplusplus
 #include <stdlib.h>
 
-#define AI  a[0]
-#define AJ  a[1]
-#define AK  a[2]
-#define AL  a[3]
-#define AM  a[4]
-#define C0  c[0]
-#define C1  c[1]
-#define C2  c[2]
-
 #ifndef min
 #define min(a, b) (((a) < (b)) ? (a) : (b) )
 #endif