Move more preprocessing files into the module
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 17 Jan 2014 16:38:47 +0000 (17:38 +0100)
committerRoland Schulz <roland@utk.edu>
Tue, 21 Jan 2014 18:37:25 +0000 (13:37 -0500)
This removes the need for the gmx_objlib CMake object library, because
there is no longer random functionality orphaned in src/programs/gmx
(which is there because it was orphaned in src/kernel in release-4-6).

Moved legacyheaders/grompp.h to gmxpreprocess/grompp-impl.h since it
only declared structures that are (now) only used in that module (and
it no longer #includes stdio.h). gmxpreprocess/grompp.h now only
declares gmx_grompp().

Likewise, pdb2gmx, protonate and x2top now have their own
single-function headers.

Removed useless declaration of ncontrol from h_db.h

Removed grompp.h-related useless dependencies, declarations and
definitions from Generalized Born files.

Updated include and added C++ guards for files already within the
module (and new ones). Uncrustified, bumped copyrights

Refs #1415

Change-Id: Ie7967d7d7f61df684d530e3c2d982486a3cd128f

61 files changed:
src/gromacs/gmxpreprocess/add_par.c
src/gromacs/gmxpreprocess/add_par.h
src/gromacs/gmxpreprocess/calc_verletbuf.h
src/gromacs/gmxpreprocess/compute_io.h
src/gromacs/gmxpreprocess/convparm.c [moved from src/programs/gmx/convparm.c with 100% similarity]
src/gromacs/gmxpreprocess/convparm.h [moved from src/programs/gmx/convparm.h with 82% similarity]
src/gromacs/gmxpreprocess/fflibutil.h
src/gromacs/gmxpreprocess/gen_ad.h
src/gromacs/gmxpreprocess/gen_vsite.h
src/gromacs/gmxpreprocess/genhydro.h
src/gromacs/gmxpreprocess/gmxcpp.h
src/gromacs/gmxpreprocess/gpp_atomtype.h
src/gromacs/gmxpreprocess/gpp_bond_atomtype.h
src/gromacs/gmxpreprocess/gpp_nextnb.h
src/gromacs/gmxpreprocess/grompp-impl.h [moved from src/gromacs/legacyheaders/grompp.h with 97% similarity]
src/gromacs/gmxpreprocess/grompp.c [moved from src/programs/gmx/grompp.c with 99% similarity]
src/gromacs/gmxpreprocess/grompp.h [new file with mode: 0644]
src/gromacs/gmxpreprocess/h_db.c
src/gromacs/gmxpreprocess/h_db.h
src/gromacs/gmxpreprocess/hackblock.h
src/gromacs/gmxpreprocess/hizzie.c [moved from src/programs/gmx/hizzie.c with 99% similarity]
src/gromacs/gmxpreprocess/hizzie.h [moved from src/programs/gmx/hizzie.h with 86% similarity]
src/gromacs/gmxpreprocess/nm2type.c [moved from src/programs/gmx/nm2type.c with 100% similarity]
src/gromacs/gmxpreprocess/nm2type.h [moved from src/programs/gmx/nm2type.h with 85% similarity]
src/gromacs/gmxpreprocess/pdb2gmx.c [moved from src/programs/gmx/pdb2gmx.c with 99% similarity]
src/gromacs/gmxpreprocess/pdb2gmx.h [new file with mode: 0644]
src/gromacs/gmxpreprocess/pdb2top.h
src/gromacs/gmxpreprocess/pgutil.h
src/gromacs/gmxpreprocess/protonate.c [moved from src/programs/gmx/g_protonate.c with 98% similarity]
src/gromacs/gmxpreprocess/protonate.h [moved from src/programs/gmx/legacycmainfunctions.h with 79% similarity]
src/gromacs/gmxpreprocess/readir.h
src/gromacs/gmxpreprocess/resall.h
src/gromacs/gmxpreprocess/specbond.c [moved from src/programs/gmx/specbond.c with 100% similarity]
src/gromacs/gmxpreprocess/specbond.h [moved from src/programs/gmx/specbond.h with 83% similarity]
src/gromacs/gmxpreprocess/ter_db.h
src/gromacs/gmxpreprocess/tomorse.c [moved from src/programs/gmx/tomorse.c with 99% similarity]
src/gromacs/gmxpreprocess/tomorse.h [moved from src/programs/gmx/tomorse.h with 86% similarity]
src/gromacs/gmxpreprocess/topdirs.c
src/gromacs/gmxpreprocess/topdirs.h
src/gromacs/gmxpreprocess/topexcl.h
src/gromacs/gmxpreprocess/topio.c
src/gromacs/gmxpreprocess/topio.h
src/gromacs/gmxpreprocess/toppush.h
src/gromacs/gmxpreprocess/topshake.h
src/gromacs/gmxpreprocess/toputil.c
src/gromacs/gmxpreprocess/toputil.h
src/gromacs/gmxpreprocess/vsite_parm.h
src/gromacs/gmxpreprocess/x2top.c [moved from src/programs/gmx/g_x2top.c with 99% similarity]
src/gromacs/gmxpreprocess/x2top.h [new file with mode: 0644]
src/gromacs/gmxpreprocess/xlate.c [moved from src/programs/gmx/xlate.c with 100% similarity]
src/gromacs/gmxpreprocess/xlate.h [moved from src/programs/gmx/xlate.h with 80% similarity]
src/gromacs/legacyheaders/genborn.h
src/gromacs/mdlib/genborn.c
src/gromacs/mdlib/genborn_sse2_double.c
src/gromacs/mdlib/genborn_sse2_double.h
src/gromacs/mdlib/genborn_sse2_single.c
src/gromacs/mdlib/genborn_sse2_single.h
src/programs/CMakeLists.txt
src/programs/gmx/legacymodules.cpp
src/programs/mdrun/tests/CMakeLists.txt
src/programs/mdrun/tests/moduletest.cpp

index a034b5aeb1c9ffa3e86d66fcc57b1a6fe9088ad3..430f912b2e529843bd2c992cff20f4e172dbd353 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) 2011, by the GROMACS development team, led by
+ * Copyright (c) 2011,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.
@@ -42,7 +42,7 @@
 #include <string.h>
 #include "typedefs.h"
 #include "smalloc.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "macros.h"
 #include "toputil.h"
 #include "hackblock.h"
index 0ec234a04ca0613f71ba49bea4452fe92bc6a0a1..71f77d1b6bcab2fb0673676c99b236d2718ffc2b 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.
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _add_par_h
-#define _add_par_h
+#ifndef GMX_GMXPREPROCESS_ADD_PAR_H
+#define GMX_GMXPREPROCESS_ADD_PAR_H
 
 #include "typedefs.h"
 #include "pdb2top.h"
@@ -46,34 +46,34 @@ extern "C"
 {
 #endif
 
-extern void add_param(t_params *ps, int ai, int aj, real *c, char *s);
+void add_param(t_params *ps, int ai, int aj, real *c, char *s);
 
-extern void add_imp_param(t_params *ps, int ai, int aj, int ak, int al,
-                          real c0, real c1, char *s);
+void add_imp_param(t_params *ps, int ai, int aj, int ak, int al,
+                   real c0, real c1, char *s);
 
-extern void add_dih_param(t_params *ps, int ai, int aj, int ak, int al,
-                          real c0, real c1, real c2, char *s);
+void add_dih_param(t_params *ps, int ai, int aj, int ak, int al,
+                   real c0, real c1, real c2, char *s);
 
-extern void add_cmap_param(t_params *ps, int ai, int aj, int ak, int al, int am,
-                           char *s);
+void add_cmap_param(t_params *ps, int ai, int aj, int ak, int al, int am,
+                    char *s);
 
-extern void add_vsite2_atoms(t_params *ps, int ai, int aj, int ak);
+void add_vsite2_atoms(t_params *ps, int ai, int aj, int ak);
 
-extern void add_vsite3_atoms(t_params *ps, int ai, int aj, int ak, int al,
-                             gmx_bool bSwapParity);
+void add_vsite3_atoms(t_params *ps, int ai, int aj, int ak, int al,
+                      gmx_bool bSwapParity);
 
-extern void add_vsite2_param(t_params *ps, int ai, int aj, int ak, real c0);
+void add_vsite2_param(t_params *ps, int ai, int aj, int ak, real c0);
 
-extern void add_vsite3_param(t_params *ps, int ai, int aj, int ak, int al,
-                             real c0, real c1);
+void add_vsite3_param(t_params *ps, int ai, int aj, int ak, int al,
+                      real c0, real c1);
 
-extern void add_vsite4_atoms(t_params *ps, int ai, int aj, int ak, int al,
-                             int am);
+void add_vsite4_atoms(t_params *ps, int ai, int aj, int ak, int al,
+                      int am);
 
-extern int search_jtype(t_restp *rp, char *name, gmx_bool bFirstRes);
+int search_jtype(t_restp *rp, char *name, gmx_bool bFirstRes);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif  /* _add_par_h */
+#endif
index 768585cdef1bf33ad6b73e2378fe5ef687b70dbd..e2bbb48ebe00a9e2f16b7e36e796aa169d086012 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _calc_verletbuf_h
-#define _calc_verletbuf_h
+#ifndef GMX_GMXPREPROCESS_CALC_VERLETBUF_H
+#define GMX_GMXPREPROCESS_CALC_VERLETBUF_H
 
 #include "typedefs.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct
 {
     int  cluster_size_i;  /* Cluster pair-list i-cluster size atom count */
@@ -67,4 +71,8 @@ void calc_verlet_buffer_size(const gmx_mtop_t *mtop, real boxvol,
                              int *n_nonlin_vsite,
                              real *rlist);
 
-#endif  /* _calc_verletbuf_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index c6837d1e3afab3b1f5272d855bb3e1f7260209ee..68e46ad24736630a9eb82d9280caf251f7b6cb0d 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) 2011, by the GROMACS development team, led by
+ * Copyright (c) 2011,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _compute_io_h
-#define _compute_io_h
+#ifndef GMX_GMXPREPROCESS_COMPUTE_IO_H
+#define GMX_GMXPREPROCESS_COMPUTE_IO_H
 
 #include "typedefs.h"
 
-extern double compute_io(t_inputrec *ir, int natoms, gmx_groups_t *groups,
-                         int nrener, int nrepl);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double compute_io(t_inputrec *ir, int natoms, gmx_groups_t *groups,
+                  int nrener, int nrepl);
 /* Return total output to be written from this simulation. */
 
-#endif  /* _compute_io_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
similarity index 82%
rename from src/programs/gmx/convparm.h
rename to src/gromacs/gmxpreprocess/convparm.h
index e511d578cd62006d337ace5538e936091de0b94b..cf8a39bcdff05818b2a2c29f5ed1896a2a60bb1f 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _convparm_h
-#define _convparm_h
+#ifndef GMX_GMXPREPROCESS_CONVPARM_H
+#define GMX_GMXPREPROCESS_CONVPARM_H
 
 #include "typedefs.h"
 
-extern void convert_params(int atnr, t_params nbtypes[],
-                           t_molinfo *mi, int comb, double reppow, real fudgeQQ,
-                           gmx_mtop_t *mtop);
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-#endif  /* _convparm_h */
+void convert_params(int atnr, t_params nbtypes[],
+                    t_molinfo *mi, int comb, double reppow, real fudgeQQ,
+                    gmx_mtop_t *mtop);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 983bb60fac43ff26a58a8ffbd29addde6bf9af5b..4d54ec40057110c99adc75f43352b7c424cbac3d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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.
@@ -33,8 +33,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _fflibutil_h
-#define _fflibutil_h
+#ifndef GMX_GMXPREPROCESS_FFLIBUTIL_H
+#define GMX_GMXPREPROCESS_FFLIBUTIL_H
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 extern "C" {
 #endif
 
-extern const char *fflib_forcefield_dir_ext();
+const char *fflib_forcefield_dir_ext();
 /* Returns the name of the force field directory extension */
 
-extern const char *fflib_forcefield_itp();
+const char *fflib_forcefield_itp();
 /* Returns the name of the main forcefield itp file */
 
-extern const char *fflib_forcefield_doc();
+const char *fflib_forcefield_doc();
 /* Returns the name of the forcefield documentation file */
 
-extern void fflib_filename_base(const char *filename, char *filebase, int maxlen);
+void fflib_filename_base(const char *filename, char *filebase, int maxlen);
 /* Return the base file name of filename in base,
  * i.e. remove path and extension, if present.
  * base should be at least of size maxlen.
  */
 
-extern int fflib_search_file_end(const char *ffdir,
-                                 const char *file_end,
-                                 gmx_bool    bFatalError,
-                                 char     ***filenames);
+int fflib_search_file_end(const char *ffdir,
+                          const char *file_end,
+                          gmx_bool    bFatalError,
+                          char     ***filenames);
 /* Search for files ending on file_end in the force field directory fflib.
  * fflib should be in the GROMACS lib.path.
  * Return the number of files and the file names in filenames.
  */
 
-extern int fflib_search_file_in_dirend(const char *filename, const char *dirend,
-                                       char ***dirnames);
+int fflib_search_file_in_dirend(const char *filename, const char *dirend,
+                                char ***dirnames);
 /* Search for files with name filename in subdirectories with names
  * ending on dirend.
  * Return the number of files and the directory names in dirnames.
  */
-extern gmx_bool fflib_fexist(const char *file);
+gmx_bool fflib_fexist(const char *file);
 /* Check if a file exists in the force field library */
 
-extern FILE *fflib_open(const char *file);
+FILE *fflib_open(const char *file);
 /* Open force field library file "file" for reading.
  * "file" should contain the whole path to the force field library,
  * either absolute or relative to the current dir.
@@ -90,4 +90,4 @@ extern FILE *fflib_open(const char *file);
 }
 #endif
 
-#endif  /* _fflibutil_h */
+#endif
index a9bf24d309cee7b20a4a7b2cbf335885598cb598..80ae02e989b40221ffe9f34dc6783211355c9d73 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) 2012, by the GROMACS development team, led by
+ * 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.
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _gen_ad_h
-#define _gen_ad_h
+#ifndef GMX_GMXPREPROCESS_GEN_AD_H
+#define GMX_GMXPREPROCESS_GEN_AD_H
 
 #include "typedefs.h"
 #include "toputil.h"
@@ -58,4 +58,4 @@ void gen_pad(t_nextnb *nnb, t_atoms *atoms, t_restp rtp[],
 }
 #endif
 
-#endif  /* _gen_ad_h */
+#endif
index b922dae01c75937d143d4134ea6ebd367041b37d..19f119211b27db9b9574ca3f09db05d8133038c6 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _gen_vsite_h
-#define _gen_vsite_h
+#ifndef GMX_GMXPREPROCESS_GEN_VSITE_H
+#define GMX_GMXPREPROCESS_GEN_VSITE_H
 
 #include "typedefs.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "gpp_atomtype.h"
 #include "hackblock.h"
 
@@ -50,17 +50,17 @@ extern "C"
 
 /* stuff for pdb2gmx */
 
-extern void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
-                      t_atoms *at, t_symtab *symtab, rvec *x[],
-                      t_params plist[], int *dummy_type[], int *cgnr[],
-                      real mHmult, gmx_bool bVSiteAromatics,
-                      const char *ffdir);
+void do_vsites(int nrtp, t_restp rtp[], gpp_atomtype_t atype,
+               t_atoms *at, t_symtab *symtab, rvec *x[],
+               t_params plist[], int *dummy_type[], int *cgnr[],
+               real mHmult, gmx_bool bVSiteAromatics,
+               const char *ffdir);
 
-extern void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult,
-                      gmx_bool bDeuterate);
+void do_h_mass(t_params *psb, int vsite_type[], t_atoms *at, real mHmult,
+               gmx_bool bDeuterate);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif  /* _gen_vsite_h */
+#endif
index 97a286f98407d7e0b9c79cdd827bc5dc37e82799..f28f5c25309df3743de2b136107ed864d3d5e379 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _genhydro_h
-#define _genhydro_h
+#ifndef GMX_GMXPREPROCESS_GENHYDRO_H
+#define GMX_GMXPREPROCESS_GENHYDRO_H
 
 #include "gromacs/fileio/pdbio.h"
 #include "hackblock.h"
 
-extern int add_h(t_atoms **pdbaptr, rvec *xptr[],
-                 int nah, t_hackblock ah[],
-                 int nterpairs,
-                 t_hackblock **ntdb, t_hackblock **ctdb,
-                 int *rN, int *rC, gmx_bool bMissing,
-                 int **nabptr, t_hack ***abptr,
-                 gmx_bool bUpdate_pdba, gmx_bool bKeep_old_pdba);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int add_h(t_atoms **pdbaptr, rvec *xptr[],
+          int nah, t_hackblock ah[],
+          int nterpairs,
+          t_hackblock **ntdb, t_hackblock **ctdb,
+          int *rN, int *rC, gmx_bool bMissing,
+          int **nabptr, t_hack ***abptr,
+          gmx_bool bUpdate_pdba, gmx_bool bKeep_old_pdba);
 /* Generate hydrogen atoms and N and C terminal patches.
  * int nterpairs is the number of termini pairs in the molecule
  * ntdb[i] and ctdb[i] may be NULL, no replacement will be done then.
@@ -60,16 +64,20 @@ extern int add_h(t_atoms **pdbaptr, rvec *xptr[],
  * return the New total number of atoms
  */
 
-extern int protonate(t_atoms **atoms, rvec **x, t_protonate *protdata);
+int protonate(t_atoms **atoms, rvec **x, t_protonate *protdata);
 /* Protonate molecule according to gmx2.ff/aminoacids.hdb
  * when called the first time, new atoms are added to atoms,
  * second time only coordinates are generated
  * return the new total number of atoms
  */
 
-extern void deprotonate(t_atoms *atoms, rvec *x);
+void deprotonate(t_atoms *atoms, rvec *x);
 /* Deprotonate any molecule: all atoms whose name begins with H will be
  * removed
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 785f3acf4618081da42ae01b916251b037a314dd..5488a220cf2c13cf285715fa173e4ac3b0ae800c 100644 (file)
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _gmxcpp_h
-#define _gmxcpp_h
+#ifndef GMX_GMXPREPROCESS_GMXCPP_H
+#define GMX_GMXPREPROCESS_GMXCPP_H
 typedef struct gmx_cpp *gmx_cpp_t;
 
 /* The possible return codes for these functions */
index 83fda2608f306b7cbe672e4130188e9b2e0b87a0..fd435f83d289e7568ffee48fea1c15eb36e6d7f0 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) 2011, by the GROMACS development team, led by
+ * Copyright (c) 2011,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _gpp_atomtype_h
-#define _gpp_atomtype_h
+#ifndef GMX_GMXPREPROCESS_GPP_ATOMTYPE_H
+#define GMX_GMXPREPROCESS_GPP_ATOMTYPE_H
 
 #include <stdio.h>
 #include "typedefs.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -117,4 +117,4 @@ void copy_atomtype_atomtypes(gpp_atomtype_t atype, t_atomtypes *atypes);
 }
 #endif
 
-#endif  /* _gpp_atomtype_h */
+#endif
index f3a05be23d2f8fa5077de6e212fe1705faa2f59c..b8e34028678aaad9ac6900f177e9921a48a5c772 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) 2011, by the GROMACS development team, led by
+ * Copyright (c) 2011,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.
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _gpp_bondatomtype_h
-#define _gpp_bondatomtype_h
+#ifndef GMX_GMXPREPROCESS_GPP_BONDATOMTYPE_H
+#define GMX_GMXPREPROCESS_GPP_BONDATOMTYPE_H
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #include <stdio.h>
 #include "typedefs.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct gpp_bondatomtype *t_bond_atomtype;
 
-extern int get_bond_atomtype_type(char *str, t_bond_atomtype at);
+int get_bond_atomtype_type(char *str, t_bond_atomtype at);
 /* Return atomtype corresponding to case-insensitive str
    or NOTSET if not found */
 
-extern char *get_bond_atomtype_name(int nt, t_bond_atomtype at);
+char *get_bond_atomtype_name(int nt, t_bond_atomtype at);
 /* Return name corresponding to atomtype nt, or NULL if not found */
 
-extern t_bond_atomtype init_bond_atomtype(void);
+t_bond_atomtype init_bond_atomtype(void);
 /* Return a new atomtype structure */
 
-extern void done_bond_atomtype(t_bond_atomtype *at);
+void done_bond_atomtype(t_bond_atomtype *at);
 /* Free the memory in the structure */
 
-extern void add_bond_atomtype(t_bond_atomtype at, t_symtab *tab,
-                              char *name);
+void add_bond_atomtype(t_bond_atomtype at, t_symtab *tab,
+                       char *name);
 /* Add a complete new atom type to an existing atomtype structure */
 
-#endif  /* _gpp_bond_atomtype_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index a01b7355a432e036a862350a30fcab7c5a80fa1a..326763123431a32212b72eb7cb01c3d4ae8c5c62 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) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _gpp_nextnb_h
-#define _gpp_nextnb_h
+#ifndef GMX_GMXPREPROCESS_GPP_NEXTNB_H
+#define GMX_GMXPREPROCESS_GPP_NEXTNB_H
 
-#include "grompp.h"
+#include "grompp-impl.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -88,4 +88,4 @@ void generate_excl (int nrexcl, int nratoms,
 }
 #endif
 
-#endif  /* _gpp_nextnb_h */
+#endif
similarity index 97%
rename from src/gromacs/legacyheaders/grompp.h
rename to src/gromacs/gmxpreprocess/grompp-impl.h
index 1e2d6ca82e84459f13251d8c5b6e0fa1f16ffa87..8e0cef6d7e39a5a6ac0f44ae8cd942dc7ae08db5 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _grompp_h
-#define _grompp_h
+#ifndef GMX_GMXPREPROCESS_GROMPP_IMPL_H
+#define GMX_GMXPREPROCESS_GROMPP_IMPL_H
 
-#include <stdio.h>
 #include "typedefs.h"
 
 #ifdef __cplusplus
@@ -153,4 +152,4 @@ typedef enum {
 }
 #endif
 
-#endif  /* _grompp_h */
+#endif
similarity index 99%
rename from src/programs/gmx/grompp.c
rename to src/gromacs/gmxpreprocess/grompp.c
index 1bc1da737cefd4f3e0c879e5b597990099c94812..1b8889355874bc08cce258a1225f5792f9dc9c6d 100644 (file)
@@ -34,6 +34,8 @@
  * 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 "grompp.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -55,7 +57,7 @@
 #include "readir.h"
 #include "symtab.h"
 #include "names.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "random.h"
 #include "vec.h"
 #include "gromacs/fileio/futil.h"
diff --git a/src/gromacs/gmxpreprocess/grompp.h b/src/gromacs/gmxpreprocess/grompp.h
new file mode 100644 (file)
index 0000000..9dc5254
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+#ifndef GMX_GMXPREPROCESS_GROMPP_H
+#define GMX_GMXPREPROCESS_GROMPP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+int gmx_grompp(int argc, char *argv[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index f81db3a1233d2b55d06ba18a1e9af4095ffefccb..ed7fe4f39b0896a5aacb72bd388064a9bf82c416 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.
 #include "gmx_fatal.h"
 #include "macros.h"
 
-/* There are 11 types of adding hydrogens, numbered from
- * 1 thru 11. Each of these has a specific number of
- * control atoms, that determine how the hydrogens are added.
- * Here these number are given. Because arrays start at 0 an
- * extra dummy for index 0 is added
+/* Number of control atoms for each 'add' type.
+ *
+ * There are 11 types of adding hydrogens, numbered from 1 thru
+ * 11. Each of these has a specific number of control atoms, that
+ * determine how the hydrogens are added.  Here these number are
+ * given. Because arrays start at 0, an extra dummy for index 0 is
+ * added.
  */
 const int ncontrol[] = { -1, 3, 3, 3, 3, 4, 3, 1, 3, 3, 1, 1 };
 #define maxcontrol asize(ncontrol)
index 7520f7f7434815c73601a4c810b36af210376953..604966552b26d006585b95a01aae4c26dd87ba29 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) 2011, by the GROMACS development team, led by
+ * Copyright (c) 2011,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _h_db_h
-#define _h_db_h
+#ifndef GMX_GMXPREPROCESS_H_DB_H
+#define GMX_GMXPREPROCESS_H_DB_H
 
 #include "sysstuff.h"
 #include "hackblock.h"
 
-/* number of control atoms for each 'add' type */
-extern const int ncontrol[];
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /* functions for the h-database */
 
-extern void read_ab(char *line, const char *fn, t_hack *ab);
+void read_ab(char *line, const char *fn, t_hack *ab);
 /* Read one add block */
 
-extern int read_h_db(const char *ffdir, t_hackblock **ah);
+int read_h_db(const char *ffdir, t_hackblock **ah);
 /* Read the database from hdb file(s) in ffdir or current dir */
 
-extern void print_ab(FILE *out, t_hack *ab, char *nname);
+void print_ab(FILE *out, t_hack *ab, char *nname);
 /* print one add block */
 
-extern void print_h_db(FILE *out, int nh, t_hackblock ah[]);
+void print_h_db(FILE *out, int nh, t_hackblock ah[]);
 /* Print the database to file */
 
-extern int compaddh(const void *a, const void *b);
+int compaddh(const void *a, const void *b);
 
-extern t_hackblock *search_h_db(int nh, t_hackblock ah[], char *key);
+t_hackblock *search_h_db(int nh, t_hackblock ah[], char *key);
 /* Search for an entry in the database */
 
+#ifdef __cplusplus
+}
+#endif
 
-
-#endif  /* _h_db_h */
+#endif
index bc763b6d73937dd7bcbafdad04566854573977fc..8d9fee3c1705e5932b2c97733b19f245651c29f1 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _hackblock_h
-#define _hackblock_h
+#ifndef GMX_GMXPREPROCESS_HACKBLOCK_H
+#define GMX_GMXPREPROCESS_HACKBLOCK_H
 
 #include "typedefs.h"
 #include "../fileio/pdbio.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "gpp_atomtype.h"
 
 #ifdef __cplusplus
@@ -197,4 +197,4 @@ void init_t_protonate(t_protonate *protonate);
 }
 #endif
 
-#endif  /* _hackblock_h */
+#endif
similarity index 99%
rename from src/programs/gmx/hizzie.c
rename to src/gromacs/gmxpreprocess/hizzie.c
index c15597b355f83f972adccfcec5bb05805145686b..5f7011b34191c99c6f721d0a757e8bc5afe945b3 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.
similarity index 86%
rename from src/programs/gmx/hizzie.h
rename to src/gromacs/gmxpreprocess/hizzie.h
index 22a02ba115a9e231fd427b069f60ad856ed18789..92c44f43b5d7fe954a59dc67a78b3cb8c4ae92b2 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _hizzie_h
-#define _hizzie_h
+#ifndef GMX_GMXPREPROCESS_HIZZIE_H
+#define GMX_GMXPREPROCESS_HIZZIE_H
 
-extern void set_histp(t_atoms *pdba, rvec *x, real angle, real distance);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void set_histp(t_atoms *pdba, rvec *x, real angle, real distance);
 /* calculate HIStidine protonation state */
 
-#endif  /* _pdb2gmx_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
similarity index 85%
rename from src/programs/gmx/nm2type.h
rename to src/gromacs/gmxpreprocess/nm2type.h
index 6b9bb33f7586d0192ea710b926b96ebc0073d0f8..ab30e26e7e91b91f11e3dc87fd93bbf20e33e23f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, 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.
 
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
     char    *elem, *type;
     double   q, m;
@@ -47,18 +51,22 @@ typedef struct {
     double  *blen;
 } t_nm2type;
 
-extern t_nm2type *rd_nm2type(const char *ffdir, int *nnm);
+t_nm2type *rd_nm2type(const char *ffdir, int *nnm);
 /* Read the name 2 type database. nnm is the number of entries
  * ff is the force field.
  */
 
-extern void dump_nm2type(FILE *fp, int nnm, t_nm2type nm2t[]);
+void dump_nm2type(FILE *fp, int nnm, t_nm2type nm2t[]);
 /* Dump the database for debugging. Can be reread by the program */
 
-extern int nm2type(int nnm, t_nm2type nm2t[], t_symtab *tab, t_atoms *atoms,
-                   gpp_atomtype_t atype, int *nbonds, t_params *bond);
+int nm2type(int nnm, t_nm2type nm2t[], t_symtab *tab, t_atoms *atoms,
+            gpp_atomtype_t atype, int *nbonds, t_params *bond);
 /* Try to determine the atomtype (force field dependent) for the atoms
  * with help of the bond list
  */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
similarity index 99%
rename from src/programs/gmx/pdb2gmx.c
rename to src/gromacs/gmxpreprocess/pdb2gmx.c
index 1dbcc72e2da55638c346ca21d5f72cffc13aff32..8389f6fd5244c97a9a2cbb44175286625637a264 100644 (file)
@@ -34,6 +34,8 @@
  * 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"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/gromacs/gmxpreprocess/pdb2gmx.h b/src/gromacs/gmxpreprocess/pdb2gmx.h
new file mode 100644 (file)
index 0000000..d85c5bb
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+#ifndef GMX_GMXPREPROCESS_PDB2GMX_H
+#define GMX_GMXPREPROCESS_PDB2GMX_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+int gmx_pdb2gmx(int argc, char *argv[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 6b57be25237b65072095fdae5c028868276a95f0..bcefb9750529d91a6eb475e7f4a63f5b266e6d41 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _pdb2top_h
-#define _pdb2top_h
+#ifndef GMX_GMXPREPROCESS_PDB2TOP_H
+#define GMX_GMXPREPROCESS_PDB2TOP_H
 
 #include "typedefs.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "gpp_atomtype.h"
 #include "toputil.h"
 #include "hackblock.h"
@@ -131,4 +131,4 @@ void print_sums(t_atoms *atoms, gmx_bool bSystem);
 }
 #endif
 
-#endif  /* _pdb2top_h */
+#endif
index 0e7340a116821c37eda71ddee68db1bdc72fde91..3631ade8cb808721ca9db1e2c767a96c54aaaac8 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.
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _pgutil_h
-#define _pgutil_h
+#ifndef GMX_GMXPREPROCESS_PGUTIL_H
+#define GMX_GMXPREPROCESS_PGUTIL_H
 
 #include "typedefs.h"
 
@@ -45,9 +45,9 @@ extern "C"
 {
 #endif
 
-extern atom_id search_atom(const char *type, int start,
-                           t_atoms *atoms,
-                           const char *bondtype, gmx_bool bAllowMissing);
+atom_id search_atom(const char *type, int start,
+                    t_atoms *atoms,
+                    const char *bondtype, gmx_bool bAllowMissing);
 /* Search an atom in array of pointers to strings, starting from start
  * if type starts with '-' then searches backwards from start.
  * bondtype is only used for printing the error/warning string,
@@ -55,10 +55,10 @@ extern atom_id search_atom(const char *type, int start,
  * When bAllowMissing=FALSE an fatal error is issued, otherwise a warning.
  */
 
-extern void set_at(t_atom *at, real m, real q, int type, int resind);
+void set_at(t_atom *at, real m, real q, int type, int resind);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif  /* _pgutil_h */
+#endif
similarity index 98%
rename from src/programs/gmx/g_protonate.c
rename to src/gromacs/gmxpreprocess/protonate.c
index 781b8535ea015a4c714e8afb14307cda3426b950..e2919aff57712bd00ab4c083f79e0c73def5f161 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.
@@ -34,6 +34,8 @@
  * 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 "protonate.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
similarity index 79%
rename from src/programs/gmx/legacycmainfunctions.h
rename to src/gromacs/gmxpreprocess/protonate.h
index 2366a1d81ed2326f146519dbd3e844cd14b2ef1a..2c5a617740dccaa7ec2712655d073023dc7cfa6e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 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.
  */
-/*! \internal \brief Declares C-style main functions as used in
- * remaining 4.x-style GROMACS tools
- *
- * \author Mark Abraham <mark.j.abraham@gmail.com>
- */
+#ifndef GMX_GMXPREPROCESS_PROTONATE_H
+#define GMX_GMXPREPROCESS_PROTONATE_H
 
-#ifndef GMX_LEGACYCMAINFUNCTIONS_H
-#define GMX_LEGACYCMAINFUNCTIONS_H
-
-extern "C"
-{
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
 
-int gmx_grompp(int argc, char *argv[]);
-int gmx_pdb2gmx(int argc, char *argv[]);
 int gmx_protonate(int argc, char *argv[]);
-int gmx_x2top(int argc, char *argv[]);
 
+#ifdef __cplusplus
 }
+#endif
 
 #endif
index 4d8b92896f49067c834df1b2f7772d2a2beacf0e..21a4f9c5da2c4cca8df65e2b615357e2a0393f50 100644 (file)
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _readir_h
-#define _readir_h
+#ifndef GMX_GMXPREPROCESS_READIR_H
+#define GMX_GMXPREPROCESS_READIR_H
 
 #include "typedefs.h"
 #include "string2.h"
 #include "readinp.h"
-#include "grompp.h"
+#include "grompp-impl.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 enum {
     eshNONE, eshHBONDS, eshALLBONDS, eshHANGLES, eshALLANGLES, eshNR
@@ -71,50 +75,50 @@ typedef struct {
 } t_gromppopts;
 
 /*! \brief Initialise object to hold strings parsed from an .mdp file */
-extern void init_inputrec_strings();
+void init_inputrec_strings();
 
 /*! \brief Clean up object that holds strings parsed from an .mdp file */
 void done_inputrec_strings();
 
-extern void init_ir(t_inputrec *ir, t_gromppopts *opts);
+void init_ir(t_inputrec *ir, t_gromppopts *opts);
 /* Initiate stuff */
 
-extern void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
-                     warninp_t wi);
+void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
+              warninp_t wi);
 /* Validate inputrec data.
  * Fatal errors will be added to nerror.
  */
-extern int search_string(const char *s, int ng, char *gn[]);
+int search_string(const char *s, int ng, char *gn[]);
 /* Returns the index of string s in the index groups */
 
-extern void double_check(t_inputrec *ir, matrix box, gmx_bool bConstr,
-                         warninp_t wi);
+void double_check(t_inputrec *ir, matrix box, gmx_bool bConstr,
+                  warninp_t wi);
 /* Do more checks */
 
-extern void triple_check(const char *mdparin, t_inputrec *ir, gmx_mtop_t *sys,
-                         warninp_t wi);
+void triple_check(const char *mdparin, t_inputrec *ir, gmx_mtop_t *sys,
+                  warninp_t wi);
 /* Do even more checks */
 
-extern void check_chargegroup_radii(const gmx_mtop_t *mtop, const t_inputrec *ir,
-                                    rvec *x,
-                                    warninp_t wi);
+void check_chargegroup_radii(const gmx_mtop_t *mtop, const t_inputrec *ir,
+                             rvec *x,
+                             warninp_t wi);
 /* Even more checks, charge group radii vs. cut-off's only. */
 
-extern void get_ir(const char *mdparin, const char *mdparout,
-                   t_inputrec *ir, t_gromppopts *opts,
-                   warninp_t wi);
+void get_ir(const char *mdparin, const char *mdparout,
+            t_inputrec *ir, t_gromppopts *opts,
+            warninp_t wi);
 /* Read the input file, and retrieve data for inputrec.
  * More data are read, but the are only evaluated when the next
  * function is called. Also prints the input file back to mdparout.
  */
 
-extern void do_index(const char* mdparin,
-                     const char *ndx,
-                     gmx_mtop_t *mtop,
-                     gmx_bool    bVerbose,
-                     t_inputrec *ir,
-                     rvec       *v,
-                     warninp_t   wi);
+void do_index(const char* mdparin,
+              const char *ndx,
+              gmx_mtop_t *mtop,
+              gmx_bool    bVerbose,
+              t_inputrec *ir,
+              rvec       *v,
+              warninp_t   wi);
 /* Read the index file and assign grp numbers to atoms.
  * If v is not NULL, the velocities will be scaled to the correct number
  * of degrees of freedom.
@@ -122,42 +126,46 @@ extern void do_index(const char* mdparin,
 
 /* Routines In readpull.c */
 
-extern char **read_pullparams(int *ninp_p, t_inpfile **inp,
-                              t_pull *pull, gmx_bool *bStart,
-                              warninp_t wi);
+char **read_pullparams(int *ninp_p, t_inpfile **inp,
+                       t_pull *pull, gmx_bool *bStart,
+                       warninp_t wi);
 /* Reads the pull parameters, returns a list of the pull group names */
 
-extern void make_pull_groups(t_pull *pull,
-                             char **pgnames,
-                             const t_blocka *grps, char **gnames);
+void make_pull_groups(t_pull *pull,
+                      char **pgnames,
+                      const t_blocka *grps, char **gnames);
 /* Process the pull group parameters after reading the index groups */
 
-extern void make_pull_coords(t_pull *pull);
+void make_pull_coords(t_pull *pull);
 /* Process the pull coordinates after reading the pull groups */
 
-extern void set_pull_init(t_inputrec *ir, gmx_mtop_t *mtop, rvec *x, matrix box, real lambda,
-                          const output_env_t oenv, gmx_bool bStart);
+void set_pull_init(t_inputrec *ir, gmx_mtop_t *mtop, rvec *x, matrix box, real lambda,
+                   const output_env_t oenv, gmx_bool bStart);
 /* Prints the initial pull group distances in x.
  * If bStart adds the distance to the initial reference location.
  */
 
-extern int str_nelem(const char *str, int maxptr, char *ptr[]);
+int str_nelem(const char *str, int maxptr, char *ptr[]);
 /* helper function from readir.c to convert strings */
 
-extern void read_adressparams(int *ninp_p, t_inpfile **inp_p, t_adress *adress, warninp_t wi);
+void read_adressparams(int *ninp_p, t_inpfile **inp_p, t_adress *adress, warninp_t wi);
 /* Reads in AdResS related parameters */
 
-extern void do_adress_index(t_adress *adress, gmx_groups_t *groups, char **gnames, t_grpopts *opts, warninp_t wi);
+void do_adress_index(t_adress *adress, gmx_groups_t *groups, char **gnames, t_grpopts *opts, warninp_t wi);
 /* Generate adress groups */
 
-extern char **read_rotparams(int *ninp_p, t_inpfile **inp, t_rot *rot, warninp_t wi);
+char **read_rotparams(int *ninp_p, t_inpfile **inp, t_rot *rot, warninp_t wi);
 /* Reads enforced rotation parameters, returns a list of the rot group names */
 
-extern void make_rotation_groups(t_rot *rot, char **rotgnames,
-                                 t_blocka *grps, char **gnames);
+void make_rotation_groups(t_rot *rot, char **rotgnames,
+                          t_blocka *grps, char **gnames);
 /* Process the rotation parameters after reading the index groups */
 
-extern void set_reference_positions(t_rot *rot, rvec *x, matrix box,
-                                    const char *fn, gmx_bool bSet, warninp_t wi);
+void set_reference_positions(t_rot *rot, rvec *x, matrix box,
+                             const char *fn, gmx_bool bSet, warninp_t wi);
+
+#ifdef __cplusplus
+}
+#endif
 
-#endif  /* _readir_h */
+#endif
index 6e85d8da97a527e8a7e60157aa39ef095190e7c2..3f101f5d5d0953d1f3c15e2cceafe1176442b371 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) 2010, by the GROMACS development team, led by
+ * Copyright (c) 2010,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _resall_h
-#define _resall_h
+#ifndef GMX_GMXPREPROCESS_RESALL_H
+#define GMX_GMXPREPROCESS_RESALL_H
 
 #include "typedefs.h"
 #include "hackblock.h"
 #include "gpp_atomtype.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -73,4 +73,4 @@ void print_resall(FILE *out, int nrtp, t_restp rtp[],
 }
 #endif
 
-#endif  /* _resall_h */
+#endif
similarity index 83%
rename from src/programs/gmx/specbond.h
rename to src/gromacs/gmxpreprocess/specbond.h
index 2901bb3851dae75f2a1dc8a665607e2eb717af17..cd37ca9af32ddef5aab2746c1c08688bebb1c926 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _specbond_h
-#define _specbond_h
+#ifndef GMX_GMXPREPROCESS_SPECBOND_H
+#define GMX_GMXPREPROCESS_SPECBOND_H
 
 #include "pdb2top.h"
 
-extern int mk_specbonds(t_atoms *pdba, rvec x[], gmx_bool bInteractive,
-                        t_ssbond **specbonds, gmx_bool bVerbose);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int mk_specbonds(t_atoms *pdba, rvec x[], gmx_bool bInteractive,
+                 t_ssbond **specbonds, gmx_bool bVerbose);
 
-extern gmx_bool yesno(void);
+gmx_bool yesno(void);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif
index 63c8279fdc2f6b461e73ddaa49dd3bd787eb5b4d..3f859699af918bef8020991e2462dc603e4b017b 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) 2011, by the GROMACS development team, led by
+ * Copyright (c) 2011,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _ter_db_h
-#define _ter_db_h
+#ifndef GMX_GMXPREPROCESS_TER_DB_H
+#define GMX_GMXPREPROCESS_TER_DB_H
 
 #include "sysstuff.h"
 #include "hackblock.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 
-extern int read_ter_db(const char *ffdir, char ter,
-                       t_hackblock **tbptr, gpp_atomtype_t atype);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int read_ter_db(const char *ffdir, char ter,
+                t_hackblock **tbptr, gpp_atomtype_t atype);
 /* Read database for N&C terminal hacking */
 
-extern t_hackblock **filter_ter(int nrtp, t_restp rtp[],
-                                int nb, t_hackblock tb[],
-                                const char *resname,
-                                const char *rtpname,
-                                int *nret);
+t_hackblock **filter_ter(int nrtp, t_restp rtp[],
+                         int nb, t_hackblock tb[],
+                         const char *resname,
+                         const char *rtpname,
+                         int *nret);
 /* Return a list of pointers to blocks that match residue name */
 
-extern t_hackblock *choose_ter(int nb, t_hackblock **tb, const char *title);
+t_hackblock *choose_ter(int nb, t_hackblock **tb, const char *title);
 /* Interactively select one.. */
 
-#endif  /* _ter_db_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
similarity index 99%
rename from src/programs/gmx/tomorse.c
rename to src/gromacs/gmxpreprocess/tomorse.c
index 28f0f00a4ba38c72dd99b6dea760a623af2b7283..e3b1ed7fdea6962d375a6984895f56a2c4cb78fa 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.
@@ -44,7 +44,7 @@
 #include <ctype.h>
 #include "typedefs.h"
 #include "string2.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "gromacs/fileio/futil.h"
 #include "smalloc.h"
 #include "toputil.h"
similarity index 86%
rename from src/programs/gmx/tomorse.h
rename to src/gromacs/gmxpreprocess/tomorse.h
index b5d24ce1de0e7c46da6006ffb690995759d6e79b..b96e8a02f5e1250d2c48f595860221f7257f8eb5 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) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _tomorse_h
-#define _tomorse_h
+#ifndef GMX_GMXPREPROCESS_TOMORSE_H
+#define GMX_GMXPREPROCESS_TOMORSE_H
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #include <stdio.h>
 #include "typedefs.h"
 
-extern void convert_harmonics(int nrmols, t_molinfo mols[], gpp_atomtype_t atype);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void convert_harmonics(int nrmols, t_molinfo mols[], gpp_atomtype_t atype);
 
-#endif  /* _grompp_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 335d3500ef1dba396b2f7890a4fa4f55b71389e6..0cb9bbe5e5b8eda9e14e48fe766ae1276baf989c 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.
@@ -48,7 +48,7 @@
 #include "gmx_fatal.h"
 #include "topdirs.h"
 
-/* Must correspond to the directive enum in grompp.h */
+/* Must correspond to the directive enum in grompp-impl.h */
 static const char *directive_names[d_maxdir+1] = {
     "defaults",
     "atomtypes",
index cff5b836f311c5fe5f9c149a72be7e9e5f011134..f619c8a4ea40f25057425ae0c654d29170951f5f 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _topdirs_h
-#define _topdirs_h
+#ifndef GMX_GMXPREPROCESS_TOPDIRS_H
+#define GMX_GMXPREPROCESS_TOPDIRS_H
 
-#include "grompp.h"
+#include "grompp-impl.h"
 
 #ifdef __cplusplus
-extern "C"
-{
+extern "C" {
 #endif
 
 typedef struct tagDirStack {
@@ -50,24 +49,24 @@ typedef struct tagDirStack {
     struct tagDirStack *prev;
 } DirStack;
 
-extern int ifunc_index(directive d, int type);
+int ifunc_index(directive d, int type);
 
-extern const char *dir2str (directive d);
+const char *dir2str (directive d);
 
-extern directive str2dir (char *dstr);
+directive str2dir (char *dstr);
 
-extern void DS_Init (DirStack **DS);
+void DS_Init (DirStack **DS);
 
-extern void DS_Done (DirStack **DS);
+void DS_Done (DirStack **DS);
 
-extern void DS_Push (DirStack **DS, directive d);
+void DS_Push (DirStack **DS, directive d);
 
-extern int  DS_Search (DirStack *DS, directive d);
+int  DS_Search (DirStack *DS, directive d);
 
-extern int  DS_Check_Order (DirStack *DS, directive d);
+int  DS_Check_Order (DirStack *DS, directive d);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif  /* _topdirs_h */
+#endif
index c48abdf2d70819f928add5de826efff3049d75df..827c26bdb66c0c357f39a92aa45795f0103a2d6c 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) 2011, by the GROMACS development team, led by
+ * Copyright (c) 2011,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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _topexcl_h
-#define _topexcl_h
+#ifndef GMX_GMXPREPROCESS_TOPEXCL_H
+#define GMX_GMXPREPROCESS_TOPEXCL_H
 
 #include "topio.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
     int nr;     /* nr atoms (0 <= i < nr) (atoms->nr)          */
     int nrex;   /* with nrex lists of neighbours               */
@@ -50,34 +54,38 @@ typedef struct {
     int ***a;      /* like this: a[i][nre][nrx]                        */
 } t_nextnb;
 
-extern void init_nnb(t_nextnb *nnb, int nr, int nrex);
+void init_nnb(t_nextnb *nnb, int nr, int nrex);
 /* Initiate the arrays for nnb (see above) */
 
-extern void done_nnb(t_nextnb *nnb);
+void done_nnb(t_nextnb *nnb);
 /* Cleanup the nnb struct */
 
 #ifdef DEBUG_NNB
 #define print_nnb(nnb, s) __print_nnb(nnb, s)
-extern void print_nnb(t_nextnb *nnb, char *s);
+void print_nnb(t_nextnb *nnb, char *s);
 /* Print the nnb struct */
 #else
 #define print_nnb(nnb, s)
 #endif
 
-extern void gen_nnb(t_nextnb *nnb, t_params plist[]);
+void gen_nnb(t_nextnb *nnb, t_params plist[]);
 /* Generate a t_nextnb structure from bond information.
  * With the structure you can either generate exclusions
  * or generate angles and dihedrals. The structure must be
  * initiated using init_nnb.
  */
 
-extern void nnb2excl (t_nextnb *nnb, t_blocka *excl);
+void nnb2excl (t_nextnb *nnb, t_blocka *excl);
 /* generate exclusions from nnb */
 
-extern void generate_excl (int nrexcl, int nratoms,
-                           t_params plist[], t_blocka *excl);
+void generate_excl (int nrexcl, int nratoms,
+                    t_params plist[], t_blocka *excl);
 /* Generate an exclusion block from bonds and constraints in
  * plist.
  */
 
-#endif  /* _topexcl_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 8fa85c5123c5ad582ac5d90456deb9c46d60f829..72a56768217c1c5dc04bf84b67cd8a73253a7360 100644 (file)
@@ -62,7 +62,7 @@
 #include "warninp.h"
 #include "vsite_parm.h"
 
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "toputil.h"
 #include "toppush.h"
 #include "topdirs.h"
@@ -915,7 +915,7 @@ static char **read_topol(const char *infile, const char *outfile,
                                       bGenPairs, *fudgeQQ, bZero, &bWarn_copy_A_B, wi);
                             break;
                         case d_cmap:
-                            push_cmap(d, plist, mi0->plist, &(mi0->atoms), atype, pline,wi);
+                            push_cmap(d, plist, mi0->plist, &(mi0->atoms), atype, pline, wi);
                             break;
 
                         case d_vsitesn:
index 11423a801aacd205bfed89083031c67a87a2a251..03b8966bcfad8390a475c700c911fc24516d0191 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) 2012, by the GROMACS development team, led by
+ * 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _topio_h
-#define _topio_h
+#ifndef GMX_GMXPREPROCESS_TOPIO_H
+#define GMX_GMXPREPROCESS_TOPIO_H
 
 #include "typedefs.h"
 #include "readir.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "gpp_atomtype.h"
 
-extern double check_mol(gmx_mtop_t *mtop, warninp_t wi);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+double check_mol(gmx_mtop_t *mtop, warninp_t wi);
 /* Check mass and charge */
 
-extern char **do_top(gmx_bool         bVerbose,
-                     const char      *topfile,
-                     const char      *topppfile,
-                     t_gromppopts    *opts,
-                     gmx_bool         bZero,
-                     t_symtab        *symtab,
-                     t_params         plist[],
-                     int             *combination_rule,
-                     double          *repulsion_power,
-                     real            *fudgeQQ,
-                     gpp_atomtype_t   atype,
-                     int             *nrmols,
-                     t_molinfo      **molinfo,
-                     t_inputrec      *ir,
-                     int             *nmolblock,
-                     gmx_molblock_t **molblock,
-                     gmx_bool         bGB,
-                     warninp_t        wi);
+char **do_top(gmx_bool         bVerbose,
+              const char      *topfile,
+              const char      *topppfile,
+              t_gromppopts    *opts,
+              gmx_bool         bZero,
+              t_symtab        *symtab,
+              t_params         plist[],
+              int             *combination_rule,
+              double          *repulsion_power,
+              real            *fudgeQQ,
+              gpp_atomtype_t   atype,
+              int             *nrmols,
+              t_molinfo      **molinfo,
+              t_inputrec      *ir,
+              int             *nmolblock,
+              gmx_molblock_t **molblock,
+              gmx_bool         bGB,
+              warninp_t        wi);
 
 
 /* This routine expects sys->molt[m].ilist to be of size F_NRE and ordered. */
 void generate_qmexcl(gmx_mtop_t *sys, t_inputrec *ir, warninp_t    wi);
 
-#endif  /* _topio_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 2f0294513e95b106b06abf0650281f16255ce966..d28a4c5f2575c9919dd3ab37002a1ce0d60e94e2 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.
@@ -35,8 +35,8 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _toppush_h
-#define _toppush_h
+#ifndef GMX_GMXPREPROCESS_TOPPUSH_H
+#define GMX_GMXPREPROCESS_TOPPUSH_H
 
 #include "typedefs.h"
 #include "toputil.h"
 #include "gpp_bond_atomtype.h"
 #include "warninp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
     int       nr;   /* The number of entries in the list            */
     int       nra2; /* The total number of entries in a                        */
@@ -52,90 +56,94 @@ typedef struct {
     /* i is nra[i]                                             */
 } t_block2;
 
-extern void generate_nbparams(int comb, int funct, t_params plist[],
-                              gpp_atomtype_t atype,
-                              warninp_t wi);
+void generate_nbparams(int comb, int funct, t_params plist[],
+                       gpp_atomtype_t atype,
+                       warninp_t wi);
 
-extern void push_at (t_symtab *symtab, gpp_atomtype_t at,
-                     t_bond_atomtype bat, char *line, int nb_funct,
-                     t_nbparam ***nbparam, t_nbparam ***pair,
-                     warninp_t wi);
+void push_at (t_symtab *symtab, gpp_atomtype_t at,
+              t_bond_atomtype bat, char *line, int nb_funct,
+              t_nbparam ***nbparam, t_nbparam ***pair,
+              warninp_t wi);
 
-extern void push_bt(directive d, t_params bt[], int nral,
-                    gpp_atomtype_t at, t_bond_atomtype bat, char *line,
-                    warninp_t wi);
+void push_bt(directive d, t_params bt[], int nral,
+             gpp_atomtype_t at, t_bond_atomtype bat, char *line,
+             warninp_t wi);
 
-extern void push_dihedraltype(directive d, t_params bt[],
-                              t_bond_atomtype bat, char *line,
-                              warninp_t wi);
+void push_dihedraltype(directive d, t_params bt[],
+                       t_bond_atomtype bat, char *line,
+                       warninp_t wi);
 
-extern void push_cmaptype(directive d, t_params bt[], int nral, gpp_atomtype_t at,
-                          t_bond_atomtype bat, char *line,
-                          warninp_t wi);
+void push_cmaptype(directive d, t_params bt[], int nral, gpp_atomtype_t at,
+                   t_bond_atomtype bat, char *line,
+                   warninp_t wi);
 
-extern void push_nbt(directive d, t_nbparam **nbt, gpp_atomtype_t atype,
-                     char *plines, int nb_funct,
-                     warninp_t wi);
+void push_nbt(directive d, t_nbparam **nbt, gpp_atomtype_t atype,
+              char *plines, int nb_funct,
+              warninp_t wi);
 
 void
 push_gb_params(gpp_atomtype_t atype,
                char          *line,
                warninp_t      wi);
 
-extern void push_atom(t_symtab      *symtab,
-                      t_block       *cgs,
-                      t_atoms       *at,
-                      gpp_atomtype_t atype,
-                      char          *line,
-                      int           *lastcg,
-                      warninp_t      wi);
+void push_atom(t_symtab      *symtab,
+               t_block       *cgs,
+               t_atoms       *at,
+               gpp_atomtype_t atype,
+               char          *line,
+               int           *lastcg,
+               warninp_t      wi);
 
-extern void push_bond(directive d, t_params bondtype[], t_params bond[],
-                      t_atoms *at, gpp_atomtype_t atype, char *line,
-                      gmx_bool bBonded, gmx_bool bGenPairs, real fudgeQQ,
-                      gmx_bool bZero, gmx_bool *bWarn_copy_A_B,
-                      warninp_t wi);
+void push_bond(directive d, t_params bondtype[], t_params bond[],
+               t_atoms *at, gpp_atomtype_t atype, char *line,
+               gmx_bool bBonded, gmx_bool bGenPairs, real fudgeQQ,
+               gmx_bool bZero, gmx_bool *bWarn_copy_A_B,
+               warninp_t wi);
 
-extern void push_cmap(directive d, t_params bondtype[], t_params bond[],
-                      t_atoms *at, gpp_atomtype_t atype, char *line,
-                      warninp_t wi);
+void push_cmap(directive d, t_params bondtype[], t_params bond[],
+               t_atoms *at, gpp_atomtype_t atype, char *line,
+               warninp_t wi);
 
-extern void push_vsitesn(directive d, t_params bond[],
-                         t_atoms *at, char *line,
-                         warninp_t wi);
+void push_vsitesn(directive d, t_params bond[],
+                  t_atoms *at, char *line,
+                  warninp_t wi);
 
-extern void push_mol(int nrmols, t_molinfo mols[], char *pline,
-                     int *whichmol, int *nrcopies,
-                     warninp_t wi);
+void push_mol(int nrmols, t_molinfo mols[], char *pline,
+              int *whichmol, int *nrcopies,
+              warninp_t wi);
 
-extern void push_molt(t_symtab *symtab, int *nmol, t_molinfo **mol, char *line,
-                      warninp_t wi);
+void push_molt(t_symtab *symtab, int *nmol, t_molinfo **mol, char *line,
+               warninp_t wi);
 
-extern void init_block2(t_block2 *b2, int natom);
+void init_block2(t_block2 *b2, int natom);
 
-extern void done_block2(t_block2 *b2);
+void done_block2(t_block2 *b2);
 
-extern void push_excl(char *line, t_block2 *b2);
+void push_excl(char *line, t_block2 *b2);
 
-extern void merge_excl(t_blocka *excl, t_block2 *b2);
+void merge_excl(t_blocka *excl, t_block2 *b2);
 
-extern void b_to_b2(t_blocka *b, t_block2 *b2);
+void b_to_b2(t_blocka *b, t_block2 *b2);
 
-extern void b2_to_b(t_block2 *b2, t_blocka *b);
+void b2_to_b(t_block2 *b2, t_blocka *b);
 
-extern int add_atomtype_decoupled(t_symtab *symtab, gpp_atomtype_t at,
-                                  t_nbparam ***nbparam, t_nbparam ***pair);
+int add_atomtype_decoupled(t_symtab *symtab, gpp_atomtype_t at,
+                           t_nbparam ***nbparam, t_nbparam ***pair);
 /* Add an atom type with all parameters set to zero (no interactions).
  * Returns the atom type number.
  */
 
-extern void convert_moltype_couple(t_molinfo *mol, int atomtype_decouple,
-                                   real fudgeQQ,
-                                   int couple_lam0, int couple_lam1,
-                                   gmx_bool bCoupleIntra,
-                                   int nb_funct, t_params *nbp);
+void convert_moltype_couple(t_molinfo *mol, int atomtype_decouple,
+                            real fudgeQQ,
+                            int couple_lam0, int couple_lam1,
+                            gmx_bool bCoupleIntra,
+                            int nb_funct, t_params *nbp);
 /* Setup mol such that the B-state has no interaction with the rest
  * of the system, but full interaction with itself.
  */
 
-#endif  /* _toppush_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 3d78c1acae4481303db5f8e5220bc861d2d6e15d..2844b9f4dde13108dd19725ee4d94cda84c69f55 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _topshake_h
-#define _topshake_h
+#ifndef GMX_GMXPREPROCESS_TOPSHAKE_H
+#define GMX_GMXPREPROCESS_TOPSHAKE_H
 
 #include "topio.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void make_shake (t_params plist[], t_atoms *atoms, int nshake);
 
-#endif  /* _topshake_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 2fe21a6eebd4b8f5cd4e66f8387e96504bbcd101..a428a523932fd7aa2473bc9e1d3bf09be7c07842 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) 2012, by the GROMACS development team, led by
+ * 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.
@@ -63,7 +63,7 @@ void set_p_string(t_param *p, const char *s)
         }
         else
         {
-            gmx_fatal(FARGS, "Increase MAXSLEN in include/grompp.h to at least %d,"
+            gmx_fatal(FARGS, "Increase MAXSLEN in include/grompp-impl.h to at least %d,"
                       " or shorten your definition of bonds like %s to at most %d",
                       strlen(s)+1, s, MAXSLEN-1);
         }
index 91d7baf6930d04e99807c44d4b58d09fa93b1bf7..97c3d6350b028d467e4f657f3aeb9c18b193296f 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) 2012, by the GROMACS development team, led by
+ * 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _toputil_h
-#define _toputil_h
+#ifndef GMX_GMXPREPROCESS_TOPUTIL_H
+#define GMX_GMXPREPROCESS_TOPUTIL_H
 
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "gpp_atomtype.h"
 
 #ifdef __cplusplus
@@ -87,4 +87,4 @@ void print_excl(FILE *out, int natoms, t_excls excls[]);
 }
 #endif
 
-#endif  /* _toputil_h */
+#endif
index ebf93fae764dd6c7224618151848fbd9a49ae67b..cbb3bea9600e6032fc74c28a1bc7eccdd44ccf56 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _vsite_parm_h
-#define _vsite_parm_h
+#ifndef GMX_GMXPREPROCESS_VSITE_PARM_H
+#define GMX_GMXPREPROCESS_VSITE_PARM_H
 
 #include "typedefs.h"
-#include "grompp.h"
+#include "grompp-impl.h"
 #include "gpp_atomtype.h"
 
-extern int set_vsites(gmx_bool bVerbose, t_atoms *atoms,  gpp_atomtype_t atype,
-                      t_params plist[]);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int set_vsites(gmx_bool bVerbose, t_atoms *atoms,  gpp_atomtype_t atype,
+               t_params plist[]);
 /* set parameters for virtual sites, return number of virtual sites */
 
-extern void set_vsites_ptype(gmx_bool bVerbose,  gmx_moltype_t *molt);
+void set_vsites_ptype(gmx_bool bVerbose,  gmx_moltype_t *molt);
 /* set ptype to VSite for virtual sites */
 
-extern void clean_vsite_bondeds(t_params *ps, int natoms, gmx_bool bRmVSiteBds);
+void clean_vsite_bondeds(t_params *ps, int natoms, gmx_bool bRmVSiteBds);
 /* remove all bonded interaction (bonds, angles and diherals) that
    have become obsolete due to virtual site constructions */
 
-#endif  /* _vsite_parm_h */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
similarity index 99%
rename from src/programs/gmx/g_x2top.c
rename to src/gromacs/gmxpreprocess/x2top.c
index 8e1bd60e3623fcb7b5e404d863df52f8c57f4dac..d4f30ebe21da0293568df6c9e6d57a15f7e7b807 100644 (file)
@@ -34,6 +34,8 @@
  * 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 "x2top.h"
+
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
diff --git a/src/gromacs/gmxpreprocess/x2top.h b/src/gromacs/gmxpreprocess/x2top.h
new file mode 100644 (file)
index 0000000..78de61a
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+#ifndef GMX_GMXPREPROCESS_X2TOP_H
+#define GMX_GMXPREPROCESS_X2TOP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+int gmx_x2top(int argc, char *argv[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
similarity index 80%
rename from src/programs/gmx/xlate.h
rename to src/gromacs/gmxpreprocess/xlate.h
index a917082606a717f42211124b99f207a26e231ef0..425c076bcb58b44bc4a27ce5b9adfbd34944f3d4 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 
-#ifndef _xlate_h
-#define _xlate_h
+#ifndef GMX_GMXPREPROCESS_XLATE_H
+#define GMX_GMXPREPROCESS_XLATE_H
 
 #include "index.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* If bResname is true renames atoms based on residue names,
  * otherwise renames atoms based on rtp entry names.
  */
-extern void rename_atoms(const char *xlfile, const char *ffdir,
-                         t_atoms *atoms, t_symtab *symtab, const t_restp *restp,
-                         gmx_bool bResname, gmx_residuetype_t rt, gmx_bool bReorderNum,
-                         gmx_bool bVerbose);
+void rename_atoms(const char *xlfile, const char *ffdir,
+                  t_atoms *atoms, t_symtab *symtab, const t_restp *restp,
+                  gmx_bool bResname, gmx_residuetype_t rt, gmx_bool bReorderNum,
+                  gmx_bool bVerbose);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif
index 78f544470ef16612da0010f62c3e0baa7cc24c7b..a3df23569f640824b3fdf9585d4512bbf7e22466 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, 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.
@@ -41,7 +41,6 @@
 
 #include "typedefs.h"
 #include "types/commrec.h"
-#include "grompp.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -79,13 +78,6 @@ real gb_bonds_tab(rvec x[], rvec f[], rvec fshift[], real *charge, real *p_gbtab
 void gb_pd_send(t_commrec *cr, real *send_data, int nr);
 
 
-/* Functions for setting up the F_GB12,13,14 lists in grompp */
-int
-init_gb_plist(t_params *p_list);
-
-int
-convert_gb_params(gmx_ffparams_t *ffparams, t_functype ftype, t_params *gb_plist, t_ilist *il);
-
 
 
 /* Functions for calculating adjustments due to ie chain rule terms */
index ec8e6ec2386a6fa5b7d48a34a9bfd8e4ea4f4961..582d432780c30ddbb70a1f254bc8a945ecc72533 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, 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.
@@ -46,7 +46,6 @@
 #include "smalloc.h"
 #include "genborn.h"
 #include "vec.h"
-#include "grompp.h"
 #include "gromacs/fileio/pdbio.h"
 #include "names.h"
 #include "physics.h"
@@ -157,16 +156,6 @@ void gb_pd_send(t_commrec gmx_unused *cr, real gmx_unused *send_data, int gmx_un
 }
 
 
-int init_gb_plist(t_params *p_list)
-{
-    p_list->nr    = 0;
-    p_list->param = NULL;
-
-    return 0;
-}
-
-
-
 int init_gb_still(const t_commrec *cr,
                   const t_atomtypes *atype, t_idef *idef, t_atoms *atoms,
                   gmx_genborn_t *born, int natoms)
index 67d49ee24d97fdf57236b9bdafce24bbc5908f72..cdb7ecaf15b35d13c81b5a090220dbfe977b7c0d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, 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.
@@ -45,7 +45,6 @@
 #include "smalloc.h"
 #include "genborn.h"
 #include "vec.h"
-#include "grompp.h"
 #include "gromacs/fileio/pdbio.h"
 #include "names.h"
 #include "physics.h"
index b7633f84076361d3556beb485aea83d81358c2fb..d4b5271454251a071faeef306a62b51e5b65b153 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, 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.
@@ -42,8 +42,6 @@
 #endif
 
 #include "typedefs.h"
-#include "grompp.h"
-
 
 int
 calc_gb_rad_still_sse2_double(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
@@ -58,6 +56,4 @@ int
 calc_gb_rad_hct_obc_sse2_double(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
                                 double *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm);
 
-
-
 #endif /* _genborn_sse2_double_h */
index 30b9a0874fb9bb8cab1b7819bc19412a73ac494e..1f62188b7ee1130a41ddda224dc08a42ce811e4f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, 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.
@@ -45,7 +45,6 @@
 #include "smalloc.h"
 #include "genborn.h"
 #include "vec.h"
-#include "grompp.h"
 #include "gromacs/fileio/pdbio.h"
 #include "names.h"
 #include "physics.h"
index c3c9b3a55265e4470af9bca1224d4c33c9f14903..95b4ce63f68d827991a5cf6ae53a71a352801c67 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, 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.
@@ -42,8 +42,6 @@
 #endif
 
 #include "typedefs.h"
-#include "grompp.h"
-
 
 float
 calc_gb_chainrule_sse2_single(int natoms, t_nblist *nl, float *dadx, float *dvda,
@@ -58,5 +56,4 @@ int
 calc_gb_rad_hct_obc_sse2_single(t_commrec *cr, t_forcerec * fr, int natoms, gmx_localtop_t *top,
                                 float *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm);
 
-
 #endif /* _genborn_sse_h */
index 4a68bf512dbecaa30e34c7641353ffc410188a1c..f3165e6de3e736cdbc2453e6d238025b485af54a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
+# Copyright (c) 2010,2011,2012,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.
@@ -52,19 +52,15 @@ elseif(GMX_BUILD_MDRUN_ONLY)
         COMPILE_FLAGS "${OpenMP_C_FLAGS}")
     install(TARGETS mdrun DESTINATION ${BIN_INSTALL_DIR} COMPONENT mdrun)
 else()
-    file(GLOB GMX_GENERAL_SOURCES gmx/*.c gmx/*.cpp)
     file(GLOB GMX_MAIN_SOURCES gmx/gmx.cpp gmx/legacymodules.cpp)
-    list(REMOVE_ITEM GMX_GENERAL_SOURCES ${GMX_MAIN_SOURCES})
     if(GMX_X11)
         file(GLOB VIEW_SOURCES view/*.cpp)
     else()
         file(GLOB VIEW_SOURCES view/view.cpp)
     endif()
-    add_library(gmx_objlib OBJECT ${GMX_GENERAL_SOURCES})
     add_library(view_objlib OBJECT ${VIEW_SOURCES})
     add_executable(gmx
         ${GMX_MAIN_SOURCES}
-        $<TARGET_OBJECTS:gmx_objlib>
         $<TARGET_OBJECTS:mdrun_objlib>
         $<TARGET_OBJECTS:view_objlib>)
     target_link_libraries(gmx
index e7636519430eb899929ae50bf91642fb573a3f71..ff138b3da4f5c6c5afa43cdffaba522919a235fa 100644 (file)
 #include "gromacs/tools/check.h"
 #include "gromacs/tools/dump.h"
 #include "gromacs/tools/convert_tpr.h"
-
-#include "legacycmainfunctions.h"
+#include "gromacs/gmxpreprocess/grompp.h"
+#include "gromacs/gmxpreprocess/pdb2gmx.h"
+#include "gromacs/gmxpreprocess/protonate.h"
+#include "gromacs/gmxpreprocess/x2top.h"
 
 namespace
 {
index fe813a15d0fbfc9260fe83b0c31db10553db49e4..2d5bc133704f28d5680224aee6b8606e8b280f61 100644 (file)
@@ -46,9 +46,8 @@ gmx_build_unit_test(
     compressed_x_output.cpp
     # files with code for test fixtures
     moduletest.cpp
-    # pseudo libraries for code for grompp and mdrun
+    # pseudo-library for code for mdrun
     $<TARGET_OBJECTS:mdrun_objlib>
-    $<TARGET_OBJECTS:gmx_objlib>
     )
 gmx_register_integration_test(
     ${testname}
index 91320d5f20871b05a89291e2d265a1b9efdee0b9..a49e3e17af54da213a4c3d38f14be9af542b4538 100644 (file)
@@ -53,8 +53,8 @@
 #include "gromacs/utility/file.h"
 #include "gromacs/legacyheaders/network.h"
 #include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/gmxpreprocess/grompp.h"
 #include "programs/mdrun/mdrun_main.h"
-#include "programs/gmx/legacycmainfunctions.h"
 
 namespace gmx
 {