Move part of macros.h to grompp-impl.h
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / grompp-impl.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))   */