Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / topology / atomprop.cpp
index 09cb30785b2251ae5d26bb2f1ecdc82e499cd652..a2fdfece3e5efe715f5aab3f0c3d32139ee59be9 100644 (file)
  * 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 "gromacs/topology/atomprop.h"
+#include "gmxpre.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "atomprop.h"
 
 #include <ctype.h>
 #include <string.h>
@@ -46,7 +44,7 @@
 #include "gromacs/fileio/strdb.h"
 #include "gromacs/legacyheaders/copyrite.h"
 #include "gromacs/math/utilities.h"
-#include "gromacs/topology/index.h"
+#include "gromacs/topology/residuetypes.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
@@ -64,9 +62,9 @@ typedef struct {
 } aprop_t;
 
 typedef struct gmx_atomprop {
-    gmx_bool          bWarned, bWarnVDW;
-    aprop_t           prop[epropNR];
-    gmx_residuetype_t restype;
+    gmx_bool           bWarned, bWarnVDW;
+    aprop_t            prop[epropNR];
+    gmx_residuetype_t *restype;
 } gmx_atomprop;
 
 
@@ -95,7 +93,7 @@ static int dbcmp_len(char *search, char *database)
     return i;
 }
 
-static int get_prop_index(aprop_t *ap, gmx_residuetype_t restype,
+static int get_prop_index(aprop_t *ap, gmx_residuetype_t *restype,
                           char *resnm, char *atomnm,
                           gmx_bool *bExact)
 {
@@ -156,7 +154,7 @@ static int get_prop_index(aprop_t *ap, gmx_residuetype_t restype,
     return j;
 }
 
-static void add_prop(aprop_t *ap, gmx_residuetype_t restype,
+static void add_prop(aprop_t *ap, gmx_residuetype_t *restype,
                      char *resnm, char *atomnm,
                      real p, int line)
 {
@@ -182,8 +180,8 @@ static void add_prop(aprop_t *ap, gmx_residuetype_t restype,
                 ap->bAvail[i] = FALSE;
             }
         }
-        ap->atomnm[ap->nprop] = strdup(atomnm);
-        ap->resnm[ap->nprop]  = strdup(resnm);
+        ap->atomnm[ap->nprop] = gmx_strdup(atomnm);
+        ap->resnm[ap->nprop]  = gmx_strdup(resnm);
         j                     = ap->nprop;
         ap->nprop++;
     }
@@ -254,7 +252,7 @@ static void set_prop(gmx_atomprop_t aps, int eprop)
     ap = &ap2->prop[eprop];
     if (!ap->bSet)
     {
-        ap->db  = strdup(fns[eprop]);
+        ap->db  = gmx_strdup(fns[eprop]);
         ap->def = def[eprop];
         read_prop(aps, eprop, fac[eprop]);