Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / genhydro.c
index afcadb43b4b09b5f96df7d4f074426171ccc133f..3a85fa12094f8a8201a5647d3174d605c1619db1 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.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "genhydro.h"
 
 #include <string.h>
 #include <time.h>
 
-#include "sysstuff.h"
-#include "typedefs.h"
-#include "gromacs/utility/smalloc.h"
 #include "gromacs/fileio/confio.h"
-#include "symtab.h"
-#include "vec.h"
-#include "gromacs/fileio/futil.h"
-#include "gmx_fatal.h"
-#include "physics.h"
-#include "calch.h"
-#include "genhydro.h"
-#include "h_db.h"
-#include "ter_db.h"
-#include "resall.h"
-#include "pgutil.h"
-#include "network.h"
-#include "macros.h"
+#include "gromacs/gmxpreprocess/calch.h"
+#include "gromacs/gmxpreprocess/h_db.h"
+#include "gromacs/gmxpreprocess/pgutil.h"
+#include "gromacs/gmxpreprocess/resall.h"
+#include "gromacs/gmxpreprocess/ter_db.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
 
 static void copy_atom(t_atoms *atoms1, int a1, t_atoms *atoms2, int a2)
 {
     atoms2->atom[a2] = atoms1->atom[a1];
     snew(atoms2->atomname[a2], 1);
-    *atoms2->atomname[a2] = strdup(*atoms1->atomname[a1]);
+    *atoms2->atomname[a2] = gmx_strdup(*atoms1->atomname[a1]);
 }
 
 static atom_id pdbasearch_atom(const char *name, int resind, t_atoms *pdba,
@@ -169,7 +166,7 @@ static t_hackblock *get_hackblocks(t_atoms *pdba, int nah, t_hackblock ah[],
         {
             if (hb[rnr].name == NULL)
             {
-                hb[rnr].name = strdup(ahptr->name);
+                hb[rnr].name = gmx_strdup(ahptr->name);
             }
             merge_hacks(ahptr, &hb[rnr]);
         }
@@ -234,7 +231,7 @@ static void expand_hackblocks_one(t_hackblock *hbr, char *atomname,
                 {
                     if ( (*abi)[*nabi + k].oname == NULL)
                     {
-                        (*abi)[*nabi + k].nname    = strdup(atomname);
+                        (*abi)[*nabi + k].nname    = gmx_strdup(atomname);
                         (*abi)[*nabi + k].nname[0] = 'H';
                     }
                 }
@@ -248,7 +245,7 @@ static void expand_hackblocks_one(t_hackblock *hbr, char *atomname,
                                 (*abi)[*nabi + k].oname ? (*abi)[*nabi + k].oname : "");
                     }
                     sfree((*abi)[*nabi + k].nname);
-                    (*abi)[*nabi + k].nname = strdup(hbr->hack[j].nname);
+                    (*abi)[*nabi + k].nname = gmx_strdup(hbr->hack[j].nname);
                 }
 
                 if (hbr->hack[j].tp == 10 && k == 2)
@@ -669,7 +666,7 @@ static int add_h_low(t_atoms **pdbaptr, rvec *xptr[],
                                         ab[i][j].nname);
                             }
                             snew(newpdba->atomname[newi], 1);
-                            *newpdba->atomname[newi] = strdup(ab[i][j].nname);
+                            *newpdba->atomname[newi] = gmx_strdup(ab[i][j].nname);
                             if (ab[i][j].oname != NULL && ab[i][j].atom) /* replace */
                             {                                            /*          newpdba->atom[newi].m    = ab[i][j].atom->m; */
 /*        newpdba->atom[newi].q    = ab[i][j].atom->q; */