Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / pdb2gmx.c
index f165d723cc3e52cff9d5e3c86f851514d8f942b2..ac9f6ec0837524aa9a7b6b5543e086b8ed87bb2f 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 "pdb2gmx.h"
+#include "gmxpre.h"
 
-#include "config.h"
+#include "pdb2gmx.h"
 
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
-#include "typedefs.h"
-#include "gromacs/fileio/gmxfio.h"
-#include "copyrite.h"
-#include "gromacs/utility/cstringutil.h"
+#include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/math/vec.h"
-#include "gromacs/utility/futil.h"
+#include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/pdbio.h"
-#include "toputil.h"
-#include "h_db.h"
-#include "pgutil.h"
-#include "resall.h"
-#include "pdb2top.h"
-#include "ter_db.h"
-#include "gromacs/gmxlib/conformation-utilities.h"
-#include "genhydro.h"
-#include "readinp.h"
-#include "gromacs/topology/index.h"
-#include "fflibutil.h"
-#include "macros.h"
-
-#include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/strdb.h"
+#include "gromacs/gmxlib/conformation-utilities.h"
+#include "gromacs/gmxpreprocess/fflibutil.h"
+#include "gromacs/gmxpreprocess/genhydro.h"
+#include "gromacs/gmxpreprocess/h_db.h"
+#include "gromacs/gmxpreprocess/hizzie.h"
+#include "gromacs/gmxpreprocess/pdb2top.h"
+#include "gromacs/gmxpreprocess/pgutil.h"
+#include "gromacs/gmxpreprocess/resall.h"
+#include "gromacs/gmxpreprocess/specbond.h"
+#include "gromacs/gmxpreprocess/ter_db.h"
+#include "gromacs/gmxpreprocess/toputil.h"
+#include "gromacs/gmxpreprocess/xlate.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/readinp.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/topology/atomprop.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/residuetypes.h"
 #include "gromacs/topology/symtab.h"
-#include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
-
-#include "hizzie.h"
-#include "specbond.h"
-#include "xlate.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
 
 typedef struct {
     char gmx[6];
@@ -1682,7 +1679,7 @@ int gmx_pdb2gmx(int argc, char *argv[])
             chains[i].pdba->atom[j] = pdba_all.atom[pdb_ch[si].start+j];
             snew(chains[i].pdba->atomname[j], 1);
             *chains[i].pdba->atomname[j] =
-                strdup(*pdba_all.atomname[pdb_ch[si].start+j]);
+                gmx_strdup(*pdba_all.atomname[pdb_ch[si].start+j]);
             chains[i].pdba->pdbinfo[j] = pdba_all.pdbinfo[pdb_ch[si].start+j];
             copy_rvec(pdbx[pdb_ch[si].start+j], chains[i].x[j]);
         }
@@ -1699,7 +1696,7 @@ int gmx_pdb2gmx(int argc, char *argv[])
         {
             chains[i].pdba->resinfo[j] = pdba_all.resinfo[k+j];
             snew(chains[i].pdba->resinfo[j].name, 1);
-            *chains[i].pdba->resinfo[j].name = strdup(*pdba_all.resinfo[k+j].name);
+            *chains[i].pdba->resinfo[j].name = gmx_strdup(*pdba_all.resinfo[k+j].name);
             /* make all chain identifiers equal to that of the chain */
             chains[i].pdba->resinfo[j].chainid = pdb_ch[si].chainid;
         }
@@ -2057,7 +2054,7 @@ int gmx_pdb2gmx(int argc, char *argv[])
 
             nincl++;
             srenew(incls, nincl);
-            incls[nincl-1] = strdup(itp_fn);
+            incls[nincl-1] = gmx_strdup(itp_fn);
             itp_file       = gmx_fio_fopen(itp_fn, "w");
         }
         else
@@ -2068,12 +2065,12 @@ int gmx_pdb2gmx(int argc, char *argv[])
         srenew(mols, nmol+1);
         if (cc->bAllWat)
         {
-            mols[nmol].name = strdup("SOL");
+            mols[nmol].name = gmx_strdup("SOL");
             mols[nmol].nr   = pdba->nres;
         }
         else
         {
-            mols[nmol].name = strdup(molname);
+            mols[nmol].name = gmx_strdup(molname);
             mols[nmol].nr   = 1;
         }
         nmol++;