Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / gen_vsite.c
index f3ad7fa4e4c6b8ed92bf9d3af1c13c920c1cadbe..9743f690a6d7a7a271d2df1c703aa92a2f0154ea 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, 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.
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
-#include "string2.h"
-#include <stdio.h>
 #include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
+
 #include "gen_vsite.h"
-#include "smalloc.h"
 #include "resall.h"
 #include "add_par.h"
-#include "vec.h"
+#include "gromacs/math/vec.h"
 #include "toputil.h"
-#include "physics.h"
-#include "index.h"
-#include "names.h"
-#include "gromacs/fileio/futil.h"
+#include "gromacs/math/units.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/utility/futil.h"
 #include "gpp_atomtype.h"
 #include "fflibutil.h"
-#include "macros.h"
+
+#include "gromacs/topology/residuetypes.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
 
 #define MAXNAME 32
 #define OPENDIR     '[' /* starting sign for directive         */
@@ -312,7 +314,7 @@ static void read_vsite_database(const char *ddbname,
     *nvsiteconf     = nvsite;
     *nvsitetop      = ntop;
 
-    ffclose(ddb);
+    gmx_ffclose(ddb);
 }
 
 static int nitrogen_is_planar(t_vsiteconf vsiteconflist[], int nvsiteconf, char atomtype[])
@@ -506,7 +508,7 @@ static void print_bonds(FILE *fp, int o2n[],
 }
 
 static int get_atype(int atom, t_atoms *at, int nrtp, t_restp rtp[],
-                     gmx_residuetype_t rt)
+                     gmx_residuetype_t *rt)
 {
     int      type;
     gmx_bool bNterm;
@@ -544,7 +546,7 @@ static int vsite_nm2type(const char *name, gpp_atomtype_t atype)
 }
 
 static real get_amass(int atom, t_atoms *at, int nrtp, t_restp rtp[],
-                      gmx_residuetype_t rt)
+                      gmx_residuetype_t *rt)
 {
     real     mass;
     gmx_bool bNterm;
@@ -1568,7 +1570,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
     char            **db;
     int               nvsiteconf, nvsitetop, cmplength;
     gmx_bool          isN, planarN, bFound;
-    gmx_residuetype_t rt;
+    gmx_residuetype_t*rt;
 
     t_vsiteconf      *vsiteconflist;
     /* pointer to a list of CH3/NH3/NH2 configuration entries.
@@ -2152,7 +2154,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
                 {
                     if (debug)
                     {
-                        fprintf(debug, " [%u -> %u]", params->param[i].a[j],
+                        fprintf(debug, " [%d -> %d]", params->param[i].a[j],
                                 params->param[i].a[j]-add_shift);
                     }
                     params->param[i].a[j] = params->param[i].a[j]-add_shift;
@@ -2161,7 +2163,7 @@ void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
                 {
                     if (debug)
                     {
-                        fprintf(debug, " [%u -> %d]", params->param[i].a[j],
+                        fprintf(debug, " [%d -> %d]", params->param[i].a[j],
                                 o2n[params->param[i].a[j]]);
                     }
                     params->param[i].a[j] = o2n[params->param[i].a[j]];