Move some math headers away from legacyheaders/
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 27 Mar 2014 04:12:48 +0000 (06:12 +0200)
committerErik Lindahl <erik@kth.se>
Mon, 31 Mar 2014 07:33:18 +0000 (09:33 +0200)
- Move nrjac.* to linearalgebra/
- Move do_fit.* to math/

Also some minor associated clean-up.

Change-Id: I11943d5c9a0150133ca0a0d9bc36aceb06fb8bca

27 files changed:
src/gromacs/essentialdynamics/edsam.c
src/gromacs/gmxana/fitahx.c
src/gromacs/gmxana/gmx_anaeig.c
src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_confrms.c
src/gromacs/gmxana/gmx_covar.c
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_disre.c
src/gromacs/gmxana/gmx_filter.c
src/gromacs/gmxana/gmx_helixorient.c
src/gromacs/gmxana/gmx_make_edi.c
src/gromacs/gmxana/gmx_morph.c
src/gromacs/gmxana/gmx_polystat.c
src/gromacs/gmxana/gmx_rms.c
src/gromacs/gmxana/gmx_rmsf.c
src/gromacs/gmxana/gmx_rotmat.c
src/gromacs/gmxana/gmx_traj.c
src/gromacs/gmxana/gmx_trjcat.c
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxlib/orires.c
src/gromacs/gmxlib/princ.c
src/gromacs/linearalgebra/nrjac.c [moved from src/gromacs/gmxlib/nrjac.c with 98% similarity]
src/gromacs/linearalgebra/nrjac.h [moved from src/gromacs/legacyheaders/nrjac.h with 93% similarity]
src/gromacs/math/CMakeLists.txt
src/gromacs/math/do_fit.c [moved from src/gromacs/gmxlib/do_fit.c with 99% similarity]
src/gromacs/math/do_fit.h [moved from src/gromacs/legacyheaders/do_fit.h with 96% similarity]
src/gromacs/pulling/pull_rotation.c

index 5b1c1ca6ea7f9c5064e9515b1682eb88c28040fb..b0c952e92c7ddf99bee77d8ea40de43526113339 100644 (file)
 #include "mdrun.h"
 #include "update.h"
 #include "physics.h"
-#include "nrjac.h"
 #include "mtop_util.h"
 #include "gromacs/essentialdynamics/edsam.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "xvgr.h"
 #include "gromacs/mdlib/groupcoord.h"
 
+#include "gromacs/linearalgebra/nrjac.h"
 
 /* We use the same defines as in mvdata.c here */
 #define  block_bc(cr,   d) gmx_bcast(     sizeof(d),     &(d), (cr))
index 8098cf2c40c1e865c5a691e58b4d514b368a8ae9..6b3789bd281fa1495aa43fa04d1d1454c93ee8c6 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 "fitahx.h"
 #include "vec.h"
-#include "do_fit.h"
 #include "smalloc.h"
 
+#include "gromacs/math/do_fit.h"
+
 static void my_calc_xcm(int nbb, atom_id bbind[], rvec x[], rvec xcm)
 {
     int    i, m, ai;
index 6ccc8f854120cecec2c4913e402783fe398a07c1..da221f6a90f3e53a04068ca878c7a0bbdf5146a7 100644 (file)
 #include "gromacs/fileio/matio.h"
 #include "mshift.h"
 #include "xvgr.h"
-#include "do_fit.h"
 #include "rmpbc.h"
 #include "txtdump.h"
 #include "eigio.h"
 #include "physics.h"
 #include "gmx_ana.h"
 
+#include "gromacs/math/do_fit.h"
+
 static void calc_entropy_qh(FILE *fp, int n, real eigval[], real temp, int nskip)
 {
     int    i;
index 61ac3cbc7618a7621aadab3e08464c99ad188c20..0929e4e73bf5aa1f01b93be5c6360d23eeda8e25 100644 (file)
 #include "gromacs/fileio/futil.h"
 #include "gromacs/fileio/matio.h"
 #include "cmat.h"
-#include "do_fit.h"
 #include "gromacs/fileio/trnio.h"
 #include "viewit.h"
 #include "gmx_ana.h"
 
 #include "gromacs/linearalgebra/eigensolver.h"
+#include "gromacs/math/do_fit.h"
 
 /* print to two file pointers at once (i.e. stderr and log) */
 static gmx_inline
index 527c2c372e102fa609bd041b338876febe565efb..075fe212bc02da1829377d920d8d93f681cbab65 100644 (file)
 #include "gromacs/fileio/confio.h"
 #include "gromacs/fileio/pdbio.h"
 #include "txtdump.h"
-#include "do_fit.h"
 #include "viewit.h"
 #include "rmpbc.h"
 #include "gmx_ana.h"
 
+#include "gromacs/math/do_fit.h"
 
 void calc_rm_cm(int isize, atom_id index[], t_atoms *atoms, rvec x[], rvec xcm)
 {
index dfeb48ee2abfa937871627726a294ce0f94d19dc..4f2d1bbb0ec61017a0c25edc7461d4f6c96a6764 100644 (file)
@@ -59,7 +59,6 @@
 #include "gromacs/fileio/trnio.h"
 #include "mshift.h"
 #include "xvgr.h"
-#include "do_fit.h"
 #include "rmpbc.h"
 #include "txtdump.h"
 #include "gromacs/fileio/matio.h"
@@ -70,6 +69,7 @@
 #include "gromacs/fileio/trxio.h"
 
 #include "gromacs/linearalgebra/eigensolver.h"
+#include "gromacs/math/do_fit.h"
 
 int gmx_covar(int argc, char *argv[])
 {
index dc0c0982fb8bf3844a154827f8a1c9476519b233..0df6eaafeb49d9f41a1907006626410c8df13912 100644 (file)
 #include "physics.h"
 #include "calcmu.h"
 #include "gromacs/fileio/enxio.h"
-#include "nrjac.h"
 #include "gromacs/fileio/matio.h"
 #include "gmx_ana.h"
 #include "copyrite.h"
 #include "gromacs/fileio/trxio.h"
 
+#include "gromacs/linearalgebra/nrjac.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/programcontext.h"
 
index bac84c95e22f34ed83c413f811579b1a4ddeb455..24787db56a84bc7d054dd5b43d9c88de63aa766e 100644 (file)
@@ -45,7 +45,6 @@
 #include "mshift.h"
 #include "xvgr.h"
 #include "vec.h"
-#include "do_fit.h"
 #include "gromacs/fileio/confio.h"
 #include "smalloc.h"
 #include "nrnb.h"
@@ -65,6 +64,7 @@
 #include "mtop_util.h"
 #include "gmx_ana.h"
 
+#include "gromacs/math/do_fit.h"
 
 typedef struct {
     int  n;
index 6147f04b7da6ea48c8b6ffaa994707ab8b58f9aa..414cd45d5d960d04416c4af6bb26f53479004f28 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 "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
 #include "princ.h"
-#include "do_fit.h"
 #include "rmpbc.h"
 #include "gmx_ana.h"
 
+#include "gromacs/math/do_fit.h"
 
 int gmx_filter(int argc, char *argv[])
 {
index ae0bacad6fe3471edb1ef56655a7c8a5c167e338..4a46f6be37268bf5eec9f50b35f3b027214d3d41 100644 (file)
 #include "gmx_fatal.h"
 #include "gstat.h"
 #include "pbc.h"
-#include "do_fit.h"
 #include "gmx_ana.h"
 
 #include "gromacs/fileio/futil.h"
 #include "gromacs/fileio/trxio.h"
+#include "gromacs/math/do_fit.h"
 
 int gmx_helixorient(int argc, char *argv[])
 {
index d1c5f5eb5f3527469e63a29f8655fc6203f563de..66a90d4f18d8505f2a98dcc86305381890be82ab 100644 (file)
@@ -60,7 +60,6 @@
 #include "gromacs/fileio/matio.h"
 #include "mshift.h"
 #include "xvgr.h"
-#include "do_fit.h"
 #include "rmpbc.h"
 #include "txtdump.h"
 #include "eigio.h"
index fc452a961399732213f740927a7b072878eb99b2..0df463205521c1d9e73cccca848ef6449b9843e5 100644 (file)
 #include "gromacs/fileio/confio.h"
 #include "xvgr.h"
 #include "index.h"
-#include "do_fit.h"
 #include "gmx_ana.h"
 #include "gmx_fatal.h"
 #include "gromacs/fileio/trxio.h"
 
+#include "gromacs/math/do_fit.h"
 
 static real dointerp(int n, rvec x1[], rvec x2[], rvec xx[],
                      int I, int N, real first, real last)
index ef69e3b48024c9bf22dc9a5db3b9a457e490d517..91c75f676b08ffd12b9731f7ce7939c765c141e9 100644 (file)
@@ -54,9 +54,9 @@
 #include "rmpbc.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
-#include "nrjac.h"
 #include "gmx_ana.h"
 
+#include "gromacs/linearalgebra/nrjac.h"
 
 static void gyro_eigen(double **gyr, double *eig, double **eigv, int *ord)
 {
index 7ef1a7714ebb3e6dd8820995c1ca3ba26f53526d..217bb3e33e7c7f1368f9c4f1a76fda1680404fdb 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/fileio/futil.h"
 #include "princ.h"
 #include "rmpbc.h"
-#include "do_fit.h"
 #include "gromacs/fileio/matio.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
@@ -59,6 +58,7 @@
 #include "viewit.h"
 #include "gmx_ana.h"
 
+#include "gromacs/math/do_fit.h"
 
 static void norm_princ(t_atoms *atoms, int isize, atom_id *index, int natoms,
                        rvec *x)
index f9e439ed617c51439a05f84544315fb8480f2112..30d2d061ff56ce538eafe8b58bba8dc167d8e15b 100644 (file)
 #include "pbc.h"
 #include "gmx_fatal.h"
 #include "gromacs/fileio/futil.h"
-#include "do_fit.h"
 #include "princ.h"
 #include "rmpbc.h"
 #include "gromacs/fileio/confio.h"
 #include "gmx_ana.h"
 
 #include "gromacs/linearalgebra/eigensolver.h"
+#include "gromacs/math/do_fit.h"
 
 static real find_pdb_bfac(t_atoms *atoms, t_resinfo *ri, char *atomnm)
 {
index d323f1a0c46d2527bff203877a320b1d30657aab..c35a066dddff3e938214174e4ab0f2314e35ada2 100644 (file)
@@ -53,9 +53,9 @@
 #include "rmpbc.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
-#include "do_fit.h"
 #include "gmx_ana.h"
 
+#include "gromacs/math/do_fit.h"
 
 static void get_refx(output_env_t oenv, const char *trxfn, int nfitdim, int skip,
                      int gnx, int *index,
index a76ffc1023630cef422da964b165f17523402fac..63628b3c8cc0f4b01f5f887e70f13eefcc88c3fa 100644 (file)
 #include "gromacs/fileio/trxio.h"
 #include "rmpbc.h"
 #include "physics.h"
-#include "nrjac.h"
 #include "gromacs/fileio/confio.h"
 #include "gmx_ana.h"
 
+#include "gromacs/linearalgebra/nrjac.h"
 
 static void low_print_data(FILE *fp, real time, rvec x[], int n, atom_id *index,
                            gmx_bool bDim[], const char *sffmt)
index 20bee799490bb72081c8b17bfe84c727d6c0452c..f6d5c085dec9afee409017eb39c5270c86e7c0ca 100644 (file)
@@ -58,7 +58,6 @@
 #include "index.h"
 #include "vec.h"
 #include "gromacs/fileio/xtcio.h"
-#include "do_fit.h"
 #include "rmpbc.h"
 #include "pbc.h"
 #include "xvgr.h"
index fa5f0561eb5a8b68fd812f064d49e7e8df0eb274..a6ec21d9421f1e751b8e9dc28a8be577e4cf0966 100644 (file)
 #include "index.h"
 #include "vec.h"
 #include "gromacs/fileio/xtcio.h"
-#include "do_fit.h"
 #include "rmpbc.h"
 #include "pbc.h"
 #include "viewit.h"
 #include "xvgr.h"
 #include "gmx_ana.h"
 
+#include "gromacs/math/do_fit.h"
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index a25411ba9d91495f3864116765312acec794d151..583cd409b9663c4a45db2091d33e66e496153f25 100644 (file)
 #include "typedefs.h"
 #include "smalloc.h"
 #include "vec.h"
-#include "nrjac.h"
 #include "types/commrec.h"
 #include "network.h"
 #include "orires.h"
-#include "do_fit.h"
 #include "main.h"
 #include "copyrite.h"
 #include "pbc.h"
 #include "mtop_util.h"
 
+#include "gromacs/linearalgebra/nrjac.h"
+#include "gromacs/math/do_fit.h"
+
 void init_orires(FILE *fplog, const gmx_mtop_t *mtop,
                  rvec xref[],
                  const t_inputrec *ir,
index ac319c8a0b98873f6a67260e02e776bfa9817155..73ca01221d68c82301c180fb0f90729f6cdc6d73 100644 (file)
 #include "typedefs.h"
 #include "vec.h"
 #include "smalloc.h"
-#include "nrjac.h"
 #include "txtdump.h"
 #include "princ.h"
 
+#include "gromacs/linearalgebra/nrjac.h"
+
 static void m_op(matrix mat, rvec x)
 {
     rvec xp;
similarity index 98%
rename from src/gromacs/gmxlib/nrjac.c
rename to src/gromacs/linearalgebra/nrjac.c
index 71b779a6da10794d6e433d60ce3015b923283c82..49d685106618fae9098b63c616af65b4b54d6ed9 100644 (file)
  * 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 "nrjac.h"
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <math.h>
-#include "smalloc.h"
-#include "gmx_fatal.h"
-#include "nrjac.h"
 
+#include "gmx_fatal.h"
+#include "smalloc.h"
 
 static gmx_inline
 void do_rotate(double **a, int i, int j, int k, int l, double tau, double s)
similarity index 93%
rename from src/gromacs/legacyheaders/nrjac.h
rename to src/gromacs/linearalgebra/nrjac.h
index f759e61aec830c7a92df4f445fb3e472153451ea..9e2f625bee5dee231591d51b45eae7db803a51a7 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.
  * 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_LINEARALGEBRA_NRJAC_H
+#define GMX_LINEARALGEBRA_NRJAC_H
 
-#ifndef _nrjac_h
-#define _nrjac_h
-
-#include "typedefs.h"
+#include "gromacs/legacyheaders/types/simple.h"
 
 #ifdef __cplusplus
 extern "C" {
index 4b3a5b80e474841cda2192fb87ad16cf3e56d48d..dfaba940839bb735a23240361b01a9f1d1062f16 100644 (file)
@@ -38,6 +38,7 @@ set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${MATH_SOURCES} PARENT_SCOPE)
 set(MATH_PUBLIC_HEADERS
     3dview.h
     gmxcomplex.h
+    do_fit.h
     utilities.h
     )
 gmx_install_headers(math ${MATH_PUBLIC_HEADERS})
similarity index 99%
rename from src/gromacs/gmxlib/do_fit.c
rename to src/gromacs/math/do_fit.c
index 2d2e51e71d92b9040d705a7d155a4f75502197d8..7d4b471ec9dbf6a2d90e46ee675573eec4c6cde4 100644 (file)
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "do_fit.h"
 
 #include "gromacs/math/utilities.h"
 #include "sysstuff.h"
 #include "typedefs.h"
-#include "nrjac.h"
 #include "vec.h"
 #include "txtdump.h"
 #include "smalloc.h"
-#include "do_fit.h"
 
-#define EPS 1.0e-09
+#include "gromacs/linearalgebra/nrjac.h"
 
 real calc_similar_ind(gmx_bool bRho, int nind, atom_id *index, real mass[],
                       rvec x[], rvec xp[])
similarity index 96%
rename from src/gromacs/legacyheaders/do_fit.h
rename to src/gromacs/math/do_fit.h
index da9beab254d593470340d6daa514dee83636f6af..9cc02c045a62c5f6a9fc633d3bf6c16d6d767b87 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.
  * 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_MATH_DO_FIT_H
+#define GMX_MATH_DO_FIT_H
 
-#ifndef _do_fit_h
-#define _do_fit_h
-
-#include "typedefs.h"
+#include "../legacyheaders/types/simple.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -105,4 +104,4 @@ void reset_x(int ncm, const atom_id *ind_cm,
 }
 #endif
 
-#endif  /* _do_fit_h */
+#endif
index 6f2d45accb1065b66c80d35367c29c0cc9685182..1fcd90ad47746b7be2b57df58490303272d143eb 100644 (file)
@@ -41,6 +41,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "domdec.h"
 #include "smalloc.h"
 #include "network.h"
@@ -50,7 +51,6 @@
 #include "names.h"
 #include "mtop_util.h"
 #include "names.h"
-#include "nrjac.h"
 #include "vec.h"
 #include "gmx_ga2la.h"
 #include "xvgr.h"
@@ -60,6 +60,7 @@
 #include "gromacs/fileio/futil.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/trnio.h"
+#include "gromacs/linearalgebra/nrjac.h"
 #include "gromacs/timing/cyclecounter.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/qsort_threadsafe.h"