Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / gromacs / mdlib / ebin.c
index a29e9506d7652d9a998c51f57e21a1144054b756..33a0742130c8aaf96893ad22a087d43c134bf7f9 100644 (file)
@@ -1,55 +1,51 @@
-/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
+/*
+ * This file is part of the GROMACS molecular simulation package.
  *
- *
- *                This source code is part of
- *
- *                 G   R   O   M   A   C   S
- *
- *          GROningen MAchine for Chemical Simulations
- *
- *                        VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2012,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.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
  * of the License, or (at your option) any later version.
  *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
  *
- * For more info, check our website at http://www.gromacs.org
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
  *
- * And Hey:
- * GROwing Monsters And Cloning Shrimps
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
  */
 /* This file is completely threadsafe - keep it that way! */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
 #include <math.h>
 #include <string.h>
-#include "sysstuff.h"
-#include "smalloc.h"
-#include "typedefs.h"
-#include "gmx_fatal.h"
-#include "string2.h"
-#include "ebin.h"
-#include "main.h"
-#include "maths.h"
-#include "vec.h"
-#include "physics.h"
+#include "gromacs/utility/smalloc.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/legacyheaders/ebin.h"
+#include "gromacs/math/utilities.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/math/units.h"
 
 t_ebin *mk_ebin(void)
 {
@@ -79,10 +75,10 @@ int get_ebin_space(t_ebin *eb, int nener, const char *enm[], const char *unit)
         eb->e_sim[i].e    = 0;
         eb->e_sim[i].eav  = 0;
         eb->e_sim[i].esum = 0;
-        eb->enm[i].name   = strdup(enm[i-index]);
+        eb->enm[i].name   = gmx_strdup(enm[i-index]);
         if (unit != NULL)
         {
-            eb->enm[i].unit = strdup(unit);
+            eb->enm[i].unit = gmx_strdup(unit);
         }
         else
         {
@@ -109,7 +105,7 @@ int get_ebin_space(t_ebin *eb, int nener, const char *enm[], const char *unit)
                     }
                 }
             }
-            eb->enm[i].unit = strdup(u);
+            eb->enm[i].unit = gmx_strdup(u);
         }
     }
 
@@ -278,7 +274,7 @@ int main(int argc, char *argv[])
     {
         e[i] = i;
         sprintf(buf, "e%d", i);
-        ce[i] = strdup(buf);
+        ce[i] = gmx_strdup(buf);
     }
     ie = get_ebin_space(eb, NE, ce);
     add_ebin(eb, ie, NE, e, 0);
@@ -286,7 +282,7 @@ int main(int argc, char *argv[])
     {
         s[i] = i;
         sprintf(buf, "s%d", i);
-        cs[i] = strdup(buf);
+        cs[i] = gmx_strdup(buf);
     }
     is = get_ebin_space(eb, NS, cs);
     add_ebin(eb, is, NS, s, 0);
@@ -294,7 +290,7 @@ int main(int argc, char *argv[])
     {
         t[i] = i;
         sprintf(buf, "t%d", i);
-        ct[i] = strdup(buf);
+        ct[i] = gmx_strdup(buf);
     }
     it = get_ebin_space(eb, NT, ct);
     add_ebin(eb, it, NT, t, 0);