Enable missing declarations warning
authorRoland Schulz <roland.schulz@intel.com>
Fri, 25 Aug 2017 01:26:34 +0000 (18:26 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Tue, 29 Aug 2017 18:16:48 +0000 (11:16 -0700)
Change-Id: I055e12554e40fea43d37590ea3989d0a8fbe732d

99 files changed:
cmake/gmxCFlags.cmake
src/external/gmock-1.7.0/gtest/include/gtest/gtest-param-test.h
src/gromacs/correlationfunctions/autocorr.cpp
src/gromacs/domdec/domdec_constraints.cpp
src/gromacs/ewald/pme-gather.cpp
src/gromacs/fileio/pdbio.cpp
src/gromacs/fileio/tests/confio.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/gmxana/binsearch.cpp
src/gromacs/gmxana/edittop.cpp [deleted file]
src/gromacs/gmxana/gmx_analyze.cpp
src/gromacs/gmxana/gmx_bar.cpp
src/gromacs/gmxana/gmx_chi.cpp
src/gromacs/gmxana/gmx_cluster.cpp
src/gromacs/gmxana/gmx_confrms.cpp
src/gromacs/gmxana/gmx_density.cpp
src/gromacs/gmxana/gmx_dielectric.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gmxana/gmx_do_dssp.cpp
src/gromacs/gmxana/gmx_editconf.cpp
src/gromacs/gmxana/gmx_genion.cpp
src/gromacs/gmxana/gmx_gyrate.cpp
src/gromacs/gmxana/gmx_h2order.cpp
src/gromacs/gmxana/gmx_lie.cpp
src/gromacs/gmxana/gmx_make_edi.cpp
src/gromacs/gmxana/gmx_make_ndx.cpp
src/gromacs/gmxana/gmx_mdmat.cpp
src/gromacs/gmxana/gmx_mindist.cpp
src/gromacs/gmxana/gmx_msd.cpp
src/gromacs/gmxana/gmx_order.cpp
src/gromacs/gmxana/gmx_potential.cpp
src/gromacs/gmxana/gmx_principal.cpp
src/gromacs/gmxana/gmx_rmsdist.cpp
src/gromacs/gmxana/gmx_rmsf.cpp
src/gromacs/gmxana/gmx_sigeps.cpp
src/gromacs/gmxana/gmx_spol.cpp
src/gromacs/gmxana/gmx_trjconv.cpp
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxana/gmx_wheel.cpp
src/gromacs/gmxana/gmx_xpm2ps.cpp
src/gromacs/gmxana/powerspect.cpp
src/gromacs/gmxlib/nonbonded/nb_kernel.cpp
src/gromacs/gmxpreprocess/add_par.cpp
src/gromacs/gmxpreprocess/gen_ad.cpp
src/gromacs/gmxpreprocess/genhydro.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/hackblock.cpp
src/gromacs/gmxpreprocess/hizzie.cpp
src/gromacs/gmxpreprocess/hizzie.h
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/gmxpreprocess/resall.cpp
src/gromacs/gmxpreprocess/ter_db.cpp
src/gromacs/gmxpreprocess/topio.cpp
src/gromacs/gmxpreprocess/toppush.cpp
src/gromacs/gmxpreprocess/toputil.cpp
src/gromacs/gmxpreprocess/x2top.cpp
src/gromacs/gpu_utils/ocl_compiler.cpp
src/gromacs/gpu_utils/oclutils.cpp
src/gromacs/listed-forces/bonded.cpp
src/gromacs/listed-forces/pairs.cpp
src/gromacs/mdlib/clincs.cpp
src/gromacs/mdlib/expanded.cpp
src/gromacs/mdlib/genborn.cpp
src/gromacs/mdlib/mdebin_bar.cpp
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h [new file with mode: 0644]
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl.cpp
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_data_mgmt.cpp
src/gromacs/mdlib/ns.cpp
src/gromacs/mdlib/nsgrid.cpp
src/gromacs/mdlib/qm_orca.cpp
src/gromacs/mdlib/qm_orca.h [new file with mode: 0644]
src/gromacs/mdlib/qmmm.cpp
src/gromacs/mdlib/shakef.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/selection/sm_compare.cpp
src/gromacs/swap/swapcoords.cpp
src/gromacs/timing/wallcycle.cpp
src/gromacs/tools/check.cpp
src/gromacs/tools/convert_tpr.cpp
src/gromacs/tools/dump.cpp
src/gromacs/utility/futil.cpp
src/programs/mdrun/membed.cpp
src/programs/mdrun/tests/energyreader.cpp
src/programs/mdrun/tests/termination.cpp
src/programs/mdrun/tests/trajectoryreader.cpp
src/programs/view/fgrid.cpp
src/programs/view/molps.cpp
src/programs/view/nleg.cpp
src/programs/view/nmol.cpp
src/programs/view/popup.cpp
src/programs/view/view.cpp
src/programs/view/xdlg.cpp
src/programs/view/xmb.cpp
src/testutils/refdata-checkers.h

index 4df62a8ee4f58e1d59c9c152238c7828ae0ecdde..a1703625ddea4d33c326143eea12dd998056fad2 100644 (file)
@@ -133,7 +133,7 @@ macro (gmx_c_flags)
             GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall" GMXC_CXXFLAGS)
             # Problematic with CUDA
             # GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EFFCXX "-Wnon-virtual-dtor" GMXC_CXXFLAGS)
-            GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith" GMXC_CXXFLAGS)
+            GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith -Wmissing-declarations" GMXC_CXXFLAGS)
             # CUDA versions prior to 7.5 come with a header (math_functions.h) which uses the _MSC_VER macro
             # unconditionally, so we don't use -Wundef for earlier CUDA versions.
             if(NOT(GMX_GPU AND CUDA_VERSION VERSION_LESS "7.5"))
@@ -313,7 +313,7 @@ GMX_TEST_CFLAG(CFLAGS_WARN "/W3 /wd177 /wd411 /wd593 /wd981 /wd1418 /wd1419 /wd1
         endif()
         if (GMX_COMPILER_WARNINGS)
             GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall" GMXC_CXXFLAGS)
-            GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith" GMXC_CXXFLAGS)
+            GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith -Wmissing-prototypes" GMXC_CXXFLAGS)
             GMX_TEST_CXXFLAG(CXXFLAGS_DEPRECATED "-Wdeprecated" GMXC_CXXFLAGS)
         endif()
     endif()
index d6702c8f1624789dcbda525f7a28e72be627e9ef..40c6648f4f14c909c7baa1b1e6c899644584ac3a 100644 (file)
@@ -1404,7 +1404,7 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
   void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::TestBody()
 
 # define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator) \
-  ::testing::internal::ParamGenerator<test_case_name::ParamType> \
+  static ::testing::internal::ParamGenerator<test_case_name::ParamType> \
       gtest_##prefix##test_case_name##_EvalGenerator_() { return generator; } \
   int gtest_##prefix##test_case_name##_dummy_ = \
       ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
index 22b1ad04c79c049b8f5a49f80410e85a067123b6..b61ad45bc51057102231ceb13d3f5b3548e95905 100644 (file)
@@ -244,7 +244,7 @@ static void do_ac_core(int nframes, int nout,
 }
 
 /*! \brief Routine to normalize ACF, dividing by corr[0]. */
-void normalize_acf(int nout, real corr[])
+static void normalize_acf(int nout, real corr[])
 {
     int    j;
     double c0;
@@ -285,7 +285,7 @@ void normalize_acf(int nout, real corr[])
 }
 
 /*! \brief Routine that averages ACFs. */
-void average_acf(gmx_bool bVerbose, int n, int nitem, real **c1)
+static void average_acf(gmx_bool bVerbose, int n, int nitem, real **c1)
 {
     real c0;
     int  i, j;
@@ -307,7 +307,7 @@ void average_acf(gmx_bool bVerbose, int n, int nitem, real **c1)
 }
 
 /*! \brief Normalize ACFs. */
-void norm_and_scale_vectors(int nframes, real c1[], real scale)
+static void norm_and_scale_vectors(int nframes, real c1[], real scale)
 {
     int   j, m;
     real *rij;
index 299b6e21c4db50f25dc4694dc7bac04a4a95174d..c20440a276632211f0d628470c58ed7319d76b85 100644 (file)
@@ -66,6 +66,7 @@
 #include "gromacs/utility/smalloc.h"
 
 #include "domdec_specatomcomm.h"
+#include "domdec_vsite.h"
 #include "hash.h"
 
 /*! \brief Struct used during constraint setup with domain decomposition */
index 28f715fc8c7f41af5d6ec0f1f9c5aaa5f0601f4d..fe8d3d11ca4b063182f93a87ff9a077c7b05c131 100644 (file)
@@ -37,6 +37,8 @@
 
 #include "gmxpre.h"
 
+#include "pme-gather.h"
+
 #include "gromacs/math/vec.h"
 #include "gromacs/simd/simd.h"
 #include "gromacs/utility/basedefinitions.h"
index a07a1549afa2bf5344c7ffc6569ca9765ad46aca..d6c7579199759b7517429e5fca7df086e2a1d568 100644 (file)
@@ -426,7 +426,7 @@ void write_pdbfile(FILE *out, const char *title, const t_atoms *atoms, const rve
     sfree(index);
 }
 
-int line2type(char *line)
+static int line2type(char *line)
 {
     int  k;
     char type[8];
index c544689f71408790853de7f83fb88c69906e09e5..23e8f91a397395570c2f72139830a8643625e33a 100644 (file)
@@ -65,7 +65,7 @@
 /*! \brief
  * Google Test formatter for GromacsFileType values.
  */
-void PrintTo(const GromacsFileType &ftp, std::ostream *os)
+static void PrintTo(const GromacsFileType &ftp, std::ostream *os)
 {
     *os << "'" << ftp2ext(ftp) << "'";
 }
index ea75ea6eb687d4a9d00547798ba6eada490cf2b7..d6f69751407c3eddd2f82b0362049bd9a2f0cadb 100644 (file)
@@ -1755,8 +1755,8 @@ static void do_harm(t_fileio *fio, t_iparams *iparams)
     gmx_fio_do_real(fio, iparams->harmonic.krB);
 }
 
-void do_iparams(t_fileio *fio, t_functype ftype, t_iparams *iparams,
-                gmx_bool bRead, int file_version)
+static void do_iparams(t_fileio *fio, t_functype ftype, t_iparams *iparams,
+                       gmx_bool bRead, int file_version)
 {
     int      idum;
     real     rdum;
index 74f1514265e4e39d2769f38868e8a083dcb2ca27..d30d16bc72087abfa2bee548e8453b12a88d6d40 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2013,2014,2015,2016,2017, 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.
@@ -51,7 +51,7 @@ void rangeArray(int *ar, int size)
     }
 }
 
-void pswap(int *v1, int *v2)
+static void pswap(int *v1, int *v2)
 {
     int temp;
     temp = *v1;
@@ -60,7 +60,7 @@ void pswap(int *v1, int *v2)
 }
 
 
-void Swap (real *v1, real *v2)
+static void Swap (real *v1, real *v2)
 {
     real temp;
     temp = *v1;
diff --git a/src/gromacs/gmxana/edittop.cpp b/src/gromacs/gmxana/edittop.cpp
deleted file mode 100644 (file)
index 41e7acb..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, 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.
- */
-#include "gmxpre.h"
-
-#include "gromacs/topology/ifunc.h"
-#include "gromacs/topology/symtab.h"
-#include "gromacs/topology/topology.h"
-#include "gromacs/utility/fatalerror.h"
-#include "gromacs/utility/smalloc.h"
-
-void replace_atom(t_topology *top, int inr, char *anm, char *resnm,
-                  real q, real m, int type)
-{
-    t_atoms *atoms;
-
-    atoms = &(top->atoms);
-
-    /* Replace important properties of an atom by other properties */
-    if ((inr < 0) || (inr > atoms->nr))
-    {
-        gmx_fatal(FARGS, "Replace_atom: inr (%d) not in %d .. %d", inr, 0, atoms->nr);
-    }
-    if (debug)
-    {
-        fprintf(debug, "Replacing atom %d ... ", inr);
-    }
-    /* Charge, mass and type */
-    atoms->atom[inr].q    = atoms->atom[inr].qB    = q;
-    atoms->atom[inr].m    = atoms->atom[inr].mB    = m;
-    atoms->atom[inr].type = atoms->atom[inr].typeB = type;
-
-    /* Residue name */
-    atoms->resinfo[atoms->atom[inr].resind].name = put_symtab(&top->symtab, resnm);
-    /* Atom name */
-    atoms->atomname[inr] = put_symtab(&top->symtab, anm);
-    if (debug)
-    {
-        fprintf(debug, " done\n");
-    }
-}
-
-static void delete_from_interactions(t_idef *idef, int inr)
-{
-    int      i, j, k, nra, nnr;
-    t_iatom *niatoms;
-    gmx_bool bDel;
-
-    /* Delete interactions including atom inr from lists */
-    for (i = 0; (i < F_NRE); i++)
-    {
-        nra = interaction_function[i].nratoms;
-        nnr = 0;
-        snew(niatoms, idef->il[i].nr);
-        for (j = 0; (j < idef->il[i].nr); j += nra+1)
-        {
-            bDel = FALSE;
-            for (k = 0; (k < nra); k++)
-            {
-                if (idef->il[i].iatoms[j+k+1] == inr)
-                {
-                    bDel = TRUE;
-                }
-            }
-            if (!bDel)
-            {
-                /* If this does not need to be deleted, then copy it to temp array */
-                for (k = 0; (k < nra+1); k++)
-                {
-                    niatoms[nnr+k] = idef->il[i].iatoms[j+k];
-                }
-                nnr += nra+1;
-            }
-        }
-        /* Copy temp array back */
-        for (j = 0; (j < nnr); j++)
-        {
-            idef->il[i].iatoms[j] = niatoms[j];
-        }
-        idef->il[i].nr = nnr;
-        sfree(niatoms);
-    }
-}
-
-static void delete_from_block(t_block *block, int inr)
-{
-    /* Update block data structure */
-    int i, i1, j;
-
-    for (i = 0; (i < block->nr); i++)
-    {
-        for (j = block->index[i]; (j < block->index[i+1]); j++)
-        {
-            if (j == inr)
-            {
-                /* This atom has to go */
-                /* Change indices too */
-                for (i1 = i+1; (i1 <= block->nr); i1++)
-                {
-                    block->index[i1]--;
-                }
-            }
-        }
-    }
-}
-
-static void delete_from_blocka(t_blocka *block, int inr)
-{
-    /* Update block data structure */
-    int i, i1, j1, j, k;
-
-    for (i = 0; (i < block->nr); i++)
-    {
-        for (j = block->index[i]; (j < block->index[i+1]); j++)
-        {
-            k = block->a[j];
-            if (k == inr)
-            {
-                /* This atom has to go */
-                for (j1 = j; (j1 < block->nra-1); j1++)
-                {
-                    block->a[j1] = block->a[j1+1];
-                }
-                block->nra--;
-                /* Change indices too */
-                for (i1 = i+1; (i1 <= block->nr); i1++)
-                {
-                    block->index[i1]--;
-                }
-            }
-        }
-    }
-}
-
-static void delete_from_atoms(t_atoms *atoms, int inr)
-{
-    int i;
-
-    /* Shift the atomnames down */
-    for (i = inr; (i < atoms->nr-1); i++)
-    {
-        atoms->atomname[i] = atoms->atomname[i+1];
-    }
-
-    /* Shift the atom struct down */
-    for (i = inr; (i < atoms->nr-1); i++)
-    {
-        atoms->atom[i] = atoms->atom[i+1];
-    }
-
-    if (atoms->havePdbInfo)
-    {
-        /* Shift the pdbatom struct down */
-        for (i = inr; (i < atoms->nr-1); i++)
-        {
-            atoms->pdbinfo[i] = atoms->pdbinfo[i+1];
-        }
-    }
-    atoms->nr--;
-}
-
-void delete_atom(t_topology *top, int inr)
-{
-    if ((inr < 0) || (inr >= top->atoms.nr))
-    {
-        gmx_fatal(FARGS, "Delete_atom: inr (%d) not in %d .. %d", inr, 0,
-                  top->atoms.nr);
-    }
-    if (debug)
-    {
-        fprintf(debug, "Deleting atom %d ...", inr);
-    }
-
-    /* First remove bonds etc. */
-    delete_from_interactions(&top->idef, inr);
-    /* Now charge groups etc. */
-    delete_from_block(&(top->cgs), inr);
-    delete_from_block(&(top->mols), inr);
-    delete_from_blocka(&(top->excls), inr);
-    /* Now from the atoms struct */
-    delete_from_atoms(&top->atoms, inr);
-    if (debug)
-    {
-        fprintf(debug, " done\n");
-    }
-}
index 36ad1e0940894272466c4d45a79778d6e9e656b5..f2642dd88f3a2ee4d489ccb49f70f71dd05f44cd 100644 (file)
@@ -237,8 +237,8 @@ static void regression_analysis(int n, gmx_bool bXYdy,
     }
 }
 
-void histogram(const char *distfile, real binwidth, int n, int nset, real **val,
-               const gmx_output_env_t *oenv)
+static void histogram(const char *distfile, real binwidth, int n, int nset, real **val,
+                      const gmx_output_env_t *oenv)
 {
     FILE          *fp;
     int            i, s;
index 4755864f06260dc88714b1c1fe59ed2cb6492635..865cf3c6a3153a74666d85c66463ce42f7cf041e 100644 (file)
@@ -985,8 +985,8 @@ static void sample_coll_make_hist(sample_coll_t *sc, int **bin,
 }
 
 /* write a collection of histograms to a file */
-void sim_data_histogram(sim_data_t *sd, const char *filename,
-                        int nbin_default, const gmx_output_env_t *oenv)
+static void sim_data_histogram(sim_data_t *sd, const char *filename,
+                               int nbin_default, const gmx_output_env_t *oenv)
 {
     char           label_x[STRLEN];
     const char    *dhdl    = "dH/d\\lambda", *deltag = "\\DeltaH", *lambda = "\\lambda";
index 1ce9b2645f52f29d5b1893dda8f3111fc11eefe4..35dc63c92dbd4618befe9446ad38814a719ec10a 100644 (file)
@@ -138,7 +138,7 @@ static gmx_bool bAllowed(real phi, real psi)
     return (map[x][y] == '1') ? TRUE : FALSE;
 }
 
-int *make_chi_ind(int nl, t_dlist dl[], int *ndih)
+static int *make_chi_ind(int nl, t_dlist dl[], int *ndih)
 {
     int     *id;
     int      i, Xi, n;
@@ -211,14 +211,6 @@ int *make_chi_ind(int nl, t_dlist dl[], int *ndih)
     return id;
 }
 
-int bin(real chi, int mult)
-{
-    mult = 3;
-
-    return static_cast<int>(chi*mult/360.0);
-}
-
-
 static void do_dihcorr(const char *fn, int nf, int ndih, real **dih, real dt,
                        int nlist, t_dlist dlist[], real time[], int maxchi,
                        gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, gmx_bool bOmega,
index 2c7cf6de701b05a242854acf54b1e4aedaa74fd7..96cdf384ca7217507cfbb7dea6c4d8b1a756e145 100644 (file)
@@ -140,20 +140,10 @@ typedef struct {
     int *nb;
 } t_nnb;
 
-void cp_index(int nn, int from[], int to[])
-{
-    int i;
-
-    for (i = 0; (i < nn); i++)
-    {
-        to[i] = from[i];
-    }
-}
-
-void mc_optimize(FILE *log, t_mat *m, real *time,
-                 int maxiter, int nrandom,
-                 int seed, real kT,
-                 const char *conv, gmx_output_env_t *oenv)
+static void mc_optimize(FILE *log, t_mat *m, real *time,
+                        int maxiter, int nrandom,
+                        int seed, real kT,
+                        const char *conv, gmx_output_env_t *oenv)
 {
     FILE      *fp = nullptr;
     real       ecur, enext, emin, prob, enorm;
@@ -347,7 +337,7 @@ static bool nrnb_comp(const t_nnb &a, const t_nnb &b)
     return b.nr < a.nr;
 }
 
-void gather(t_mat *m, real cutoff, t_clusters *clust)
+static void gather(t_mat *m, real cutoff, t_clusters *clust)
 {
     t_clustid *c;
     t_dist    *d;
@@ -437,7 +427,7 @@ void gather(t_mat *m, real cutoff, t_clusters *clust)
     sfree(d);
 }
 
-gmx_bool jp_same(int **nnb, int i, int j, int P)
+static gmx_bool jp_same(int **nnb, int i, int j, int P)
 {
     gmx_bool bIn;
     int      k, ii, jj, pp;
@@ -762,8 +752,8 @@ static void gromos(int n1, real **mat, real rmsdcut, t_clusters *clust)
     clust->ncl = k-1;
 }
 
-rvec **read_whole_trj(const char *fn, int isize, int index[], int skip,
-                      int *nframe, real **time, const gmx_output_env_t *oenv, gmx_bool bPBC, gmx_rmpbc_t gpbc)
+static rvec **read_whole_trj(const char *fn, int isize, int index[], int skip,
+                             int *nframe, real **time, const gmx_output_env_t *oenv, gmx_bool bPBC, gmx_rmpbc_t gpbc)
 {
     rvec       **xx, *x;
     matrix       box;
@@ -1394,7 +1384,7 @@ int gmx_cluster(int argc, char *argv[])
     };
 
     FILE              *fp, *log;
-    int                nf, i, i1, i2, j;
+    int                nf   = 0, i, i1, i2, j;
     gmx_int64_t        nrms = 0;
 
     matrix             box;
index d03727675699b5414a0ce84cbd832403f927cf67..8d80f8c15f611b7f21a62b289264763c1b97ddff 100644 (file)
@@ -63,7 +63,7 @@
 
 static const int NOTSET = -9368163;
 
-void calc_rm_cm(int isize, int index[], const t_atoms *atoms, rvec x[], rvec xcm)
+static void calc_rm_cm(int isize, int index[], const t_atoms *atoms, rvec x[], rvec xcm)
 {
     int  i, d;
     real tm, m;
@@ -87,7 +87,7 @@ void calc_rm_cm(int isize, int index[], const t_atoms *atoms, rvec x[], rvec xcm
     }
 }
 
-int build_res_index(int isize, int index[], t_atom atom[], int rindex[])
+static int build_res_index(int isize, int index[], t_atom atom[], int rindex[])
 {
     int i, r;
 
@@ -106,7 +106,7 @@ int build_res_index(int isize, int index[], t_atom atom[], int rindex[])
     return r;
 }
 
-int find_res_end(int i, int isize, int index[], const t_atoms *atoms)
+static int find_res_end(int i, int isize, int index[], const t_atoms *atoms)
 {
     int rnr;
 
@@ -118,7 +118,7 @@ int find_res_end(int i, int isize, int index[], const t_atoms *atoms)
     return i;
 }
 
-int debug_strcmp(char s1[], char s2[])
+static int debug_strcmp(char s1[], char s2[])
 {
     if (debug)
     {
@@ -127,10 +127,10 @@ int debug_strcmp(char s1[], char s2[])
     return std::strcmp(s1, s2);
 }
 
-int find_next_match_atoms_in_res(int *i1, int index1[],
-                                 int m1, char **atnms1[],
-                                 int *i2, int index2[],
-                                 int m2, char **atnms2[])
+static int find_next_match_atoms_in_res(int *i1, int index1[],
+                                        int m1, char **atnms1[],
+                                        int *i2, int index2[],
+                                        int m2, char **atnms2[])
 {
     int      dx, dy, dmax, cmp;
     gmx_bool bFW = FALSE;
@@ -309,7 +309,7 @@ static int find_next_match_res(int *rnr1, int isize1,
     return cmp;
 }
 
-int find_first_atom_in_res(int rnr, int isize, int index[], t_atom atom[])
+static int find_first_atom_in_res(int rnr, int isize, int index[], t_atom atom[])
 {
     int i;
 
@@ -329,8 +329,8 @@ int find_first_atom_in_res(int rnr, int isize, int index[], t_atom atom[])
     }
 }
 
-void find_matching_names(int *isize1, int index1[], const t_atoms *atoms1,
-                         int *isize2, int index2[], const t_atoms *atoms2)
+static void find_matching_names(int *isize1, int index1[], const t_atoms *atoms1,
+                                int *isize2, int index2[], const t_atoms *atoms2)
 {
     int        i1, i2, ii1, ii2, m1, m2;
     int        atcmp, rescmp;
index f62f4180e6cb5eababd961eb8a2ce8d6e43b2b70..e436d98a16c7781c73f739168db0a5f8762b0ef0 100644 (file)
@@ -71,7 +71,7 @@ typedef struct {
 /****************************************************************************/
 
 /* used for sorting the list */
-int compare(void *a, void *b)
+static int compare(void *a, void *b)
 {
     t_electron *tmp1, *tmp2;
     tmp1 = (t_electron *)a; tmp2 = (t_electron *)b;
@@ -79,7 +79,7 @@ int compare(void *a, void *b)
     return std::strcmp(tmp1->atomname, tmp2->atomname);
 }
 
-int get_electrons(t_electron **eltab, const char *fn)
+static int get_electrons(t_electron **eltab, const char *fn)
 {
     char  buffer[256];  /* to read in a line   */
     char  tempname[80]; /* buffer to hold name */
@@ -129,8 +129,8 @@ int get_electrons(t_electron **eltab, const char *fn)
     return nr;
 }
 
-void center_coords(t_atoms *atoms, int *index_center, int ncenter,
-                   matrix box, rvec x0[])
+static void center_coords(t_atoms *atoms, int *index_center, int ncenter,
+                          matrix box, rvec x0[])
 {
     int  i, k, m;
     real tmass, mm;
@@ -167,13 +167,13 @@ void center_coords(t_atoms *atoms, int *index_center, int ncenter,
     }
 }
 
-void calc_electron_density(const char *fn, int **index, int gnx[],
-                           double ***slDensity, int *nslices, t_topology *top,
-                           int ePBC,
-                           int axis, int nr_grps, real *slWidth,
-                           t_electron eltab[], int nr, gmx_bool bCenter,
-                           int *index_center, int ncenter,
-                           gmx_bool bRelative, const gmx_output_env_t *oenv)
+static void calc_electron_density(const char *fn, int **index, int gnx[],
+                                  double ***slDensity, int *nslices, t_topology *top,
+                                  int ePBC,
+                                  int axis, int nr_grps, real *slWidth,
+                                  t_electron eltab[], int nr, gmx_bool bCenter,
+                                  int *index_center, int ncenter,
+                                  gmx_bool bRelative, const gmx_output_env_t *oenv)
 {
     rvec        *x0;            /* coordinates without pbc */
     matrix       box;           /* box (3x3) */
@@ -326,11 +326,11 @@ void calc_electron_density(const char *fn, int **index, int gnx[],
     sfree(x0); /* free memory used by coordinate array */
 }
 
-void calc_density(const char *fn, int **index, int gnx[],
-                  double ***slDensity, int *nslices, t_topology *top, int ePBC,
-                  int axis, int nr_grps, real *slWidth, gmx_bool bCenter,
-                  int *index_center, int ncenter,
-                  gmx_bool bRelative, const gmx_output_env_t *oenv)
+static void calc_density(const char *fn, int **index, int gnx[],
+                         double ***slDensity, int *nslices, t_topology *top, int ePBC,
+                         int axis, int nr_grps, real *slWidth, gmx_bool bCenter,
+                         int *index_center, int ncenter,
+                         gmx_bool bRelative, const gmx_output_env_t *oenv)
 {
     rvec        *x0;            /* coordinates without pbc */
     matrix       box;           /* box (3x3) */
@@ -475,11 +475,11 @@ void calc_density(const char *fn, int **index, int gnx[],
     sfree(x0); /* free memory used by coordinate array */
 }
 
-void plot_density(double *slDensity[], const char *afile, int nslices,
-                  int nr_grps, char *grpname[], real slWidth,
-                  const char **dens_opt,
-                  gmx_bool bCenter, gmx_bool bRelative, gmx_bool bSymmetrize,
-                  const gmx_output_env_t *oenv)
+static void plot_density(double *slDensity[], const char *afile, int nslices,
+                         int nr_grps, char *grpname[], real slWidth,
+                         const char **dens_opt,
+                         gmx_bool bCenter, gmx_bool bRelative, gmx_bool bSymmetrize,
+                         const gmx_output_env_t *oenv)
 {
     FILE       *den;
     const char *title  = nullptr;
index 11cd32e5f9ce82e3307b0807a0a7725059f2d777..e6ba83d90e47a3524fc2f0f4f38cf5bfcf071379 100644 (file)
@@ -59,7 +59,7 @@
 #include "gromacs/utility/smalloc.h"
 
 /* Determines at which point in the array the fit should start */
-int calc_nbegin(int nx, real x[], real tbegin)
+static int calc_nbegin(int nx, real x[], real tbegin)
 {
     int  nbegin;
 
@@ -86,8 +86,8 @@ int calc_nbegin(int nx, real x[], real tbegin)
     return nbegin;
 }
 
-real numerical_deriv(int nx, real x[], real y[], real fity[], real combined[], real dy[],
-                     real tendInt, int nsmooth)
+static real numerical_deriv(int nx, real x[], real y[], real fity[], real combined[], real dy[],
+                            real tendInt, int nsmooth)
 {
     FILE *tmpfp;
     int   i, nbegin, i0, i1;
@@ -151,8 +151,8 @@ real numerical_deriv(int nx, real x[], real y[], real fity[], real combined[], r
     return integralSmth;
 }
 
-void do_four(const char *fn, const char *cn, int nx, real x[], real dy[],
-             real eps0, real epsRF, const gmx_output_env_t *oenv)
+static void do_four(const char *fn, const char *cn, int nx, real x[], real dy[],
+                    real eps0, real epsRF, const gmx_output_env_t *oenv)
 {
     FILE      *fp, *cp;
     t_complex *tmp, gw, hw, kw;
index b10f25364ab34036de2dbbb1179a8bd7d9e55488..32dd9125ccf5aad2f612cf74ee615fe4a8b04a66 100644 (file)
@@ -410,8 +410,8 @@ static void print_gkrbin(const char *fn, t_gkrbin *gb,
     xvgrclose(fp);
 }
 
-gmx_bool read_mu_from_enx(ener_file_t fmu, int Vol, ivec iMu, rvec mu, real *vol,
-                          real *t, int nre, t_enxframe *fr)
+static gmx_bool read_mu_from_enx(ener_file_t fmu, int Vol, ivec iMu, rvec mu, real *vol,
+                                 real *t, int nre, t_enxframe *fr)
 {
     int          i;
     gmx_bool     bCont;
@@ -621,7 +621,7 @@ static void mol_quad(int k0, int k1, rvec x[], const t_atom atom[], rvec quad)
 /*
  * Calculates epsilon according to M. Neumann, Mol. Phys. 50, 841 (1983)
  */
-real calc_eps(double M_diff, double volume, double epsRF, double temp)
+static real calc_eps(double M_diff, double volume, double epsRF, double temp)
 {
     double eps, A, teller, noemer;
     double eps_0 = 8.854187817e-12;   /* epsilon_0 in C^2 J^-1 m^-1 */
@@ -1469,7 +1469,7 @@ static void do_dip(const t_topology *top, int ePBC, real volume,
     }
 }
 
-void dipole_atom2molindex(int *n, int *index, const t_block *mols)
+static void dipole_atom2molindex(int *n, int *index, const t_block *mols)
 {
     int nmol, i, j, m;
 
index a6a0a316b0b704db3e4814aced72c573ebc2582c..a1f309b5834bd2323eec4d26f213cb6a7d9acc53 100644 (file)
@@ -106,7 +106,7 @@ static void reset5(void)
     }
 }
 
-int tpcomp(const void *a, const void *b)
+static int tpcomp(const void *a, const void *b)
 {
     t_toppop *tpa;
     t_toppop *tpb;
index 1d2ee996b21e2e9403830ec19d3175b521cd628e..a8aab1bc21c1734db7b7b0a47c0d119ffbc53d00 100644 (file)
@@ -269,7 +269,7 @@ static void norm_acc(t_atoms *atoms, int nres,
     }
 }
 
-void prune_ss_legend(t_matrix *mat)
+static void prune_ss_legend(t_matrix *mat)
 {
     gmx_bool  *present;
     int       *newnum;
@@ -314,7 +314,7 @@ void prune_ss_legend(t_matrix *mat)
     }
 }
 
-void write_sas_mat(const char *fn, real **accr, int nframe, int nres, t_matrix *mat)
+static void write_sas_mat(const char *fn, real **accr, int nframe, int nres, t_matrix *mat)
 {
     real  lo, hi;
     int   i, j, nlev;
@@ -341,8 +341,8 @@ void write_sas_mat(const char *fn, real **accr, int nframe, int nres, t_matrix *
     }
 }
 
-void analyse_ss(const char *outfile, t_matrix *mat, const char *ss_string,
-                const gmx_output_env_t *oenv)
+static void analyse_ss(const char *outfile, t_matrix *mat, const char *ss_string,
+                       const gmx_output_env_t *oenv)
 {
     FILE        *fp;
     t_mapping   *map;
index 290dee0550d8fbc004a5c9e64faf47ffbc64340c..7abb509a260f6f31239802534e3306fa322b7119 100644 (file)
@@ -67,7 +67,7 @@
 #include "gromacs/utility/strdb.h"
 
 
-real calc_mass(t_atoms *atoms, gmx_bool bGetMass, gmx_atomprop_t aps)
+static real calc_mass(t_atoms *atoms, gmx_bool bGetMass, gmx_atomprop_t aps)
 {
     real tmass;
     int  i;
@@ -87,8 +87,8 @@ real calc_mass(t_atoms *atoms, gmx_bool bGetMass, gmx_atomprop_t aps)
     return tmass;
 }
 
-real calc_geom(int isize, int *index, rvec *x, rvec geom_center, rvec minval,
-               rvec maxval, gmx_bool bDiam)
+static real calc_geom(int isize, int *index, rvec *x, rvec geom_center, rvec minval,
+                      rvec maxval, gmx_bool bDiam)
 {
     real  diam2, d;
     int   ii, i, j;
@@ -162,7 +162,7 @@ real calc_geom(int isize, int *index, rvec *x, rvec geom_center, rvec minval,
     return std::sqrt(diam2);
 }
 
-void center_conf(int natom, rvec *x, rvec center, rvec geom_cent)
+static void center_conf(int natom, rvec *x, rvec center, rvec geom_cent)
 {
     int  i;
     rvec shift;
@@ -178,7 +178,7 @@ void center_conf(int natom, rvec *x, rvec center, rvec geom_cent)
     }
 }
 
-void scale_conf(int natom, rvec x[], matrix box, rvec scale)
+static void scale_conf(int natom, rvec x[], matrix box, rvec scale)
 {
     int i, j;
 
@@ -198,7 +198,7 @@ void scale_conf(int natom, rvec x[], matrix box, rvec scale)
     }
 }
 
-void read_bfac(const char *fn, int *n_bfac, double **bfac_val, int **bfac_nr)
+static void read_bfac(const char *fn, int *n_bfac, double **bfac_val, int **bfac_nr)
 {
     int    i;
     char **bfac_lines;
@@ -216,8 +216,8 @@ void read_bfac(const char *fn, int *n_bfac, double **bfac_val, int **bfac_nr)
 
 }
 
-void set_pdb_conf_bfac(int natoms, int nres, t_atoms *atoms, int n_bfac,
-                       double *bfac, int *bfac_nr, gmx_bool peratom)
+static void set_pdb_conf_bfac(int natoms, int nres, t_atoms *atoms, int n_bfac,
+                              double *bfac, int *bfac_nr, gmx_bool peratom)
 {
     real     bfac_min, bfac_max;
     int      i, n;
@@ -306,7 +306,7 @@ void set_pdb_conf_bfac(int natoms, int nres, t_atoms *atoms, int n_bfac,
     }
 }
 
-void pdb_legend(FILE *out, int natoms, int nres, t_atoms *atoms, rvec x[])
+static void pdb_legend(FILE *out, int natoms, int nres, t_atoms *atoms, rvec x[])
 {
     real bfac_min, bfac_max, xmin, ymin, zmin;
     int  i;
@@ -336,7 +336,7 @@ void pdb_legend(FILE *out, int natoms, int nres, t_atoms *atoms, rvec x[])
     }
 }
 
-void visualize_images(const char *fn, int ePBC, matrix box)
+static void visualize_images(const char *fn, int ePBC, matrix box)
 {
     t_atoms atoms;
     rvec   *img;
@@ -366,7 +366,7 @@ void visualize_images(const char *fn, int ePBC, matrix box)
     sfree(img);
 }
 
-void visualize_box(FILE *out, int a0, int r0, matrix box, rvec gridsize)
+static void visualize_box(FILE *out, int a0, int r0, matrix box, rvec gridsize)
 {
     int  *edge;
     rvec *vert, shift;
@@ -451,7 +451,7 @@ void visualize_box(FILE *out, int a0, int r0, matrix box, rvec gridsize)
     }
 }
 
-void calc_rotmatrix(rvec principal_axis, rvec targetvec, matrix rotmatrix)
+static void calc_rotmatrix(rvec principal_axis, rvec targetvec, matrix rotmatrix)
 {
     rvec rotvec;
     real ux, uy, uz, costheta, sintheta;
index 3a88b6a8f1549bbecfa76e55eed771997f4efafd..deb93af4379bd418c254335a4470c3861a3ff4f4 100644 (file)
@@ -137,9 +137,9 @@ static char *aname(const char *mname)
     return str;
 }
 
-void sort_ions(int nsa, int nw, int repl[], int index[],
-               t_atoms *atoms, rvec x[],
-               const char *p_name, const char *n_name)
+static void sort_ions(int nsa, int nw, int repl[], int index[],
+                      t_atoms *atoms, rvec x[],
+                      const char *p_name, const char *n_name)
 {
     int    i, j, k, r, np, nn, starta, startr, npi, nni;
     rvec  *xt;
index 4b61de02a5832eecee052a2a0d92de80041f94f7..50ec5bee3b111b20d7fb3107e45280fdb319e318 100644 (file)
@@ -59,8 +59,8 @@
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
 
-real calc_gyro(rvec x[], int gnx, int index[], t_atom atom[], real tm,
-               rvec gvec, rvec d, gmx_bool bQ, gmx_bool bRot, gmx_bool bMOI, matrix trans)
+static real calc_gyro(rvec x[], int gnx, int index[], t_atom atom[], real tm,
+                      rvec gvec, rvec d, gmx_bool bQ, gmx_bool bRot, gmx_bool bMOI, matrix trans)
 {
     int    i, ii, m;
     real   gyro, dx2, m0, Itot;
@@ -108,9 +108,9 @@ real calc_gyro(rvec x[], int gnx, int index[], t_atom atom[], real tm,
     return std::sqrt(gyro/tm);
 }
 
-void calc_gyro_z(rvec x[], matrix box,
-                 int gnx, int index[], t_atom atom[],
-                 int nz, real time, FILE *out)
+static void calc_gyro_z(rvec x[], matrix box,
+                        int gnx, int index[], t_atom atom[],
+                        int nz, real time, FILE *out)
 {
     static dvec   *inertia = nullptr;
     static double *tm      = nullptr;
index 498d30aa7d4a6de9893c33b42b5a27b2be6a1f60..85492b7ac710d00d8c9117e538f1ba782b597805 100644 (file)
 /* directions.                                                              */
 /****************************************************************************/
 
-void calc_h2order(const char *fn, int index[], int ngx, rvec **slDipole,
-                  real **slOrder, real *slWidth, int *nslices,
-                  const t_topology *top, int ePBC,
-                  int axis, gmx_bool bMicel, int micel[], int nmic,
-                  const gmx_output_env_t *oenv)
+static void calc_h2order(const char *fn, int index[], int ngx, rvec **slDipole,
+                         real **slOrder, real *slWidth, int *nslices,
+                         const t_topology *top, int ePBC,
+                         int axis, gmx_bool bMicel, int micel[], int nmic,
+                         const gmx_output_env_t *oenv)
 {
     rvec *x0,            /* coordinates with pbc */
           dipole,        /* dipole moment due to one molecules */
@@ -232,8 +232,8 @@ void calc_h2order(const char *fn, int index[], int ngx, rvec **slDipole,
     sfree(x0);       /* free memory used by coordinate arrays */
 }
 
-void h2order_plot(rvec dipole[], real order[], const char *afile,
-                  int nslices, real slWidth, const gmx_output_env_t *oenv)
+static void h2order_plot(rvec dipole[], real order[], const char *afile,
+                         int nslices, real slWidth, const gmx_output_env_t *oenv)
 {
     FILE       *ord;              /* xvgr files with order parameters  */
     int         slice;            /* loop index     */
index 25ef0044d53974188ad4963706fd13abeff7dcfa..9ba2b1b966882dbfa380a693a81a4e780c3e56fa 100644 (file)
@@ -114,8 +114,8 @@ static t_liedata *analyze_names(int nre, gmx_enxnm_t *names, const char *ligand)
     return ld;
 }
 
-real calc_lie(t_liedata *ld, t_energy ee[], real lie_lj, real lie_qq,
-              real fac_lj, real fac_qq)
+static real calc_lie(t_liedata *ld, t_energy ee[], real lie_lj, real lie_qq,
+                     real fac_lj, real fac_qq)
 {
     int  i;
     real lj_tot, qq_tot;
index 10bf7bbe863bb0ff7fd29f22f0c56565839e9886..bb9c7ac0a767c68b62047051a3e9dffe54423ffc 100644 (file)
@@ -105,14 +105,14 @@ typedef struct edipar
 
 
 
-void make_t_edx(struct edix *edx, int natoms, rvec *pos, int index[])
+static void make_t_edx(struct edix *edx, int natoms, rvec *pos, int index[])
 {
     edx->nr   = natoms;
     edx->anrs = index;
     edx->x    = pos;
 }
 
-void write_t_edx(FILE *fp, struct edix edx, const char *comment)
+static void write_t_edx(FILE *fp, struct edix edx, const char *comment)
 {
     /*here we copy only the pointers into the t_edx struct
        no data is copied and edx.box is ignored  */
@@ -124,7 +124,7 @@ void write_t_edx(FILE *fp, struct edix edx, const char *comment)
     }
 }
 
-int sscan_list(int *list[], const char *str, const char *listname)
+static int sscan_list(int *list[], const char *str, const char *listname)
 {
     /*this routine scans a string of the form 1,3-6,9 and returns the
        selected numbers (in this case 1 3 4 5 6 9) in NULL-terminated array of integers.
@@ -304,7 +304,7 @@ int sscan_list(int *list[], const char *str, const char *listname)
     return nvecs;
 } /*sscan_list*/
 
-void write_eigvec(FILE* fp, int natoms, int eig_list[], rvec** eigvecs, int nvec, const char *grouptitle, real steps[])
+static void write_eigvec(FILE* fp, int natoms, int eig_list[], rvec** eigvecs, int nvec, const char *grouptitle, real steps[])
 {
 /* eig_list is a zero-terminated list of indices into the eigvecs array.
    eigvecs are coordinates of eigenvectors
@@ -359,8 +359,8 @@ enum {
 #define MAGIC 670
 
 
-void write_the_whole_thing(FILE* fp, t_edipar *edpars, rvec** eigvecs,
-                           int nvec, int *eig_listen[], real* evStepList[])
+static void write_the_whole_thing(FILE* fp, t_edipar *edpars, rvec** eigvecs,
+                                  int nvec, int *eig_listen[], real* evStepList[])
 {
 /* write edi-file */
 
@@ -393,7 +393,7 @@ void write_the_whole_thing(FILE* fp, t_edipar *edpars, rvec** eigvecs,
     write_t_edx(fp, edpars->sori, "NORIGIN, XORIGIN");
 }
 
-int read_conffile(const char *confin, rvec **x)
+static int read_conffile(const char *confin, rvec **x)
 {
     t_topology  top;
     matrix      box;
@@ -404,8 +404,8 @@ int read_conffile(const char *confin, rvec **x)
 }
 
 
-void read_eigenvalues(int vecs[], const char *eigfile, real values[],
-                      gmx_bool bHesse, real kT, int natoms_average_struct)
+static void read_eigenvalues(int vecs[], const char *eigfile, real values[],
+                             gmx_bool bHesse, real kT, int natoms_average_struct)
 {
     int      neig, nrow, i;
     double **eigval;
@@ -497,15 +497,15 @@ static real *scan_vecparams(const char *str, const char * par, int nvecs)
 }
 
 
-void init_edx(struct edix *edx)
+static void init_edx(struct edix *edx)
 {
     edx->nr = 0;
     snew(edx->x, 1);
     snew(edx->anrs, 1);
 }
 
-void filter2edx(struct edix *edx, int nindex, int index[], int ngro,
-                int igro[], const rvec *x, const char* structure)
+static void filter2edx(struct edix *edx, int nindex, int index[], int ngro,
+                       int igro[], const rvec *x, const char* structure)
 {
 /* filter2edx copies coordinates from x to edx which are given in index
  */
@@ -530,9 +530,9 @@ void filter2edx(struct edix *edx, int nindex, int index[], int ngro,
     }
 }
 
-void get_structure(const t_atoms *atoms, const char *IndexFile,
-                   const char *StructureFile, struct edix *edx, int nfit,
-                   int ifit[], int nav, int index[])
+static void get_structure(const t_atoms *atoms, const char *IndexFile,
+                          const char *StructureFile, struct edix *edx, int nfit,
+                          int ifit[], int nav, int index[])
 {
     int     *igro; /*index corresponding to target or origin structure*/
     int      ngro;
index eb7552ad086b805b07aa03385ea61d653a05ff34..85468fbebedf1d368506117eacaacf88128675f5 100644 (file)
@@ -1483,7 +1483,7 @@ static int block2natoms(t_blocka *block)
     return natoms;
 }
 
-void merge_blocks(t_blocka *dest, t_blocka *source)
+static void merge_blocks(t_blocka *dest, t_blocka *source)
 {
     int     i, nra0, i0;
 
index 191b635b7f0c3c8591c02aea296cab9d11a93973..f59673d35b353fa483189ccb659fbef984341eb8 100644 (file)
@@ -63,7 +63,7 @@
 
 #define FARAWAY 10000
 
-int *res_ndx(t_atoms *atoms)
+static int *res_ndx(t_atoms *atoms)
 {
     int *rndx;
     int  i, r0;
@@ -82,7 +82,7 @@ int *res_ndx(t_atoms *atoms)
     return rndx;
 }
 
-int *res_natm(t_atoms *atoms)
+static int *res_natm(t_atoms *atoms)
 {
     int *natm;
     int  i, j, r0;
index 202eda2b1084569ee8361f9808b3926044cdff73..7035b3be468aac40eefe4655ee5d64be850839f7 100644 (file)
@@ -325,13 +325,13 @@ static void calc_dist(real rcut, gmx_bool bPBC, int ePBC, matrix box, rvec x[],
     *rmax = std::sqrt(rmax2);
 }
 
-void dist_plot(const char *fn, const char *afile, const char *dfile,
-               const char *nfile, const char *rfile, const char *xfile,
-               real rcut, gmx_bool bMat, const t_atoms *atoms,
-               int ng, int *index[], int gnx[], char *grpn[], gmx_bool bSplit,
-               gmx_bool bMin, int nres, int *residue, gmx_bool bPBC, int ePBC,
-               gmx_bool bGroup, gmx_bool bEachResEachTime, gmx_bool bPrintResName,
-               const gmx_output_env_t *oenv)
+static void dist_plot(const char *fn, const char *afile, const char *dfile,
+                      const char *nfile, const char *rfile, const char *xfile,
+                      real rcut, gmx_bool bMat, const t_atoms *atoms,
+                      int ng, int *index[], int gnx[], char *grpn[], gmx_bool bSplit,
+                      gmx_bool bMin, int nres, int *residue, gmx_bool bPBC, int ePBC,
+                      gmx_bool bGroup, gmx_bool bEachResEachTime, gmx_bool bPrintResName,
+                      const gmx_output_env_t *oenv)
 {
     FILE            *atm, *dist, *num;
     t_trxstatus     *trxout;
@@ -597,7 +597,7 @@ void dist_plot(const char *fn, const char *afile, const char *dfile,
     sfree(x0);
 }
 
-int find_residues(const t_atoms *atoms, int n, int index[], int **resindex)
+static int find_residues(const t_atoms *atoms, int n, int index[], int **resindex)
 {
     int  i;
     int  nres      = 0, resnr, presnr = 0;
@@ -629,7 +629,7 @@ int find_residues(const t_atoms *atoms, int n, int index[], int **resindex)
     return nres;
 }
 
-void dump_res(FILE *out, int nres, int *resindex, int index[])
+static void dump_res(FILE *out, int nres, int *resindex, int index[])
 {
     int i, j;
 
index 58c81c52e9fda524c220c849bfef36ca538e45e2..eabc5a6ea47e675752ab1ea2ec331d21e7818b48 100644 (file)
@@ -109,9 +109,9 @@ static gmx_bool in_data(t_corr *curr, int nx00)
     return curr->nframes-curr->n_offs[nx00];
 }
 
-t_corr *init_corr(int nrgrp, int type, int axis, real dim_factor,
-                  int nmol, gmx_bool bTen, gmx_bool bMass, real dt, const t_topology *top,
-                  real beginfit, real endfit)
+static t_corr *init_corr(int nrgrp, int type, int axis, real dim_factor,
+                         int nmol, gmx_bool bTen, gmx_bool bMass, real dt, const t_topology *top,
+                         real beginfit, real endfit)
 {
     t_corr  *curr;
     int      i;
@@ -635,11 +635,11 @@ static void printmol(t_corr *curr, const char *fn,
  * fx and nx are file pointers to things like read_first_x and
  * read_next_x
  */
-int corr_loop(t_corr *curr, const char *fn, const t_topology *top, int ePBC,
-              gmx_bool bMol, int gnx[], int *index[],
-              t_calc_func *calc1, gmx_bool bTen, int *gnx_com, int *index_com[],
-              real dt, real t_pdb, rvec **x_pdb, matrix box_pdb,
-              const gmx_output_env_t *oenv)
+static int corr_loop(t_corr *curr, const char *fn, const t_topology *top, int ePBC,
+                     gmx_bool bMol, int gnx[], int *index[],
+                     t_calc_func *calc1, gmx_bool bTen, int *gnx_com, int *index_com[],
+                     real dt, real t_pdb, rvec **x_pdb, matrix box_pdb,
+                     const gmx_output_env_t *oenv)
 {
     rvec            *x[2];  /* the coordinates to read */
     rvec            *xa[2]; /* the coordinates to calculate displacements for */
@@ -867,12 +867,12 @@ static void index_atom2mol(int *n, int *index, const t_block *mols)
     *n = nmol;
 }
 
-void do_corr(const char *trx_file, const char *ndx_file, const char *msd_file,
-             const char *mol_file, const char *pdb_file, real t_pdb,
-             int nrgrp, t_topology *top, int ePBC,
-             gmx_bool bTen, gmx_bool bMW, gmx_bool bRmCOMM,
-             int type, real dim_factor, int axis,
-             real dt, real beginfit, real endfit, const gmx_output_env_t *oenv)
+static void do_corr(const char *trx_file, const char *ndx_file, const char *msd_file,
+                    const char *mol_file, const char *pdb_file, real t_pdb,
+                    int nrgrp, t_topology *top, int ePBC,
+                    gmx_bool bTen, gmx_bool bMW, gmx_bool bRmCOMM,
+                    int type, real dim_factor, int axis,
+                    real dt, real beginfit, real endfit, const gmx_output_env_t *oenv)
 {
     t_corr        *msd;
     int           *gnx;   /* the selected groups' sizes */
index 2b5f1bb15d6b99189264feff7ae90080903bf7cb..674046c64ea69a5a14a21aa7c925593e07e961f3 100644 (file)
@@ -372,12 +372,12 @@ static void check_length(real length, int a, int b)
     }
 }
 
-void calc_order(const char *fn, int *index, int *a, rvec **order,
-                real ***slOrder, real *slWidth, int nslices, gmx_bool bSliced,
-                gmx_bool bUnsat, const t_topology *top, int ePBC, int ngrps, int axis,
-                gmx_bool permolecule, gmx_bool radial, gmx_bool distcalc, const char *radfn,
-                real ***distvals,
-                const gmx_output_env_t *oenv)
+static void calc_order(const char *fn, int *index, int *a, rvec **order,
+                       real ***slOrder, real *slWidth, int nslices, gmx_bool bSliced,
+                       gmx_bool bUnsat, const t_topology *top, int ePBC, int ngrps, int axis,
+                       gmx_bool permolecule, gmx_bool radial, gmx_bool distcalc, const char *radfn,
+                       real ***distvals,
+                       const gmx_output_env_t *oenv)
 {
     /* if permolecule = TRUE, order parameters will be calculed per molecule
      * and stored in slOrder with #slices = # molecules */
@@ -751,9 +751,9 @@ void calc_order(const char *fn, int *index, int *a, rvec **order,
 }
 
 
-void order_plot(rvec order[], real *slOrder[], const char *afile, const char *bfile,
-                const char *cfile, int ngrps, int nslices, real slWidth, gmx_bool bSzonly,
-                gmx_bool permolecule, real **distvals, const gmx_output_env_t *oenv)
+static void order_plot(rvec order[], real *slOrder[], const char *afile, const char *bfile,
+                       const char *cfile, int ngrps, int nslices, real slWidth, gmx_bool bSzonly,
+                       gmx_bool permolecule, real **distvals, const gmx_output_env_t *oenv)
 {
     FILE       *ord, *slOrd;      /* xvgr files with order parameters  */
     int         atom, slice;      /* atom corresponding to order para.*/
@@ -832,7 +832,7 @@ void order_plot(rvec order[], real *slOrder[], const char *afile, const char *bf
     xvgrclose(slOrd);
 }
 
-void write_bfactors(t_filenm  *fnm, int nfile, int *index, int *a, int nslices, int ngrps, real **order, const t_topology *top, real **distvals, gmx_output_env_t *oenv)
+static void write_bfactors(t_filenm  *fnm, int nfile, int *index, int *a, int nslices, int ngrps, real **order, const t_topology *top, real **distvals, gmx_output_env_t *oenv)
 {
     /*function to write order parameters as B factors in PDB file using
           first frame of trajectory*/
index 277c035a880ebaedb02cc87541f19fdbbb746b7d..646dc07f3c120b497ad74cf19029c35a9d5d9b7a 100644 (file)
@@ -75,7 +75,7 @@ static int ce = 0, cb = 0;
 
 /* this routine integrates the array data and returns the resulting array */
 /* routine uses simple trapezoid rule                                     */
-void p_integrate(double *result, double data[], int ndata, double slWidth)
+static void p_integrate(double *result, double data[], int ndata, double slWidth)
 {
     int    i, slice;
     double sum;
@@ -100,13 +100,13 @@ void p_integrate(double *result, double data[], int ndata, double slWidth)
     return;
 }
 
-void calc_potential(const char *fn, int **index, int gnx[],
-                    double ***slPotential, double ***slCharge,
-                    double ***slField, int *nslices,
-                    const t_topology *top, int ePBC,
-                    int axis, int nr_grps, double *slWidth,
-                    double fudge_z, gmx_bool bSpherical, gmx_bool bCorrect,
-                    const gmx_output_env_t *oenv)
+static void calc_potential(const char *fn, int **index, int gnx[],
+                           double ***slPotential, double ***slCharge,
+                           double ***slField, int *nslices,
+                           const t_topology *top, int ePBC,
+                           int axis, int nr_grps, double *slWidth,
+                           double fudge_z, gmx_bool bSpherical, gmx_bool bCorrect,
+                           const gmx_output_env_t *oenv)
 {
     rvec        *x0;     /* coordinates without pbc */
     matrix       box;    /* box (3x3) */
@@ -360,10 +360,10 @@ void calc_potential(const char *fn, int **index, int gnx[],
     sfree(x0); /* free memory used by coordinate array */
 }
 
-void plot_potential(double *potential[], double *charge[], double *field[],
-                    const char *afile, const char *bfile, const char *cfile,
-                    int nslices, int nr_grps, const char *grpname[], double slWidth,
-                    const gmx_output_env_t *oenv)
+static void plot_potential(double *potential[], double *charge[], double *field[],
+                           const char *afile, const char *bfile, const char *cfile,
+                           int nslices, int nr_grps, const char *grpname[], double slWidth,
+                           const gmx_output_env_t *oenv)
 {
     FILE       *pot,     /* xvgr file with potential */
     *cha,                /* xvgr file with charges   */
index 312aaa4991b31c849198fb40f77e66f7ef1a2f07..6a5c037b372ff355f83d89b8ad2291ee94577a5b 100644 (file)
@@ -56,7 +56,7 @@
 #include "gromacs/utility/smalloc.h"
 
 
-void
+static void
 calc_principal_axes(const t_topology *top,
                     rvec             *x,
                     int              *index,
index 4cf174ed5156cf67cc00eb381f79ed8511d00fce..ae49501f952192fc31861b31c317dbafa7a287c5 100644 (file)
@@ -611,7 +611,7 @@ static void calc_rms(int nind, int nframes,
     }
 }
 
-real rms_diff(int natom, real **d, real **d_r)
+static real rms_diff(int natom, real **d, real **d_r)
 {
     int  i, j;
     real r, r2;
index 354f092b02a9539586ee7cd811ede5568450044f..e2e3ea795c0f9c7c8b92712f19d639c0661eef9a 100644 (file)
@@ -89,8 +89,8 @@ static real find_pdb_bfac(const t_atoms *atoms, t_resinfo *ri, char *atomnm)
     return atoms->pdbinfo[i].bfac;
 }
 
-void correlate_aniso(const char *fn, t_atoms *ref, t_atoms *calc,
-                     const gmx_output_env_t *oenv)
+static void correlate_aniso(const char *fn, t_atoms *ref, t_atoms *calc,
+                            const gmx_output_env_t *oenv)
 {
     FILE *fp;
     int   i, j;
@@ -153,7 +153,7 @@ static void average_residues(double f[], double **U, int uind,
     }
 }
 
-void print_dir(FILE *fp, real *Uaver)
+static void print_dir(FILE *fp, real *Uaver)
 {
     real eigvec[DIM*DIM];
     real tmp[DIM*DIM];
index a74cb7b9229b7f15d6fc054bd1a7e10bed17171a..02da8ac8ae01e695f084f581e06a46913e74ce80 100644 (file)
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/smalloc.h"
 
-real pot(real x, real qq, real c6, real cn, int npow)
+static real pot(real x, real qq, real c6, real cn, int npow)
 {
     return cn*pow(x, -npow)-c6/gmx::power6(x)+qq*ONE_4PI_EPS0/x;
 }
 
-real bhpot(real x, real A, real B, real C)
+static real bhpot(real x, real A, real B, real C)
 {
     return A*std::exp(-B*x) - C/gmx::power6(x);
 }
 
-real dpot(real x, real qq, real c6, real cn, int npow)
+static real dpot(real x, real qq, real c6, real cn, int npow)
 {
     return -(npow*cn*std::pow(x, -npow-1)-6*c6/(x*gmx::power6(x))+qq*ONE_4PI_EPS0/gmx::square(x));
 }
index d166e44d2d9fe0da167d5c9e6d7f4e90d3c14083..ed62da7c5d94cf82fb396e64404c68631e033d4a 100644 (file)
@@ -115,7 +115,7 @@ static void calc_com_pbc(int nrefat, const t_topology *top, rvec x[], t_pbc *pbc
     }
 }
 
-void spol_atom2molindex(int *n, int *index, const t_block *mols)
+static void spol_atom2molindex(int *n, int *index, const t_block *mols)
 {
     int nmol, i, j, m;
 
index 45d8686b897220fba48e76722587fb98ecc3c51c..51d48f2b5f0a68c9ede9e19434e305435f9de322 100644 (file)
@@ -463,7 +463,7 @@ static void mk_filenm(char *base, const char *ext, int ndigit, int file_nr,
     std::strcat(out_file, ext);
 }
 
-void check_trr(const char *fn)
+static void check_trr(const char *fn)
 {
     if (fn2ftp(fn) != efTRR)
     {
@@ -471,7 +471,7 @@ void check_trr(const char *fn)
     }
 }
 
-void do_trunc(const char *fn, real t0)
+static void do_trunc(const char *fn, real t0)
 {
     t_fileio        *in;
     FILE            *fp;
index 55f60a95b773d8af6b50bf6fe12e8f98a88f17e7..334995fe7d1dc9f1b6be9007ff33527dc7297da2 100644 (file)
@@ -323,7 +323,7 @@ typedef struct
 } t_UmbrellaOptions;
 
 //! Make an umbrella window (may contain several histograms)
-t_UmbrellaWindow * initUmbrellaWindows(int nwin)
+static t_UmbrellaWindow * initUmbrellaWindows(int nwin)
 {
     t_UmbrellaWindow *win;
     int               i;
@@ -344,7 +344,7 @@ t_UmbrellaWindow * initUmbrellaWindows(int nwin)
 }
 
 //! Delete an umbrella window (may contain several histograms)
-void freeUmbrellaWindows(t_UmbrellaWindow *win, int nwin)
+static void freeUmbrellaWindows(t_UmbrellaWindow *win, int nwin)
 {
     int i, j;
     for (i = 0; i < nwin; i++)
@@ -393,7 +393,7 @@ void freeUmbrellaWindows(t_UmbrellaWindow *win, int nwin)
 /*! \brief
  * Read and setup tabulated umbrella potential
  */
-void setup_tab(const char *fn, t_UmbrellaOptions *opt)
+static void setup_tab(const char *fn, t_UmbrellaOptions *opt)
 {
     int      i, ny, nl;
     double **y;
@@ -432,7 +432,7 @@ void setup_tab(const char *fn, t_UmbrellaOptions *opt)
 }
 
 //! Read the header of an PDO file (position, force const, nr of groups)
-void read_pdo_header(FILE * file, t_UmbrellaHeader * header, t_UmbrellaOptions *opt)
+static void read_pdo_header(FILE * file, t_UmbrellaHeader * header, t_UmbrellaOptions *opt)
 {
     char               line[2048];
     char               Buffer0[256], Buffer1[256], Buffer2[256], Buffer3[256], Buffer4[256];
@@ -569,10 +569,10 @@ static char *fgets3(FILE *fp, char ptr[], int *len)
  *         At the moment, this warning is avoided by hiding the format string
  *         the variable fmtlf.
  */
-void read_pdo_data(FILE * file, t_UmbrellaHeader * header,
-                   int fileno, t_UmbrellaWindow * win,
-                   t_UmbrellaOptions *opt,
-                   gmx_bool bGetMinMax, real *mintmp, real *maxtmp)
+static void read_pdo_data(FILE * file, t_UmbrellaHeader * header,
+                          int fileno, t_UmbrellaWindow * win,
+                          t_UmbrellaOptions *opt,
+                          gmx_bool bGetMinMax, real *mintmp, real *maxtmp)
 {
     int                i, inttemp, bins, count, ntot;
     real               minval, maxval, minfound = 1e20, maxfound = -1e20;
@@ -780,7 +780,7 @@ void read_pdo_data(FILE * file, t_UmbrellaHeader * header,
  * by this routine (not recommended). Since we now support autocorrelations, it is better to set
  * an appropriate autocorrelation times instead of using this function.
  */
-void enforceEqualWeights(t_UmbrellaWindow * window, int nWindows)
+static void enforceEqualWeights(t_UmbrellaWindow * window, int nWindows)
 {
     int    i, k, j, NEnforced;
     double ratio;
@@ -806,7 +806,7 @@ void enforceEqualWeights(t_UmbrellaWindow * window, int nWindows)
 
 /*! \brief Simple linear interpolation between two given tabulated points
  */
-double tabulated_pot(double dist, t_UmbrellaOptions *opt)
+static double tabulated_pot(double dist, t_UmbrellaOptions *opt)
 {
     int    jl, ju;
     double pl, pu, dz, dp;
@@ -833,8 +833,8 @@ double tabulated_pot(double dist, t_UmbrellaOptions *opt)
  * After rapid convergence (using only substiantal contributions), we always switch to
  * full precision.
  */
-void setup_acc_wham(double *profile, t_UmbrellaWindow * window, int nWindows,
-                    t_UmbrellaOptions *opt)
+static void setup_acc_wham(double *profile, t_UmbrellaWindow * window, int nWindows,
+                           t_UmbrellaOptions *opt)
 {
     int           i, j, k, nGrptot = 0, nContrib = 0, nTot = 0;
     double        U, min = opt->min, dz = opt->dz, temp, ztot_half, distance, ztot, contrib1, contrib2;
@@ -934,8 +934,8 @@ void setup_acc_wham(double *profile, t_UmbrellaWindow * window, int nWindows,
 }
 
 //! Compute the PMF (one of the two main WHAM routines)
-void calc_profile(double *profile, t_UmbrellaWindow * window, int nWindows,
-                  t_UmbrellaOptions *opt, gmx_bool bExact)
+static void calc_profile(double *profile, t_UmbrellaWindow * window, int nWindows,
+                         t_UmbrellaOptions *opt, gmx_bool bExact)
 {
     double ztot_half, ztot, min = opt->min, dz = opt->dz;
 
@@ -1001,8 +1001,8 @@ void calc_profile(double *profile, t_UmbrellaWindow * window, int nWindows,
 }
 
 //! Compute the free energy offsets z (one of the two main WHAM routines)
-double calc_z(double * profile, t_UmbrellaWindow * window, int nWindows,
-              t_UmbrellaOptions *opt, gmx_bool bExact)
+static double calc_z(double * profile, t_UmbrellaWindow * window, int nWindows,
+                     t_UmbrellaOptions *opt, gmx_bool bExact)
 {
     double min     = opt->min, dz = opt->dz, ztot_half, ztot;
     double maxglob = -1e20;
@@ -1095,7 +1095,7 @@ double calc_z(double * profile, t_UmbrellaWindow * window, int nWindows,
 }
 
 //! Make PMF symmetric around 0 (useful e.g. for membranes)
-void symmetrizeProfile(double* profile, t_UmbrellaOptions *opt)
+static void symmetrizeProfile(double* profile, t_UmbrellaOptions *opt)
 {
     int     i, j, bins = opt->bins;
     double *prof2, min = opt->min, max = opt->max, dz = opt->dz, zsym, deltaz, profsym;
@@ -1135,7 +1135,7 @@ void symmetrizeProfile(double* profile, t_UmbrellaOptions *opt)
 }
 
 //! Set energy unit (kJ/mol,kT,kCal/mol) and set it to zero at opt->zProf0
-void prof_normalization_and_unit(double * profile, t_UmbrellaOptions *opt)
+static void prof_normalization_and_unit(double * profile, t_UmbrellaOptions *opt)
 {
     int    i, bins, imin;
     double unit_factor = 1., diff;
@@ -1203,7 +1203,7 @@ void prof_normalization_and_unit(double * profile, t_UmbrellaOptions *opt)
 }
 
 //! Make an array of random integers (used for bootstrapping)
-void getRandomIntArray(int nPull, int blockLength, int* randomArray, gmx::DefaultRandomEngine * rng)
+static void getRandomIntArray(int nPull, int blockLength, int* randomArray, gmx::DefaultRandomEngine * rng)
 {
     gmx::UniformIntDistribution<int> dist(0, blockLength-1);
 
@@ -1240,8 +1240,8 @@ void getRandomIntArray(int nPull, int blockLength, int* randomArray, gmx::Defaul
  * This is used when bootstapping new trajectories and thereby create new histogtrams,
  * but it is not required if we bootstrap complete histograms.
  */
-void copy_pullgrp_to_synthwindow(t_UmbrellaWindow *synthWindow,
-                                 t_UmbrellaWindow *thisWindow, int pullid)
+static void copy_pullgrp_to_synthwindow(t_UmbrellaWindow *synthWindow,
+                                        t_UmbrellaWindow *thisWindow, int pullid)
 {
     synthWindow->N       [0] = thisWindow->N        [pullid];
     synthWindow->Histo   [0] = thisWindow->Histo    [pullid];
@@ -1259,8 +1259,8 @@ void copy_pullgrp_to_synthwindow(t_UmbrellaWindow *synthWindow,
  * which are distributed according to the histograms. Required to generate
  * the "synthetic" histograms for the Bootstrap method
  */
-void calc_cumulatives(t_UmbrellaWindow *window, int nWindows,
-                      t_UmbrellaOptions *opt, const char *fnhist, const char *xlabel)
+static void calc_cumulatives(t_UmbrellaWindow *window, int nWindows,
+                             t_UmbrellaOptions *opt, const char *fnhist, const char *xlabel)
 {
     int    i, j, k, nbin;
     double last;
@@ -1324,7 +1324,7 @@ void calc_cumulatives(t_UmbrellaWindow *window, int nWindows,
  *
  *  This is used to generate a random sequence distributed according to a histogram
  */
-void searchCumulative(double xx[], int n, double x, int *j)
+static void searchCumulative(double xx[], int n, double x, int *j)
 {
     int ju, jm, jl;
 
@@ -1357,8 +1357,8 @@ void searchCumulative(double xx[], int n, double x, int *j)
 }
 
 //! Bootstrap new trajectories and thereby generate new (bootstrapped) histograms
-void create_synthetic_histo(t_UmbrellaWindow *synthWindow, t_UmbrellaWindow *thisWindow,
-                            int pullid, t_UmbrellaOptions *opt)
+static void create_synthetic_histo(t_UmbrellaWindow *synthWindow, t_UmbrellaWindow *thisWindow,
+                                   int pullid, t_UmbrellaOptions *opt)
 {
     int    N, i, nbins, r_index, ibin;
     double r, tausteps = 0.0, a, ap, dt, x, invsqrt2, g, y, sig = 0., z, mu = 0.;
@@ -1502,8 +1502,8 @@ void create_synthetic_histo(t_UmbrellaWindow *synthWindow, t_UmbrellaWindow *thi
  * If bs_index>=0, a number is added to the output file name to allow the ouput of all
  * sets of bootstrapped histograms.
  */
-void print_histograms(const char *fnhist, t_UmbrellaWindow * window, int nWindows,
-                      int bs_index, t_UmbrellaOptions *opt, const char *xlabel)
+static void print_histograms(const char *fnhist, t_UmbrellaWindow * window, int nWindows,
+                             int bs_index, t_UmbrellaOptions *opt, const char *xlabel)
 {
     char *fn = nullptr, *buf = nullptr, title[256];
     FILE *fp;
@@ -1549,7 +1549,7 @@ void print_histograms(const char *fnhist, t_UmbrellaWindow * window, int nWindow
 }
 
 //! Used for qsort to sort random numbers
-int func_wham_is_larger(const void *a, const void *b)
+static int func_wham_is_larger(const void *a, const void *b)
 {
     double *aa, *bb;
     aa = (double*)a;
@@ -1569,7 +1569,7 @@ int func_wham_is_larger(const void *a, const void *b)
 }
 
 //! Make random weights for histograms for the Bayesian bootstrap of complete histograms)
-void setRandomBsWeights(t_UmbrellaWindow *synthwin, int nAllPull, t_UmbrellaOptions *opt)
+static void setRandomBsWeights(t_UmbrellaWindow *synthwin, int nAllPull, t_UmbrellaOptions *opt)
 {
     int     i;
     double *r;
@@ -1604,9 +1604,9 @@ void setRandomBsWeights(t_UmbrellaWindow *synthwin, int nAllPull, t_UmbrellaOpti
 }
 
 //! The main bootstrapping routine
-void do_bootstrapping(const char *fnres, const char* fnprof, const char *fnhist,
-                      const char *xlabel, char* ylabel, double *profile,
-                      t_UmbrellaWindow * window, int nWindows, t_UmbrellaOptions *opt)
+static void do_bootstrapping(const char *fnres, const char* fnprof, const char *fnhist,
+                             const char *xlabel, char* ylabel, double *profile,
+                             t_UmbrellaWindow * window, int nWindows, t_UmbrellaOptions *opt)
 {
     t_UmbrellaWindow * synthWindow;
     double            *bsProfile, *bsProfiles_av, *bsProfiles_av2, maxchange = 1e20, tmp, stddev;
@@ -1802,7 +1802,7 @@ void do_bootstrapping(const char *fnres, const char* fnprof, const char *fnhist,
 }
 
 //! Return type of input file based on file extension (xvg, pdo, or tpr)
-int whaminFileType(char *fn)
+static int whaminFileType(char *fn)
 {
     int len;
     len = std::strlen(fn);
@@ -1826,8 +1826,8 @@ int whaminFileType(char *fn)
 }
 
 //! Read the files names in pdo-files.dat, pullf/x-files.dat, tpr-files.dat
-void read_wham_in(const char *fn, char ***filenamesRet, int *nfilesRet,
-                  t_UmbrellaOptions *opt)
+static void read_wham_in(const char *fn, char ***filenamesRet, int *nfilesRet,
+                         t_UmbrellaOptions *opt)
 {
     char **filename = nullptr, tmp[WHAM_MAXFILELEN+2];
     int    nread, sizenow, i, block = 1;
@@ -1868,7 +1868,7 @@ void read_wham_in(const char *fn, char ***filenamesRet, int *nfilesRet,
 }
 
 //! Open a file or a pipe to a gzipped file
-FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPipeOpen)
+static FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPipeOpen)
 {
     char            Buffer[1024], gunzip[1024], *Path = nullptr;
     FILE           *pipe   = nullptr;
@@ -1938,7 +1938,7 @@ FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPipeOpen)
 }
 
 //! Close file or pipe
-void pdo_close_file(FILE *fp)
+static void pdo_close_file(FILE *fp)
 {
 #if HAVE_PIPES
     pclose(fp);
@@ -1948,8 +1948,8 @@ void pdo_close_file(FILE *fp)
 }
 
 //! Reading all pdo files
-void read_pdo_files(char **fn, int nfiles, t_UmbrellaHeader* header,
-                    t_UmbrellaWindow *window, t_UmbrellaOptions *opt)
+static void read_pdo_files(char **fn, int nfiles, t_UmbrellaHeader* header,
+                           t_UmbrellaWindow *window, t_UmbrellaOptions *opt)
 {
     FILE    *file;
     real     mintmp, maxtmp, done = 0.;
@@ -2049,7 +2049,7 @@ void read_pdo_files(char **fn, int nfiles, t_UmbrellaHeader* header,
 #define int2YN(a) (((a) == 0) ? ("N") : ("Y"))
 
 //! Read pull groups from a tpr file (including position, force const, geometry, number of groups)
-void read_tpr_header(const char *fn, t_UmbrellaHeader* header, t_UmbrellaOptions *opt, t_coordselection *coordsel)
+static void read_tpr_header(const char *fn, t_UmbrellaHeader* header, t_UmbrellaOptions *opt, t_coordselection *coordsel)
 {
     t_inputrec      irInstance;
     t_inputrec     *ir = &irInstance;
@@ -2186,24 +2186,12 @@ void read_tpr_header(const char *fn, t_UmbrellaHeader* header, t_UmbrellaOptions
     first = 0;
 }
 
-//! 2-norm in a ndim-dimensional space
-double dist_ndim(double **dx, int ndim, int line)
-{
-    int    i;
-    double r2 = 0.;
-    for (i = 0; i < ndim; i++)
-    {
-        r2 += gmx::square(dx[i][line]);
-    }
-    return std::sqrt(r2);
-}
-
 //! Read pullx.xvg or pullf.xvg
-void read_pull_xf(const char *fn, t_UmbrellaHeader * header,
-                  t_UmbrellaWindow * window,
-                  t_UmbrellaOptions *opt,
-                  gmx_bool bGetMinMax, real *mintmp, real *maxtmp,
-                  t_coordselection *coordsel)
+static void read_pull_xf(const char *fn, t_UmbrellaHeader * header,
+                         t_UmbrellaWindow * window,
+                         t_UmbrellaOptions *opt,
+                         gmx_bool bGetMinMax, real *mintmp, real *maxtmp,
+                         t_coordselection *coordsel)
 {
     double        **y = nullptr, pos = 0., t, force, time0 = 0., dt;
     int             ny, nt, bins, ibin, i, g, gUsed, dstep = 1;
@@ -2533,9 +2521,9 @@ void read_pull_xf(const char *fn, t_UmbrellaHeader * header,
 }
 
 //! read pullf-files.dat or pullx-files.dat and tpr-files.dat
-void read_tpr_pullxf_files(char **fnTprs, char **fnPull, int nfiles,
-                           t_UmbrellaHeader* header,
-                           t_UmbrellaWindow *window, t_UmbrellaOptions *opt)
+static void read_tpr_pullxf_files(char **fnTprs, char **fnPull, int nfiles,
+                                  t_UmbrellaHeader* header,
+                                  t_UmbrellaWindow *window, t_UmbrellaOptions *opt)
 {
     int  i;
     real mintmp, maxtmp;
@@ -2622,7 +2610,7 @@ void read_tpr_pullxf_files(char **fnTprs, char **fnPull, int nfiles,
  * Note: Here we consider tau[int] := int_0^inf ACF(t) as the integrated autocorrelation times.
  * The factor `g := 1 + 2*tau[int]` subsequently enters the uncertainty.
  */
-void readIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins, const char* fn)
+static void readIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins, const char* fn)
 {
     int      nlines, ny, i, ig;
     double **iact;
@@ -2665,7 +2653,7 @@ void readIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins, con
  * If opt->bAllowReduceIact==FALSE, the ACTs are never reduced, only increased
  * by the smoothing
  */
-void smoothIact(t_UmbrellaWindow *window, int nwins, t_UmbrellaOptions *opt)
+static void smoothIact(t_UmbrellaWindow *window, int nwins, t_UmbrellaOptions *opt)
 {
     int    i, ig, j, jg;
     double pos, dpos2, siglim, siglim2, gaufact, invtwosig2, w, weight, tausm;
@@ -2719,8 +2707,8 @@ void smoothIact(t_UmbrellaWindow *window, int nwins, t_UmbrellaOptions *opt)
 
 /*! \brief Try to compute the autocorrelation time for each umbrealla window
  */
-void calcIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins,
-                                        t_UmbrellaOptions *opt, const char *fn, const char *xlabel)
+static void calcIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins,
+                                               t_UmbrellaOptions *opt, const char *fn, const char *xlabel)
 {
     int   i, ig, ncorr, ntot, j, k, *count, restart;
     real *corr, c0, dt, tmp;
@@ -2887,7 +2875,7 @@ void calcIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins,
 /*! \brief
  * compute average and sigma of each umbrella histogram
  */
-void averageSigma(t_UmbrellaWindow *window, int nwins)
+static void averageSigma(t_UmbrellaWindow *window, int nwins)
 {
     int  i, ig, ntot, k;
     real av, sum2, sig, diff, *ztime, nSamplesIndep;
@@ -2936,7 +2924,7 @@ void averageSigma(t_UmbrellaWindow *window, int nwins)
 /*! \brief
  * Use histograms to compute average force on pull group.
  */
-void computeAverageForce(t_UmbrellaWindow *window, int nWindows, t_UmbrellaOptions *opt)
+static void computeAverageForce(t_UmbrellaWindow *window, int nWindows, t_UmbrellaOptions *opt)
 {
     int    i, j, bins = opt->bins, k;
     double dz, min = opt->min, max = opt->max, displAv, temp, distance, ztot, ztot_half, w, weight;
@@ -2999,8 +2987,8 @@ void computeAverageForce(t_UmbrellaWindow *window, int nWindows, t_UmbrellaOptio
 /*! \brief
  * Check if the complete reaction coordinate is covered by the histograms
  */
-void  checkReactionCoordinateCovered(t_UmbrellaWindow *window, int nwins,
-                                     t_UmbrellaOptions *opt)
+static void  checkReactionCoordinateCovered(t_UmbrellaWindow *window, int nwins,
+                                            t_UmbrellaOptions *opt)
 {
     int  i, ig, j, bins = opt->bins, bBoundary;
     real avcount = 0, z, relcount, *count;
@@ -3042,7 +3030,7 @@ void  checkReactionCoordinateCovered(t_UmbrellaWindow *window, int nwins,
  *
  * This speeds up the convergence by roughly a factor of 2
  */
-void guessPotByIntegration(t_UmbrellaWindow *window, int nWindows, t_UmbrellaOptions *opt, const char *xlabel)
+static void guessPotByIntegration(t_UmbrellaWindow *window, int nWindows, t_UmbrellaOptions *opt, const char *xlabel)
 {
     int    i, j, ig, bins = opt->bins, nHist, winmin, groupmin;
     double dz, min = opt->min, *pot, pos, hispos, dist, diff, fAv, distmin, *f;
@@ -3165,7 +3153,7 @@ static int wordcount(char *ptr)
  *
  * TO DO: ptr=fgets(...) is never freed (small memory leak)
  */
-void readPullCoordSelection(t_UmbrellaOptions *opt, char **fnTpr, int nTpr)
+static void readPullCoordSelection(t_UmbrellaOptions *opt, char **fnTpr, int nTpr)
 {
     FILE *fp;
     int   i, iline, n, len = STRLEN, temp;
index 669b75eb7ad041e464db861de657daa67bd3b3ab..52d4fb8faad8fe259e2b41ac1f8ce6ec65748dbe 100644 (file)
@@ -74,7 +74,7 @@ static gmx_bool *bPhobics(int nres, char *resnm[])
     return bb;
 }
 
-void wheel(const char *fn, int nres, char *resnm[], int r0, real rot0, char *title)
+static void wheel(const char *fn, int nres, char *resnm[], int r0, real rot0, char *title)
 {
     const real fontsize  = 16;
     const real gray      = 0.9;
@@ -152,7 +152,7 @@ void wheel(const char *fn, int nres, char *resnm[], int r0, real rot0, char *tit
     ps_close(out);
 }
 
-void wheel2(const char *fn, int nres, char *resnm[], real rot0, char *title)
+static void wheel2(const char *fn, int nres, char *resnm[], real rot0, char *title)
 {
     const real fontsize  = 14;
     const real gray      = 0.9;
index 90f0448fb10b20cbd37b0ada91a8fbb96de5b94b..185844fc9a0f76a91aee900672eb91a0fbcda12c 100644 (file)
@@ -114,7 +114,7 @@ enum {
     ecSel, ecHalves, ecAdd, ecSub, ecMult, ecDiv, ecNR
 };
 
-void get_params(const char *mpin, const char *mpout, t_psrec *psr)
+static void get_params(const char *mpin, const char *mpout, t_psrec *psr)
 {
     static const char *gmx_bools[BOOL_NR+1]  = { "no", "yes", nullptr };
     /* this must correspond to t_rgb *linecolors[] below */
@@ -197,7 +197,7 @@ t_rgb blue  = { 0, 0, 1 };
 /* this must correspond to *colors[] in get_params */
 t_rgb *linecolors[] = { nullptr, &black, &white, nullptr };
 
-gmx_bool diff_maps(int nmap1, t_mapping *map1, int nmap2, t_mapping *map2)
+static gmx_bool diff_maps(int nmap1, t_mapping *map1, int nmap2, t_mapping *map2)
 {
     int      i;
     gmx_bool bDiff, bColDiff = FALSE;
@@ -235,8 +235,8 @@ gmx_bool diff_maps(int nmap1, t_mapping *map1, int nmap2, t_mapping *map2)
     return bDiff;
 }
 
-void leg_discrete(t_psdata ps, real x0, real y0, char *label,
-                  real fontsize, char *font, int nmap, t_mapping map[])
+static void leg_discrete(t_psdata ps, real x0, real y0, char *label,
+                         real fontsize, char *font, int nmap, t_mapping map[])
 {
     int   i;
     real  yhh;
@@ -265,10 +265,10 @@ void leg_discrete(t_psdata ps, real x0, real y0, char *label,
     }
 }
 
-void leg_continuous(t_psdata ps, real x0, real x, real y0, char *label,
-                    real fontsize, char *font,
-                    int nmap, t_mapping map[],
-                    int mapoffset)
+static void leg_continuous(t_psdata ps, real x0, real x, real y0, char *label,
+                           real fontsize, char *font,
+                           int nmap, t_mapping map[],
+                           int mapoffset)
 {
     int   i;
     real  xx0;
@@ -309,9 +309,9 @@ void leg_continuous(t_psdata ps, real x0, real x, real y0, char *label,
              - boxxh/2, yhh, map[nmap-1].desc, eXCenter);
 }
 
-void leg_bicontinuous(t_psdata ps, real x0, real x, real y0, char *label1,
-                      char *label2, real fontsize, char *font,
-                      int nmap1, t_mapping map1[], int nmap2, t_mapping map2[])
+static void leg_bicontinuous(t_psdata ps, real x0, real x, real y0, char *label1,
+                             char *label2, real fontsize, char *font,
+                             int nmap1, t_mapping map1[], int nmap2, t_mapping map2[])
 {
     real xx1, xx2, x1, x2;
 
@@ -636,8 +636,8 @@ static void box_dim(int nmat, t_matrix mat[], t_matrix *mat2, t_psrec *psr,
     *dh = dhh;
 }
 
-int add_maps(t_mapping **newmap,
-             int nmap1, t_mapping map1[], int nmap2, t_mapping map2[])
+static int add_maps(t_mapping **newmap,
+                    int nmap1, t_mapping map1[], int nmap2, t_mapping map2[])
 {
     static char mapper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+{}|;:',<.>/?";
     int         nsymbols;
@@ -683,8 +683,8 @@ int add_maps(t_mapping **newmap,
     return nmap;
 }
 
-void xpm_mat(const char *outf, int nmat, t_matrix *mat, t_matrix *mat2,
-             gmx_bool bDiag, gmx_bool bFirstDiag)
+static void xpm_mat(const char *outf, int nmat, t_matrix *mat, t_matrix *mat2,
+                    gmx_bool bDiag, gmx_bool bFirstDiag)
 {
     FILE      *out;
     int        i, x, y, col;
@@ -786,11 +786,11 @@ static void tick_spacing(int n, real axis[], real offset, char axisnm,
             axisnm, *major, *minor);
 }
 
-void ps_mat(const char *outf, int nmat, t_matrix mat[], t_matrix mat2[],
-            gmx_bool bFrame, gmx_bool bDiag, gmx_bool bFirstDiag,
-            gmx_bool bTitle, gmx_bool bTitleOnce, gmx_bool bYonce, int elegend,
-            real size, real boxx, real boxy, const char *m2p, const char *m2pout,
-            int mapoffset)
+static void ps_mat(const char *outf, int nmat, t_matrix mat[], t_matrix mat2[],
+                   gmx_bool bFrame, gmx_bool bDiag, gmx_bool bFirstDiag,
+                   gmx_bool bTitle, gmx_bool bTitleOnce, gmx_bool bYonce, int elegend,
+                   real size, real boxx, real boxy, const char *m2p, const char *m2pout,
+                   int mapoffset)
 {
     const char   *libm2p;
     char         *legend;
@@ -1056,7 +1056,7 @@ void ps_mat(const char *outf, int nmat, t_matrix mat[], t_matrix mat2[],
     ps_close(out);
 }
 
-void make_axis_labels(int nmat, t_matrix *mat)
+static void make_axis_labels(int nmat, t_matrix *mat)
 {
     int i, j;
 
@@ -1083,7 +1083,7 @@ void make_axis_labels(int nmat, t_matrix *mat)
     }
 }
 
-void prune_mat(int nmat, t_matrix *mat, t_matrix *mat2, int skip)
+static void prune_mat(int nmat, t_matrix *mat, t_matrix *mat2, int skip)
 {
     int i, x, y, xs, ys;
 
@@ -1138,7 +1138,7 @@ void prune_mat(int nmat, t_matrix *mat, t_matrix *mat2, int skip)
     }
 }
 
-void zero_lines(int nmat, t_matrix *mat, t_matrix *mat2)
+static void zero_lines(int nmat, t_matrix *mat, t_matrix *mat2)
 {
     int       i, x, y, m;
     t_matrix *mats;
@@ -1179,9 +1179,9 @@ void zero_lines(int nmat, t_matrix *mat, t_matrix *mat2)
     }
 }
 
-void write_combined_matrix(int ecombine, const char *fn,
-                           int nmat, t_matrix *mat1, t_matrix *mat2,
-                           real *cmin, real *cmax)
+static void write_combined_matrix(int ecombine, const char *fn,
+                                  int nmat, t_matrix *mat1, t_matrix *mat2,
+                                  real *cmin, real *cmax)
 {
     int        i, j, k, nlevels;
     FILE      *out;
@@ -1262,12 +1262,12 @@ void write_combined_matrix(int ecombine, const char *fn,
     gmx_ffclose(out);
 }
 
-void do_mat(int nmat, t_matrix *mat, t_matrix *mat2,
-            gmx_bool bFrame, gmx_bool bZeroLine, gmx_bool bDiag, gmx_bool bFirstDiag, gmx_bool bTitle,
-            gmx_bool bTitleOnce, gmx_bool bYonce, int elegend,
-            real size, real boxx, real boxy,
-            const char *epsfile, const char *xpmfile, const char *m2p,
-            const char *m2pout, int skip, int mapoffset)
+static void do_mat(int nmat, t_matrix *mat, t_matrix *mat2,
+                   gmx_bool bFrame, gmx_bool bZeroLine, gmx_bool bDiag, gmx_bool bFirstDiag, gmx_bool bTitle,
+                   gmx_bool bTitleOnce, gmx_bool bYonce, int elegend,
+                   real size, real boxx, real boxy,
+                   const char *epsfile, const char *xpmfile, const char *m2p,
+                   const char *m2pout, int skip, int mapoffset)
 {
     int      i, j, k;
 
@@ -1318,7 +1318,7 @@ void do_mat(int nmat, t_matrix *mat, t_matrix *mat2,
     }
 }
 
-void gradient_map(rvec grad, int nmap, t_mapping map[])
+static void gradient_map(rvec grad, int nmap, t_mapping map[])
 {
     int  i;
     real c;
@@ -1332,7 +1332,7 @@ void gradient_map(rvec grad, int nmap, t_mapping map[])
     }
 }
 
-void gradient_mat(rvec grad, int nmat, t_matrix mat[])
+static void gradient_mat(rvec grad, int nmat, t_matrix mat[])
 {
     int m;
 
@@ -1342,7 +1342,7 @@ void gradient_mat(rvec grad, int nmat, t_matrix mat[])
     }
 }
 
-void rainbow_map(gmx_bool bBlue, int nmap, t_mapping map[])
+static void rainbow_map(gmx_bool bBlue, int nmap, t_mapping map[])
 {
     int  i;
     real c, r, g, b;
@@ -1388,7 +1388,7 @@ void rainbow_map(gmx_bool bBlue, int nmap, t_mapping map[])
     }
 }
 
-void rainbow_mat(gmx_bool bBlue, int nmat, t_matrix mat[])
+static void rainbow_mat(gmx_bool bBlue, int nmat, t_matrix mat[])
 {
     int m;
 
index dab595201643f3d2f8494c674b9893e35991c3be..442003ecdfd87bc54626881f2e27ef7362a52366 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2013,2014,2015,2017, 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 "gromacs/utility/real.h"
 #include "gromacs/utility/smalloc.h"
 
-void addtoavgenergy(t_complex *list, real *result, int size, int tsteps)
+static void addtoavgenergy(t_complex *list, real *result, int size, int tsteps)
 {
     int i;
     for (i = 0; i < size; i++)
index 2ee2c6b845f3aa03d83b8c9d437751423058aa88..77e36fed1be7c4510805df34c0fb31b0828c85a6 100644 (file)
@@ -119,15 +119,6 @@ nb_kernel_list_hash_init(void)
     return 0;
 }
 
-void
-nb_kernel_list_hash_destroy()
-{
-    sfree(kernel_list_hash);
-    kernel_list_hash      = nullptr;
-    kernel_list_hash_size = 0;
-}
-
-
 nb_kernel_t *
 nb_kernel_list_findkernel(FILE gmx_unused *   log,
                           const char *        arch,
index d2c2f2c667b0cdfc82a489c0ab4675b33de33498..96cf768664d28ff62c5e5e5e0ef06b442808532f 100644 (file)
@@ -37,6 +37,8 @@
 /* This file is completely threadsafe - keep it that way! */
 #include "gmxpre.h"
 
+#include "add_par.h"
+
 #include <string.h>
 
 #include <algorithm>
index 0396424d434a3b72fa61c2437fea89e622f60100..fe26641bc2863ff9af52c4d7a6581aa1267d57a6 100644 (file)
@@ -564,7 +564,7 @@ static int nb_dist(t_nextnb *nnb, int ai, int aj)
     return NRE;
 }
 
-gmx_bool is_hydro(t_atoms *atoms, int ai)
+static gmx_bool is_hydro(t_atoms *atoms, int ai)
 {
     return ((*(atoms->atomname[ai]))[0] == 'H');
 }
index 4d58b30b82e98982fa497552fa0d5df019495d53..5f6643ec3a7f9b0411c15260b775c8f506440706 100644 (file)
@@ -108,7 +108,7 @@ static void hacksearch_atom(int *ii, int *jj, char *name,
     return;
 }
 
-void dump_ab(FILE *out, int natom, int nab[], t_hack *ab[], gmx_bool bHeader)
+static void dump_ab(FILE *out, int natom, int nab[], t_hack *ab[], gmx_bool bHeader)
 {
     int i, j;
 
index 59e4f7374313dd7d887865bb22ecbb01037570a9..bc47e738fda926156d870671b6cd7babd0f59464 100644 (file)
@@ -1070,7 +1070,7 @@ static int nrdf_internal(t_atoms *atoms)
     return nrdf;
 }
 
-void
+static void
 spline1d( double        dx,
           double *      y,
           int           n,
@@ -1100,7 +1100,7 @@ spline1d( double        dx,
 }
 
 
-void
+static void
 interpolate1d( double     xmin,
                double     dx,
                double *   ya,
@@ -1122,7 +1122,7 @@ interpolate1d( double     xmin,
 }
 
 
-void
+static void
 setup_cmap (int              grid_spacing,
             int              nc,
             real *           grid,
@@ -1200,7 +1200,7 @@ setup_cmap (int              grid_spacing,
     }
 }
 
-void init_cmap_grid(gmx_cmap_t *cmap_grid, int ngrid, int grid_spacing)
+static void init_cmap_grid(gmx_cmap_t *cmap_grid, int ngrid, int grid_spacing)
 {
     int i, nelem;
 
index d9d3daf849e7c7cb707188b6c50053a621172151..cf81e0e10cbe4922bc27b22102cc2a073e998aef 100644 (file)
@@ -200,7 +200,7 @@ static gmx_bool contains_char(t_rbonded *s, char c)
     return bRet;
 }
 
-int
+static int
 rbonded_find_atoms_in_list(t_rbonded *b, t_rbonded blist[], int nlist, int natoms)
 {
     int      i, k;
index a6800c5221e48366e2cd250b0dcf62cb73b7d20d..5dfbe4947beb5d61a45a85927ac0b3bd7e0fcf83 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,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017, 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.
@@ -37,6 +37,8 @@
 /* This file is completely threadsafe - keep it that way! */
 #include "gmxpre.h"
 
+#include "hizzie.h"
+
 #include <stdio.h>
 #include <string.h>
 
index 5bdcb8801c037e0941aedfac80383602b07da8d4..7de66843a9ac398fc317c642a1d07f86b7ec160d 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,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017, 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.
@@ -38,6 +38,9 @@
 #ifndef GMX_GMXPREPROCESS_HIZZIE_H
 #define GMX_GMXPREPROCESS_HIZZIE_H
 
+#include "gromacs/math/vectypes.h"
+#include "gromacs/topology/atoms.h"
+
 void set_histp(t_atoms *pdba, rvec *x, real angle, real distance);
 /* calculate HIStidine protonation state */
 
index 91841dc7c0315e23d6021d75969805b47e6c0012..ab093624d9c1a43e8ff1667b0a29d4da88f9620a 100644 (file)
@@ -500,7 +500,7 @@ static void check_occupancy(t_atoms *atoms, const char *filename, gmx_bool bVerb
     }
 }
 
-void write_posres(char *fn, t_atoms *pdba, real fc)
+static void write_posres(char *fn, t_atoms *pdba, real fc)
 {
     FILE *fp;
     int   i;
@@ -598,12 +598,12 @@ static int read_pdball(const char *inf, const char *outf, char *title,
     return natom;
 }
 
-void process_chain(t_atoms *pdba, rvec *x,
-                   gmx_bool bTrpU, gmx_bool bPheU, gmx_bool bTyrU,
-                   gmx_bool bLysMan, gmx_bool bAspMan, gmx_bool bGluMan,
-                   gmx_bool bHisMan, gmx_bool bArgMan, gmx_bool bGlnMan,
-                   real angle, real distance, t_symtab *symtab,
-                   int nrr, const rtprename_t *rr)
+static void process_chain(t_atoms *pdba, rvec *x,
+                          gmx_bool bTrpU, gmx_bool bPheU, gmx_bool bTyrU,
+                          gmx_bool bLysMan, gmx_bool bAspMan, gmx_bool bGluMan,
+                          gmx_bool bHisMan, gmx_bool bArgMan, gmx_bool bGlnMan,
+                          real angle, real distance, t_symtab *symtab,
+                          int nrr, const rtprename_t *rr)
 {
     /* Rename aromatics, lys, asp and histidine */
     if (bTyrU)
@@ -677,7 +677,7 @@ typedef struct {
     char altloc; /* alternate location indicator */
 } t_pdbindex;
 
-int pdbicomp(const void *a, const void *b)
+static int pdbicomp(const void *a, const void *b)
 {
     t_pdbindex *pa, *pb;
     int         d;
@@ -859,8 +859,8 @@ static int remove_duplicate_atoms(t_atoms *pdba, rvec x[], gmx_bool bVerbose)
     return pdba->nr;
 }
 
-void find_nc_ter(t_atoms *pdba, int r0, int r1, int *r_start, int *r_end,
-                 gmx_residuetype_t *rt)
+static void find_nc_ter(t_atoms *pdba, int r0, int r1, int *r_start, int *r_end,
+                        gmx_residuetype_t *rt)
 {
     int         i;
     const char *p_startrestype;
index dad86e404ae50fee96c67050bbcf06130dc32e6e..5686b15245dbd17e020fef85957f50c894046f66 100644 (file)
@@ -962,7 +962,7 @@ static void check_restp_types(t_restp *r0, t_restp *r1)
     }
 }
 
-void add_atom_to_restp(t_restp *restp, int at_start, const t_hack *hack)
+static void add_atom_to_restp(t_restp *restp, int at_start, const t_hack *hack)
 {
     char        buf[STRLEN];
     int         k;
index 0af04f7cc3641543fe071d8af0a415f1ab289157..e30ff84b901ae34dadcb1ec8d050d19a0ff81f4d 100644 (file)
@@ -1716,8 +1716,8 @@ static void add_wall_energrps(gmx_groups_t *groups, int nwall, t_symtab *symtab)
     }
 }
 
-void read_expandedparams(int *ninp_p, t_inpfile **inp_p,
-                         t_expanded *expand, warninp_t wi)
+static void read_expandedparams(int *ninp_p, t_inpfile **inp_p,
+                                t_expanded *expand, warninp_t wi)
 {
     int        ninp;
     t_inpfile *inp;
@@ -3197,7 +3197,7 @@ static void make_swap_groups(
 }
 
 
-void make_IMD_group(t_IMD *IMDgroup, char *IMDgname, t_blocka *grps, char **gnames)
+static void make_IMD_group(t_IMD *IMDgroup, char *IMDgname, t_blocka *grps, char **gnames)
 {
     int      ig, i;
 
index a821f6461796dfca5f6cc6739ea7916d7a0dbd4e..689eae682f8b61b5e6c052289527eb5c57e85f07 100644 (file)
@@ -178,7 +178,7 @@ static gmx_bool read_atoms(FILE *in, char *line,
     return TRUE;
 }
 
-gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp)
+static gmx_bool read_bondeds(int bt, FILE *in, char *line, t_restp *rtp)
 {
     char str[STRLEN];
     int  j, n, ni, maxrb;
@@ -260,7 +260,7 @@ static void check_rtp(int nrtp, t_restp rtp[], char *libfn)
     }
 }
 
-int get_bt(char* header)
+static int get_bt(char* header)
 {
     int i;
 
@@ -274,13 +274,13 @@ int get_bt(char* header)
     return NOTSET;
 }
 
-void clear_t_restp(t_restp *rrtp)
+static void clear_t_restp(t_restp *rrtp)
 {
     memset((void *)rrtp, 0, sizeof(t_restp));
 }
 
 /* print all the ebtsNR type numbers */
-void print_resall_header(FILE *out, t_restp rtp[])
+static void print_resall_header(FILE *out, t_restp rtp[])
 {
     fprintf(out, "[ bondedtypes ]\n");
     fprintf(out, "; bonds  angles  dihedrals  impropers all_dihedrals nr_exclusions  HH14  remove_dih\n");
index 1af82e44cead84faef392e6acd1cb34ca5a86589..079726dc03d044d545a0bcd9bbc5d12daaa42d0f 100644 (file)
@@ -62,7 +62,7 @@ const char *kw_names[ekwNR] = {
     "replace", "add", "delete"
 };
 
-int find_kw(char *keyw)
+static int find_kw(char *keyw)
 {
     int i;
 
index dc4f779cf3f3404e450ac196b8ce260dafa92a79..905e27da4e3452bbe6b5043ff406f6f310b93d24 100644 (file)
@@ -396,7 +396,7 @@ static char ** cpp_opts(const char *define, const char *include,
 }
 
 
-int
+static int
 find_gb_bondlength(t_params *plist, int ai, int aj, real *length)
 {
     int i, j, a1, a2;
@@ -428,7 +428,7 @@ find_gb_bondlength(t_params *plist, int ai, int aj, real *length)
 }
 
 
-int
+static int
 find_gb_anglelength(t_params *plist, int ai, int ak, real *length)
 {
     int  i, j, a1, a2, a3;
@@ -472,7 +472,7 @@ find_gb_anglelength(t_params *plist, int ai, int ak, real *length)
     return status;
 }
 
-int
+static int
 generate_gb_exclusion_interactions(t_molinfo *mi, gpp_atomtype_t atype, t_nextnb *nnb)
 {
     int          j, n, ai, aj, ti, tj;
index 97d45b1dcf10e0694b74e573e92975f958091bc7..2abdf809033d32e0c0538199981f9aac6b6158bd 100644 (file)
@@ -1344,7 +1344,7 @@ static void push_atom_now(t_symtab *symtab, t_atoms *at, int atomnr,
     at->nr++;
 }
 
-void push_cg(t_block *block, int *lastindex, int index, int a)
+static void push_cg(t_block *block, int *lastindex, int index, int a)
 {
     if (debug)
     {
index 1574962e567fe3a95c50caf14aaec8949c50b5d3..6e84f4a3afd0aefbc688074c45a4bbfb74d1cbaa 100644 (file)
@@ -182,7 +182,7 @@ void init_molinfo(t_molinfo *mol)
 
 /* FREEING MEMORY */
 
-void done_bt (t_params *pl)
+static void done_bt (t_params *pl)
 {
     sfree(pl->param);
 }
@@ -202,9 +202,9 @@ void done_mi(t_molinfo *mi)
 
 /* PRINTING STRUCTURES */
 
-void print_bt(FILE *out, directive d, gpp_atomtype_t at,
-              int ftype, int fsubtype, t_params plist[],
-              gmx_bool bFullDih)
+static void print_bt(FILE *out, directive d, gpp_atomtype_t at,
+                     int ftype, int fsubtype, t_params plist[],
+                     gmx_bool bFullDih)
 {
     /* This dihp is a DIRTY patch because the dih-types do not use
      * all four atoms to determine the type.
index 3f17b1ff686a49c21d1aca29659dfef4fc9328a0..e9e85fb4a0dfdb6a3d602e5c1317fdc6d901d2ff 100644 (file)
@@ -101,9 +101,9 @@ static gmx_bool is_bond(int nnm, t_nm2type nmt[], char *ai, char *aj, real blen)
     return FALSE;
 }
 
-void mk_bonds(int nnm, t_nm2type nmt[],
-              t_atoms *atoms, const rvec x[], t_params *bond, int nbond[],
-              gmx_bool bPBC, matrix box)
+static void mk_bonds(int nnm, t_nm2type nmt[],
+                     t_atoms *atoms, const rvec x[], t_params *bond, int nbond[],
+                     gmx_bool bPBC, matrix box)
 {
     t_param b;
     int     i, j;
@@ -164,7 +164,7 @@ void mk_bonds(int nnm, t_nm2type nmt[],
     fflush(stderr);
 }
 
-int *set_cgnr(t_atoms *atoms, gmx_bool bUsePDBcharge, real *qtot, real *mtot)
+static int *set_cgnr(t_atoms *atoms, gmx_bool bUsePDBcharge, real *qtot, real *mtot)
 {
     int     i, n = 1;
     int    *cgnr;
@@ -191,8 +191,8 @@ int *set_cgnr(t_atoms *atoms, gmx_bool bUsePDBcharge, real *qtot, real *mtot)
     return cgnr;
 }
 
-gpp_atomtype_t set_atom_type(t_symtab *tab, t_atoms *atoms, t_params *bonds,
-                             int *nbonds, int nnm, t_nm2type nm2t[])
+static gpp_atomtype_t set_atom_type(t_symtab *tab, t_atoms *atoms, t_params *bonds,
+                                    int *nbonds, int nnm, t_nm2type nm2t[])
 {
     gpp_atomtype_t atype;
     int            nresolved;
@@ -212,8 +212,8 @@ gpp_atomtype_t set_atom_type(t_symtab *tab, t_atoms *atoms, t_params *bonds,
     return atype;
 }
 
-void lo_set_force_const(t_params *plist, real c[], int nrfp, gmx_bool bRound,
-                        gmx_bool bDih, gmx_bool bParam)
+static void lo_set_force_const(t_params *plist, real c[], int nrfp, gmx_bool bRound,
+                               gmx_bool bDih, gmx_bool bParam)
 {
     int    i, j;
     double cc;
@@ -262,8 +262,8 @@ void lo_set_force_const(t_params *plist, real c[], int nrfp, gmx_bool bRound,
     }
 }
 
-void set_force_const(t_params plist[], real kb, real kt, real kp, gmx_bool bRound,
-                     gmx_bool bParam)
+static void set_force_const(t_params plist[], real kb, real kt, real kp, gmx_bool bRound,
+                            gmx_bool bParam)
 {
     real c[MAXFORCEPARAM];
 
@@ -277,8 +277,8 @@ void set_force_const(t_params plist[], real kb, real kt, real kp, gmx_bool bRoun
     lo_set_force_const(&plist[F_PDIHS], c, 3, bRound, TRUE, bParam);
 }
 
-void calc_angles_dihs(t_params *ang, t_params *dih, const rvec x[], gmx_bool bPBC,
-                      matrix box)
+static void calc_angles_dihs(t_params *ang, t_params *dih, const rvec x[], gmx_bool bPBC,
+                             matrix box)
 {
     int    i, ai, aj, ak, al, t1, t2, t3;
     rvec   r_ij, r_kj, r_kl, m, n;
index 1f92b88f5e22fa82ff4d58b53d4693f38087b658..76f439e1bd6eaa4b62b1ec574e6b13835be41305 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017, 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.
@@ -366,7 +366,7 @@ static std::string makeKernelIncludePathOption(const std::string &unescapedKerne
 /*! \brief Builds a string with build options for the OpenCL kernels
  *
  * \throws std::bad_alloc  if out of memory. */
-std::string
+static std::string
 makePreprocessorOptions(const std::string   &kernelRootPath,
                         size_t               warpSize,
                         ocl_vendor_id_t      deviceVendorId,
index d757f70502a9a0bbe8b3986cfc268d5812921e8d..0e38ddb8eabd91ac4922624885bfe1ad25967ad0 100644 (file)
@@ -115,11 +115,11 @@ int ocl_copy_H2D(cl_mem d_dest, void * h_src,
  *  identifying this particular device to host operation. The event can further
  *  be used to queue a wait for this operation or to query profiling information.
  */
-int ocl_copy_D2H_generic(void * h_dest, cl_mem d_src,
-                         size_t offset, size_t bytes,
-                         bool bAsync,
-                         cl_command_queue command_queue,
-                         cl_event *copy_event)
+static int ocl_copy_D2H_generic(void * h_dest, cl_mem d_src,
+                                size_t offset, size_t bytes,
+                                bool bAsync,
+                                cl_command_queue command_queue,
+                                cl_event *copy_event)
 {
     cl_int gmx_unused cl_error;
 
index 0bcb39212a0c9a5995fc3491575df77458f3d6ab..4b05207a8015b27bcf0eb1ba777834b056e09ba0 100644 (file)
@@ -330,8 +330,8 @@ real FENE_bonds(int nbonds,
     return vtot;
 }
 
-real harmonic(real kA, real kB, real xA, real xB, real x, real lambda,
-              real *V, real *F)
+static real harmonic(real kA, real kB, real xA, real xB, real x, real lambda,
+                     real *V, real *F)
 {
     const real half = 0.5;
     real       L1, kk, x0, dx, dx2;
@@ -1659,8 +1659,8 @@ do_dih_fup_noshiftf_simd(const int *ai, const int *aj, const int *ak, const int
 }
 #endif // GMX_SIMD_HAVE_REAL
 
-real dopdihs(real cpA, real cpB, real phiA, real phiB, int mult,
-             real phi, real lambda, real *V, real *F)
+static real dopdihs(real cpA, real cpB, real phiA, real phiB, int mult,
+                    real phi, real lambda, real *V, real *F)
 {
     real v, dvdlambda, mdphi, v1, sdphi, ddphi;
     real L1   = 1.0 - lambda;
@@ -3259,8 +3259,8 @@ cmap_dihs(int nbonds,
  *   G R O M O S  9 6   F U N C T I O N S
  *
  ***********************************************************/
-real g96harmonic(real kA, real kB, real xA, real xB, real x, real lambda,
-                 real *V, real *F)
+static real g96harmonic(real kA, real kB, real xA, real xB, real x, real lambda,
+                        real *V, real *F)
 {
     const real half = 0.5;
     real       L1, kk, x0, dx, dx2;
@@ -3340,9 +3340,9 @@ real g96bonds(int nbonds,
     return vtot;
 }
 
-real g96bond_angle(const rvec xi, const rvec xj, const rvec xk, const t_pbc *pbc,
-                   rvec r_ij, rvec r_kj,
-                   int *t1, int *t2)
+static real g96bond_angle(const rvec xi, const rvec xj, const rvec xk, const t_pbc *pbc,
+                          rvec r_ij, rvec r_kj,
+                          int *t1, int *t2)
 /* Return value is the angle between the bonds i-j and j-k */
 {
     real costh;
index 1b0827e98e71c433eaa63a183cc8fed370a4e1ef..08e6844cddd8a0eecf4a150313b9911028aea334 100644 (file)
@@ -94,7 +94,7 @@ warning_rlimit(const rvec *x, int ai, int aj, int * global_atom_index, real r, r
 }
 
 /*! \brief Compute the energy and force for a single pair interaction */
-real
+static real
 evaluate_single(real r2, real tabscale, real *vftab, real tableStride,
                 real qq, real c6, real c12, real *velec, real *vvdw)
 {
@@ -143,7 +143,7 @@ evaluate_single(real r2, real tabscale, real *vftab, real tableStride,
 }
 
 /*! \brief Compute the energy and force for a single pair interaction under FEP */
-real
+static real
 free_energy_evaluate_single(real r2, real sc_r_power, real alpha_coul,
                             real alpha_vdw, real tabscale, real *vftab, real tableStride,
                             real qqA, real c6A, real c12A, real qqB,
index 2b7844c56bcb77a4b2957809f3419ce360e6d15f..7a0d823b96be4757fb6a27ea86d2c469ed202a47 100644 (file)
@@ -1254,7 +1254,7 @@ static void set_lincs_matrix_task(struct gmx_lincsdata *li,
 }
 
 /* Sets the elements in the LINCS matrix */
-void set_lincs_matrix(struct gmx_lincsdata *li, real *invmass, real lambda)
+static void set_lincs_matrix(struct gmx_lincsdata *li, real *invmass, real lambda)
 {
     int        i;
     const real invsqrt2 = 0.7071067811865475244;
index 4edb6b1c8e878291e21407cc46d43f0e865d6fe6..7493e6ef3786d37a858c04c16a2fd2e5c6ae2501 100644 (file)
@@ -169,36 +169,7 @@ static void GenerateWeightedGibbsProbabilities(real *ene, double *p_k, double *p
     sfree(nene);
 }
 
-real do_logsum(int N, real *a_n)
-{
-
-    /*     RETURN VALUE */
-    /* log(\sum_{i=0}^(N-1) exp[a_n]) */
-    real maxarg;
-    real sum;
-    int  i;
-    real logsum;
-    /*     compute maximum argument to exp(.) */
-
-    maxarg = a_n[0];
-    for (i = 1; i < N; i++)
-    {
-        maxarg = std::max(maxarg, a_n[i]);
-    }
-
-    /* compute sum of exp(a_n - maxarg) */
-    sum = 0.0;
-    for (i = 0; i < N; i++)
-    {
-        sum = sum + std::exp(a_n[i] - maxarg);
-    }
-
-    /*     compute log sum */
-    logsum = std::log(sum) + maxarg;
-    return logsum;
-}
-
-int FindMinimum(real *min_metric, int N)
+static int FindMinimum(real *min_metric, int N)
 {
 
     real min_val;
index 38ee8a833fd665e364553f6da5399bfd4de3eff9..e71150331cd117c6178d84af6afb1eff9a213e3f 100644 (file)
@@ -1131,8 +1131,8 @@ real gb_bonds_tab(rvec x[], rvec f[], rvec fshift[], real *charge, real *p_gbtab
     return vctot;
 }
 
-real calc_gb_selfcorrections(t_commrec *cr, int natoms,
-                             real *charge, gmx_genborn_t *born, real *dvda, double facel)
+static real calc_gb_selfcorrections(t_commrec *cr, int natoms,
+                                    real *charge, gmx_genborn_t *born, real *dvda, double facel)
 {
     int  i, ai, at0, at1;
     real rai, e, derb, q, q2, fi, rai_inv, vtot;
@@ -1177,8 +1177,8 @@ real calc_gb_selfcorrections(t_commrec *cr, int natoms,
 
 }
 
-real calc_gb_nonpolar(t_commrec *cr, t_forcerec *fr, int natoms, gmx_genborn_t *born, gmx_localtop_t *top,
-                      real *dvda, t_mdatoms *md)
+static real calc_gb_nonpolar(t_commrec *cr, t_forcerec *fr, int natoms, gmx_genborn_t *born, gmx_localtop_t *top,
+                             real *dvda, t_mdatoms *md)
 {
     int  ai, i, at0, at1;
     real e, es, rai, term, probe, tmp, factor;
@@ -1224,8 +1224,8 @@ real calc_gb_nonpolar(t_commrec *cr, t_forcerec *fr, int natoms, gmx_genborn_t *
 
 
 
-real calc_gb_chainrule(int natoms, t_nblist *nl, real *dadx, real *dvda, rvec x[], rvec t[], rvec fshift[],
-                       rvec shift_vec[], int gb_algorithm, gmx_genborn_t *born)
+static real calc_gb_chainrule(int natoms, t_nblist *nl, real *dadx, real *dvda, rvec x[], rvec t[], rvec fshift[],
+                              rvec shift_vec[], int gb_algorithm, gmx_genborn_t *born)
 {
     int          i, k, n, ai, aj, nj0, nj1, n0, n1;
     int          shift;
index f50e0c61dcd0f27b4a6ede9a78da38d783ef40af..1b455879102ae62c29376b64e29d73266640844a 100644 (file)
@@ -208,7 +208,7 @@ static void mde_delta_h_make_hist(t_mde_delta_h *dh, int hi, gmx_bool invert)
 }
 
 
-void mde_delta_h_handle_block(t_mde_delta_h *dh, t_enxblock *blk)
+static void mde_delta_h_handle_block(t_mde_delta_h *dh, t_enxblock *blk)
 {
     /* first check which type we should use: histogram or raw data */
     if (dh->nhist == 0)
index 940d7b5b3471c2c06aa48d8545f07ba1519ac3c4..4df4cdf49f749e923d5c82841565962459ef6911 100644 (file)
@@ -51,6 +51,8 @@
 #endif
 
 
+#include "nbnxn_cuda.h"
+
 #include "gromacs/gpu_utils/cudautils.cuh"
 #include "gromacs/mdlib/force_flags.h"
 #include "gromacs/mdlib/nb_verlet.h"
@@ -929,29 +931,24 @@ void nbnxn_gpu_wait_for_gpu(gmx_nbnxn_cuda_t *nb,
     plist->haveFreshList = false;
 }
 
-/*! Return the reference to the nbfp texture. */
 const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_nbfp_texref()
 {
     assert(!c_disableCudaTextures);
     return nbfp_texref;
 }
 
-/*! Return the reference to the nbfp_comb texture. */
 const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_nbfp_comb_texref()
 {
     assert(!c_disableCudaTextures);
     return nbfp_comb_texref;
 }
 
-/*! Return the reference to the coulomb_tab. */
 const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_coulomb_tab_texref()
 {
     assert(!c_disableCudaTextures);
     return coulomb_tab_texref;
 }
 
-/*! Set up the cache configuration for the non-bonded kernels,
- */
 void nbnxn_cuda_set_cacheconfig(const gmx_device_info_t *devinfo)
 {
     cudaError_t stat;
diff --git a/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h b/src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.h
new file mode 100644 (file)
index 0000000..ba70b3a
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2017, 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.
+ */
+/*! \internal \file
+ * \brief
+ * Declares nbnxn cuda cache and texture helper functions
+ */
+#ifndef GMX_MDLIB_NBNXN_CUDA_NBNXN_CUDA_H
+#define GMX_MDLIB_NBNXN_CUDA_NBNXN_CUDA_H
+
+#include "nbnxn_cuda_types.h"
+
+//! Set up the cache configuration for the non-bonded kernels.
+void nbnxn_cuda_set_cacheconfig(const gmx_device_info_t *devinfo);
+//! Return the reference to the nbfp texture.
+const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_nbfp_texref();
+//! Return the reference to the nbfp_comb texture.
+const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_nbfp_comb_texref();
+//! Return the reference to the coulomb_tab.
+const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_coulomb_tab_texref();
+
+#endif
index 9f951b344a40212fdd145247c5796b5ffee66c45..5aa1db803fae62504c2f9c99dead4abb34df0168 100644 (file)
@@ -63,6 +63,7 @@
 #include "gromacs/utility/real.h"
 #include "gromacs/utility/smalloc.h"
 
+#include "nbnxn_cuda.h"
 #include "nbnxn_cuda_types.h"
 
 static bool bUseCudaEventBlockingSync = false; /* makes the CPU thread block */
@@ -77,13 +78,6 @@ static bool bUseCudaEventBlockingSync = false; /* makes the CPU thread block */
  */
 static unsigned int gpu_min_ci_balanced_factor = 44;
 
-/* Functions from nbnxn_cuda.cu */
-extern void nbnxn_cuda_set_cacheconfig(const gmx_device_info_t *devinfo);
-extern const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_nbfp_texref();
-extern const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_nbfp_comb_texref();
-extern const struct texture<float, 1, cudaReadModeElementType> &nbnxn_cuda_get_coulomb_tab_texref();
-
-
 /* Fw. decl. */
 static void nbnxn_cuda_clear_e_fshift(gmx_nbnxn_cuda_t *nb);
 
index 7a4608bb7c24a8ea66dc8386ec6ae95ae91a9791..4e4f618b4f25c2a4b70ebdda2215ad5a844369c4 100644 (file)
@@ -345,30 +345,12 @@ static void fillin_ocl_structures(cl_nbparam_t        *nbp,
     nbparams_params->vdw_switch        = nbp->vdw_switch;
 }
 
-/*! \brief Waits for the commands associated with the input event to finish.
- * Then it releases the event and sets it to 0.
- * Don't use this function when more than one wait will be issued for the event.
- */
-void wait_ocl_event(cl_event *ocl_event)
-{
-    cl_int gmx_unused cl_error;
-
-    /* Blocking wait for the event */
-    cl_error = clWaitForEvents(1, ocl_event);
-    assert(CL_SUCCESS == cl_error);
-
-    /* Release event and reset it to 0 */
-    cl_error = clReleaseEvent(*ocl_event);
-    assert(CL_SUCCESS == cl_error);
-    *ocl_event = 0;
-}
-
 /*! \brief Enqueues a wait for event completion.
  *
  * Then it releases the event and sets it to 0.
  * Don't use this function when more than one wait will be issued for the event.
  * Equivalent to Cuda Stream Sync. */
-void sync_ocl_event(cl_command_queue stream, cl_event *ocl_event)
+static void sync_ocl_event(cl_command_queue stream, cl_event *ocl_event)
 {
     cl_int gmx_unused cl_error;
 
@@ -395,7 +377,7 @@ void sync_ocl_event(cl_command_queue stream, cl_event *ocl_event)
  * The function returns 0.0 if the input event, *ocl_event, is 0.
  * Don't use this function when more than one wait will be issued for the event.
  */
-double ocl_event_elapsed_ms(cl_event *ocl_event)
+static double ocl_event_elapsed_ms(cl_event *ocl_event)
 {
     cl_int gmx_unused cl_error;
     cl_ulong          start_ns, end_ns;
index 4b8f5e75fda187648f4893bb3ed4bb07e8da75ad..c765d694d10d14eff4f35f832aafd5bd87924cfb 100644 (file)
@@ -96,7 +96,7 @@ bool useLjCombRule(int vdwType)
  *
  * If the pointers to the size variables are NULL no resetting happens.
  */
-void ocl_free_buffered(cl_mem d_ptr, int *n, int *nalloc)
+static void ocl_free_buffered(cl_mem d_ptr, int *n, int *nalloc)
 {
     cl_int gmx_unused cl_error;
 
@@ -131,14 +131,14 @@ void ocl_free_buffered(cl_mem d_ptr, int *n, int *nalloc)
  *  for this operation or to query profiling information.
  *  OpenCL equivalent of cu_realloc_buffered.
  */
-void ocl_realloc_buffered(cl_mem *d_dest, void *h_src,
-                          size_t type_size,
-                          int *curr_size, int *curr_alloc_size,
-                          int req_size,
-                          cl_context context,
-                          cl_command_queue s,
-                          bool bAsync = true,
-                          cl_event *copy_event = NULL)
+static void ocl_realloc_buffered(cl_mem *d_dest, void *h_src,
+                                 size_t type_size,
+                                 int *curr_size, int *curr_alloc_size,
+                                 int req_size,
+                                 cl_context context,
+                                 cl_command_queue s,
+                                 bool bAsync = true,
+                                 cl_event *copy_event = NULL)
 {
     if (d_dest == NULL || req_size < 0)
     {
@@ -1056,7 +1056,7 @@ void nbnxn_gpu_init_atomdata(gmx_nbnxn_ocl_t               *nb,
 }
 
 /*! \brief Releases an OpenCL kernel pointer */
-void free_kernel(cl_kernel *kernel_ptr)
+static void free_kernel(cl_kernel *kernel_ptr)
 {
     cl_int gmx_unused cl_error;
 
@@ -1072,7 +1072,7 @@ void free_kernel(cl_kernel *kernel_ptr)
 }
 
 /*! \brief Releases a list of OpenCL kernel pointers */
-void free_kernels(cl_kernel *kernels, int count)
+static void free_kernels(cl_kernel *kernels, int count)
 {
     int i;
 
index 9cca369a9af99f658252d7f0a20bfe5b34f63ad5..53f6e5c93ccdf84192e0e281149d562e732ffbee 100644 (file)
@@ -2029,7 +2029,7 @@ static int nsgrid_core(t_commrec *cr, t_forcerec *fr,
     return nns;
 }
 
-void ns_realloc_natoms(gmx_ns_t *ns, int natoms)
+static void ns_realloc_natoms(gmx_ns_t *ns, int natoms)
 {
     int i;
 
index 8b6b40f0a97b4c1e22ff65a7fda1b215dd797a4d..1252a1a66bb4148fce0b65c4b98beea6135c2f76 100644 (file)
@@ -96,9 +96,9 @@ static void calc_x_av_stddev(int n, rvec *x, rvec av, rvec stddev)
     }
 }
 
-void get_nsgrid_boundaries_vac(real av, real stddev,
-                               real *bound0, real *bound1,
-                               real *bdens0, real *bdens1)
+static void get_nsgrid_boundaries_vac(real av, real stddev,
+                                      real *bound0, real *bound1,
+                                      real *bdens0, real *bdens1)
 {
     /* Set the grid to 2 times the standard deviation of
      * the charge group centers in both directions.
index 57d5e9fd1c49c1718ede1cd517749a21b7d8ce8e..517fb01eb75d16135119ab568804227ecb810f93 100644 (file)
@@ -36,6 +36,8 @@
  */
 #include "gmxpre.h"
 
+#include "qm_orca.h"
+
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -95,7 +97,7 @@ void init_orca(t_QMrec *qm)
 }
 
 
-void write_orca_input(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
+static void write_orca_input(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
 {
     int        i;
     t_QMMMrec *QMMMrec;
@@ -251,8 +253,8 @@ void write_orca_input(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
     fclose(out);
 }  /* write_orca_input */
 
-real read_orca_output(rvec QMgrad[], rvec MMgrad[], t_forcerec *fr,
-                      t_QMrec *qm, t_MMrec *mm)
+static real read_orca_output(rvec QMgrad[], rvec MMgrad[], t_forcerec *fr,
+                             t_QMrec *qm, t_MMrec *mm)
 {
     int
         i, j, atnum;
@@ -424,7 +426,7 @@ real read_orca_output(rvec QMgrad[], rvec MMgrad[], t_forcerec *fr,
     return(QMener);
 }
 
-void do_orca(char *orca_dir, char *basename)
+static void do_orca(char *orca_dir, char *basename)
 {
 
     /* make the call to the orca binary through system()
diff --git a/src/gromacs/mdlib/qm_orca.h b/src/gromacs/mdlib/qm_orca.h
new file mode 100644 (file)
index 0000000..7ab55e2
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2017, 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.
+ */
+#include "gromacs/mdlib/qmmm.h"
+
+#ifndef GMX_MDLIB_QM_ORCA_H
+#define GMX_MDLIB_QM_ORCA_H
+
+void
+init_orca(t_QMrec *qm);
+
+real
+call_orca(t_forcerec *fr, t_QMrec *qm,
+          t_MMrec *mm, rvec f[], rvec fshift[]);
+
+#endif
index 7342b77999055a8ea88f6b4f265e86d1eae49c49..8dc23536821701e9905bb8080f4c70c6431bccbc 100644 (file)
@@ -109,15 +109,7 @@ real
 call_gaussian(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[]);
 
 #elif GMX_QMMM_ORCA
-/* ORCA interface */
-
-void
-init_orca(t_QMrec *qm);
-
-real
-call_orca(t_forcerec *fr, t_QMrec *qm,
-          t_MMrec *mm, rvec f[], rvec fshift[]);
-
+#include "gromacs/mdlib/qm_orca.h"
 #endif
 
 
@@ -139,8 +131,8 @@ static int struct_comp(const void *a, const void *b)
 
 } /* struct_comp */
 
-real call_QMroutine(t_commrec gmx_unused *cr, t_forcerec gmx_unused *fr, t_QMrec gmx_unused *qm,
-                    t_MMrec gmx_unused *mm, rvec gmx_unused f[], rvec gmx_unused fshift[])
+static real call_QMroutine(t_commrec gmx_unused *cr, t_forcerec gmx_unused *fr, t_QMrec gmx_unused *qm,
+                           t_MMrec gmx_unused *mm, rvec gmx_unused f[], rvec gmx_unused fshift[])
 {
     /* makes a call to the requested QM routine (qm->QMmethod)
      * Note that f is actually the gradient, i.e. -f
@@ -192,7 +184,7 @@ real call_QMroutine(t_commrec gmx_unused *cr, t_forcerec gmx_unused *fr, t_QMrec
     return (QMener);
 }
 
-void init_QMroutine(t_commrec gmx_unused *cr, t_QMrec gmx_unused *qm, t_MMrec gmx_unused *mm)
+static void init_QMroutine(t_commrec gmx_unused *cr, t_QMrec gmx_unused *qm, t_MMrec gmx_unused *mm)
 {
     /* makes a call to the requested QM routine (qm->QMmethod)
      */
@@ -220,7 +212,7 @@ void init_QMroutine(t_commrec gmx_unused *cr, t_QMrec gmx_unused *qm, t_MMrec gm
     }
 } /* init_QMroutine */
 
-void update_QMMM_coord(rvec x[], t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
+static void update_QMMM_coord(rvec x[], t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
 {
     /* shifts the QM and MM particles into the central box and stores
      * these shifted coordinates in the coordinate arrays of the
@@ -297,14 +289,14 @@ static void punch_QMMM_excl(t_QMrec *qm, t_MMrec *mm, t_blocka *excls)
 
 /* QMMM core routines */
 
-t_QMrec *mk_QMrec(void)
+static t_QMrec *mk_QMrec(void)
 {
     t_QMrec *qm;
     snew(qm, 1);
     return qm;
 } /* mk_QMrec */
 
-t_MMrec *mk_MMrec(void)
+static t_MMrec *mk_MMrec(void)
 {
     t_MMrec *mm;
     snew(mm, 1);
@@ -370,7 +362,7 @@ static void init_QMrec(int grpnr, t_QMrec *qm, int nr, int *atomarray,
 
 } /* init_QMrec */
 
-t_QMrec *copy_QMrec(t_QMrec *qm)
+static t_QMrec *copy_QMrec(t_QMrec *qm)
 {
     /* copies the contents of qm into a new t_QMrec struct */
     t_QMrec
index adeb79f39428d8a0c6acecd8a552bb2b543ef8c1..31a690df4cc392537940ad9955a24484783e0e04 100644 (file)
@@ -202,13 +202,13 @@ void cshake(const int iatom[], int ncon, int *nnit, int maxnit,
     *nerror = error;
 }
 
-int vec_shakef(FILE *fplog, gmx_shakedata_t shaked,
-               real invmass[], int ncon,
-               t_iparams ip[], t_iatom *iatom,
-               real tol, rvec x[], rvec prime[], real omega,
-               gmx_bool bFEP, real lambda, real scaled_lagrange_multiplier[],
-               real invdt, rvec *v,
-               gmx_bool bCalcVir, tensor vir_r_m_dr, int econq)
+static int vec_shakef(FILE *fplog, gmx_shakedata_t shaked,
+                      real invmass[], int ncon,
+                      t_iparams ip[], t_iatom *iatom,
+                      real tol, rvec x[], rvec prime[], real omega,
+                      gmx_bool bFEP, real lambda, real scaled_lagrange_multiplier[],
+                      real invdt, rvec *v,
+                      gmx_bool bCalcVir, tensor vir_r_m_dr, int econq)
 {
     rvec    *rij;
     real    *half_of_reduced_mass, *distance_squared_tolerance, *constraint_distance_squared;
index 6b32084ef8b9abd121a84f888e4fea53498187e6..8bd347ed45249d258034fbf9603ed8995b994924 100644 (file)
@@ -707,24 +707,24 @@ static void checkPotentialEnergyValidity(const gmx_enerdata_t *enerd)
     }
 }
 
-void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
-                         t_inputrec *inputrec,
-                         gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
-                         gmx_localtop_t *top,
-                         gmx_groups_t gmx_unused *groups,
-                         matrix box, rvec x[], history_t *hist,
-                         PaddedRVecVector *force,
-                         tensor vir_force,
-                         t_mdatoms *mdatoms,
-                         gmx_enerdata_t *enerd, t_fcdata *fcd,
-                         real *lambda, t_graph *graph,
-                         t_forcerec *fr, interaction_const_t *ic,
-                         gmx_vsite_t *vsite, rvec mu_tot,
-                         double t, gmx_edsam_t ed,
-                         gmx_bool bBornRadii,
-                         int flags,
-                         DdOpenBalanceRegionBeforeForceComputation ddOpenBalanceRegion,
-                         DdCloseBalanceRegionAfterForceComputation ddCloseBalanceRegion)
+static void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
+                                t_inputrec *inputrec,
+                                gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+                                gmx_localtop_t *top,
+                                gmx_groups_t gmx_unused *groups,
+                                matrix box, rvec x[], history_t *hist,
+                                PaddedRVecVector *force,
+                                tensor vir_force,
+                                t_mdatoms *mdatoms,
+                                gmx_enerdata_t *enerd, t_fcdata *fcd,
+                                real *lambda, t_graph *graph,
+                                t_forcerec *fr, interaction_const_t *ic,
+                                gmx_vsite_t *vsite, rvec mu_tot,
+                                double t, gmx_edsam_t ed,
+                                gmx_bool bBornRadii,
+                                int flags,
+                                DdOpenBalanceRegionBeforeForceComputation ddOpenBalanceRegion,
+                                DdCloseBalanceRegionAfterForceComputation ddCloseBalanceRegion)
 {
     int                 cg1, i, j;
     double              mu[2*DIM];
@@ -1465,23 +1465,23 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
     }
 }
 
-void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
-                        t_inputrec *inputrec,
-                        gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
-                        gmx_localtop_t *top,
-                        gmx_groups_t *groups,
-                        matrix box, rvec x[], history_t *hist,
-                        PaddedRVecVector *force,
-                        tensor vir_force,
-                        t_mdatoms *mdatoms,
-                        gmx_enerdata_t *enerd, t_fcdata *fcd,
-                        real *lambda, t_graph *graph,
-                        t_forcerec *fr, gmx_vsite_t *vsite, rvec mu_tot,
-                        double t, gmx_edsam_t ed,
-                        gmx_bool bBornRadii,
-                        int flags,
-                        DdOpenBalanceRegionBeforeForceComputation ddOpenBalanceRegion,
-                        DdCloseBalanceRegionAfterForceComputation ddCloseBalanceRegion)
+static void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
+                               t_inputrec *inputrec,
+                               gmx_int64_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+                               gmx_localtop_t *top,
+                               gmx_groups_t *groups,
+                               matrix box, rvec x[], history_t *hist,
+                               PaddedRVecVector *force,
+                               tensor vir_force,
+                               t_mdatoms *mdatoms,
+                               gmx_enerdata_t *enerd, t_fcdata *fcd,
+                               real *lambda, t_graph *graph,
+                               t_forcerec *fr, gmx_vsite_t *vsite, rvec mu_tot,
+                               double t, gmx_edsam_t ed,
+                               gmx_bool bBornRadii,
+                               int flags,
+                               DdOpenBalanceRegionBeforeForceComputation ddOpenBalanceRegion,
+                               DdCloseBalanceRegionAfterForceComputation ddCloseBalanceRegion)
 {
     int        cg0, cg1, i, j;
     double     mu[2*DIM];
index 03762e4929274055152b6666e7165467879b60cc..94704d32d647f4ebf2bf48a7eb5af5cc61f44f45 100644 (file)
@@ -49,6 +49,7 @@
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/smalloc.h"
 
+#include "keywords.h"
 #include "selmethod.h"
 
 /** Defines the comparison operator for comparison expressions. */
index d6844b0dd4d394022c1426eea0ebb442cb88c9a3..f330981f846c8921fb5cc483739a46af6f5625d6 100644 (file)
@@ -1336,7 +1336,7 @@ static real getRequestedChargeImbalance(t_swap *s)
  * This routine should be called for the 'anions' and 'cations' group,
  * of which the indices were lumped together in the older version of the code.
  */
-void copyIndicesToGroup(
+static void copyIndicesToGroup(
         int         *indIons,
         int          nIons,
         t_swapGroup *g,
@@ -1380,7 +1380,7 @@ void copyIndicesToGroup(
  * #4 cations        - empty before conversion
  *
  */
-void convertOldToNewGroupFormat(
+static void convertOldToNewGroupFormat(
         t_swapcoords *sc,
         gmx_mtop_t   *mtop,
         gmx_bool      bVerbose,
@@ -1437,7 +1437,7 @@ void convertOldToNewGroupFormat(
 /*! \brief Returns TRUE if we started from an old .tpr
  *
  * Then we need to re-sort anions and cations into separate groups */
-gmx_bool bConvertFromOldTpr(t_swapcoords *sc)
+static gmx_bool bConvertFromOldTpr(t_swapcoords *sc)
 {
     // If the last group has no atoms it means we need to convert!
     if ( (sc->ngrp >= 5) && (0 == sc->grp[4].nat) )
index a18a271a8eac93427f68918d91a2016bc2623c31..637c8d7dac37a54eeb2912397032215e0a06c22b 100644 (file)
@@ -185,8 +185,9 @@ gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, t_commrec gmx_unused
     return wc;
 }
 
-void wallcycle_destroy(gmx_wallcycle_t wc)
-{
+/* TODO: Should be called from finish_run() or runner()
+   void wallcycle_destroy(gmx_wallcycle_t wc)
+   {
     if (wc == nullptr)
     {
         return;
@@ -205,7 +206,8 @@ void wallcycle_destroy(gmx_wallcycle_t wc)
         sfree(wc->wcsc);
     }
     sfree(wc);
-}
+   }
+ */
 
 static void wallcycle_all_start(gmx_wallcycle_t wc, int ewc, gmx_cycles_t cycle)
 {
index 6b665a79a7362d7b202bc8d752a80dccb68ebfac..691d0b136d8b829d94cdb3b4578891d7fbcba0d0 100644 (file)
@@ -36,6 +36,8 @@
  */
 #include "gmxpre.h"
 
+#include "check.h"
+
 #include <cmath>
 #include <cstdio>
 #include <cstring>
@@ -376,7 +378,7 @@ static void chk_bonds(t_idef *idef, int ePBC, rvec *x, matrix box, real tol)
     }
 }
 
-void chk_trj(const gmx_output_env_t *oenv, const char *fn, const char *tpr, real tol)
+static void chk_trj(const gmx_output_env_t *oenv, const char *fn, const char *tpr, real tol)
 {
     t_trxframe       fr;
     t_count          count;
@@ -512,7 +514,7 @@ void chk_trj(const gmx_output_env_t *oenv, const char *fn, const char *tpr, real
     PRINTITEM ( "Box",        bBox );
 }
 
-void chk_tps(const char *fn, real vdw_fac, real bon_lo, real bon_hi)
+static void chk_tps(const char *fn, real vdw_fac, real bon_lo, real bon_hi)
 {
     int            natom, i, j, k;
     t_topology     top;
@@ -713,7 +715,7 @@ void chk_tps(const char *fn, real vdw_fac, real bon_lo, real bon_hi)
     }
 }
 
-void chk_ndx(const char *fn)
+static void chk_ndx(const char *fn)
 {
     t_blocka *grps;
     char    **grpname;
@@ -745,7 +747,7 @@ void chk_ndx(const char *fn)
     done_blocka(grps);
 }
 
-void chk_enx(const char *fn)
+static void chk_enx(const char *fn)
 {
     int            nre, fnr;
     ener_file_t    in;
index f63d708d4a5c6abc0dcb283b2ceecbb1ef305bfe..a2b32eb56ae762a2a8dbbf0c18832504248b16b9 100644 (file)
@@ -36,6 +36,8 @@
  */
 #include "gmxpre.h"
 
+#include "convert_tpr.h"
+
 #include <cmath>
 
 #include "gromacs/commandline/pargs.h"
index f960a00500a09143ad7822dce3f4870191e33d6a..c085126b61edf3102a190b458eb3e44a953d2b90 100644 (file)
@@ -36,6 +36,8 @@
  */
 #include "gmxpre.h"
 
+#include "dump.h"
+
 #include "config.h"
 
 #include <cassert>
@@ -276,7 +278,7 @@ static void list_trr(const char *fn)
     gmx_trr_close(fpread);
 }
 
-void list_xtc(const char *fn)
+static void list_xtc(const char *fn)
 {
     t_fileio   *xd;
     int         indent;
@@ -406,7 +408,7 @@ static void list_tng(const char gmx_unused *fn)
 #endif
 }
 
-void list_trx(const char *fn)
+static void list_trx(const char *fn)
 {
     switch (fn2ftp(fn))
     {
@@ -425,7 +427,7 @@ void list_trx(const char *fn)
     }
 }
 
-void list_ene(const char *fn)
+static void list_ene(const char *fn)
 {
     ener_file_t    in;
     gmx_bool       bCont;
index 149ac9560d4135ac1c9f7453c160956d61aa2a2b..c7d0a40521895531393841ce4c5aa1034f3bbcc5 100644 (file)
@@ -144,7 +144,7 @@ void gmx_set_max_backup_count(int count)
     s_maxBackupCount = count;
 }
 
-void push_ps(FILE *fp)
+static void push_ps(FILE *fp)
 {
     t_pstack *ps;
 
index 6a10a221492b59213d4dca301d7f17dd99d6936c..375df08f419c02671b58abd008f8421c491e6484 100644 (file)
@@ -824,7 +824,7 @@ static void rm_group(gmx_groups_t *groups, gmx_mtop_t *mtop, rm_t *rm_p, t_state
 }
 
 /* remove al bonded interactions from mtop for the molecule to be embedded */
-int rm_bonded(t_block *ins_at, gmx_mtop_t *mtop)
+static int rm_bonded(t_block *ins_at, gmx_mtop_t *mtop)
 {
     int       i, j, m;
     int       type, natom, nmol, at, atom1 = 0, rm_at = 0;
index e72e0640d7d9259d79b9b08840c50067b6c0b03c..0fe91c7e1e78b9ea6ed13df16313b9bc1fe79b9b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017, 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.
@@ -122,7 +122,7 @@ openEnergyFileToReadFields(const std::string              &filename,
 }
 
 //! Helper function to obtain resources
-t_enxframe *make_enxframe()
+static t_enxframe *make_enxframe()
 {
     t_enxframe *frame;
 
index ec775502486f03784b9a173deb18301c13468f7a..3ab7316310e5926ed65a5e3274c373d8406e7197 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017, 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.
@@ -55,7 +55,7 @@ namespace test
 {
 
 //! Build a simple .mdp file
-void organizeMdpFile(SimulationRunner *runner)
+static void organizeMdpFile(SimulationRunner *runner)
 {
     // Make sure -maxh has a chance to propagate
     runner->useStringAsMdpFile("nsteps = 100\n"
index 35b2a4e10682fe58924085031490a0c9ff43ed4b..fb237221b4c76cff6c47193859ab4a58e8e616de 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017, 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.
@@ -61,7 +61,7 @@ namespace test
 {
 
 //! Helper function to obtain resources
-t_trxframe *make_trxframe()
+static t_trxframe *make_trxframe()
 {
     t_trxframe *frame;
 
index 13104d405caa4dd970275610d6d5ea214d8c5c48..526552a190746e88da331daf7d280e0a933b1bed 100644 (file)
@@ -52,8 +52,8 @@ static const char *type[] = {
     "pixmap", "statictext",   "edittext", "defbutton"
 };
 
-void ReadDlgError(const char *infile, eDLGERR err, const char *s,
-                  const char *file, int line)
+static void ReadDlgError(const char *infile, eDLGERR err, const char *s,
+                         const char *file, int line)
 {
     std::fprintf(stderr, "Error: ");
     switch (err)
index a2c605462985fe3bbe886df287dbd0526ea5f1a5..e285dd43d4c3988851c7334ac4640e677e81cb76 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017, 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.
@@ -36,6 +36,8 @@
  */
 #include "gmxpre.h"
 
+#include "molps.h"
+
 #include <cstdlib>
 
 #include "gromacs/fileio/writeps.h"
index d27b367184080a6da7c28dd2465c3e6f6dab2cf7..f9920c2d470604c6ea2230660b6a9d132ada4826 100644 (file)
@@ -68,7 +68,7 @@ static t_atomcolor ac[] = {
 };
 #define NAC asize(ac)
 
-int search_ac(const char *type)
+static int search_ac(const char *type)
 {
     unsigned int i, nb, mij, best, besti;
 
@@ -114,7 +114,7 @@ t_rgb *Type2RGB(const char *type)
     return &(ac[i].rgb);
 }
 
-void DrawLegend(t_x11 *x11, t_windata *Win)
+static void DrawLegend(t_x11 *x11, t_windata *Win)
 {
 #define NLAB 6
 #define COLS 3
index fb19996a83b5192468d0d15ae2c23b721d02dd70..c1123cf54cb47b6e6e1ad1a9379b64188739dd67 100644 (file)
@@ -98,7 +98,7 @@ static bool MWCallBack(t_x11 *x11, XEvent *event, Window /*w*/, void *data)
     return false;
 }
 
-void set_def (t_molwin *mw, int ePBC, matrix box)
+static void set_def (t_molwin *mw, int ePBC, matrix box)
 {
     mw->bShowHydrogen = true;
     mw->bond_type     = eBFat;
@@ -368,10 +368,10 @@ int filter_vis(t_manager *man)
     return nvis;
 }
 
-void draw_objects(Display *disp, Window w, GC gc, int nobj,
-                  t_object objs[], iv2 vec2[], rvec x[],
-                  unsigned long col[], int size[], bool bShowHydro, int bond_type,
-                  bool bPlus)
+static void draw_objects(Display *disp, Window w, GC gc, int nobj,
+                         t_object objs[], iv2 vec2[], rvec x[],
+                         unsigned long col[], int size[], bool bShowHydro, int bond_type,
+                         bool bPlus)
 {
     bool         bBalls;
     int          i;
index 584d5c63c0722afbc3477b6eac9ab00058f43d88..94fae9e02073980f8bb25f5af74edff58d5fdd99 100644 (file)
@@ -48,7 +48,7 @@
 #include "x11.h"
 #include "xutil.h"
 
-bool ChildCallBack(t_x11 *x11, XEvent *event, Window w, void *data)
+static bool ChildCallBack(t_x11 *x11, XEvent *event, Window w, void *data)
 {
     t_child   *child;
     t_mentry  *m;
@@ -93,7 +93,7 @@ bool ChildCallBack(t_x11 *x11, XEvent *event, Window w, void *data)
     return false;
 }
 
-bool MenuCallBack(t_x11 *x11, XEvent *event, Window /*w*/, void *data)
+static bool MenuCallBack(t_x11 *x11, XEvent *event, Window /*w*/, void *data)
 {
     t_menu *m;
 
index 4bf597347582c455eb68c612b2064c0ba6d9f2eb..ce3c306b3a22b1c756507e71ee9353d77c21eeac 100644 (file)
@@ -36,6 +36,8 @@
  */
 #include "gmxpre.h"
 
+#include "view.h"
+
 #include "config.h"
 
 #include <cstdio>
index 230623820727904de9d1595033797b821f1c454b..027b116f4c45ee45381085750ab620f3f4d7f28c 100644 (file)
@@ -598,7 +598,7 @@ static bool DlgCB(t_x11 *x11, XEvent *event, Window w, void *data)
  * the item itself may not be freed until the dlg is done with
  *
  ****************************/
-void DoCreateDlg(t_dlg *dlg)
+static void DoCreateDlg(t_dlg *dlg)
 {
     XSizeHints           hints;
     XSetWindowAttributes attr;
index 69f1228665ecc4eac9a420a8c922bdf8404318df..155d1a3d1447261fb5ac120cf8f5191f6ade003b 100644 (file)
@@ -62,7 +62,7 @@ static int             icon_height = 0;
 static unsigned long   icon_fg     = 0;
 static unsigned long   icon_bg     = 0;
 
-void SetIcon(unsigned char *bits, int w, int h, unsigned long fg, unsigned long bg)
+static void SetIcon(unsigned char *bits, int w, int h, unsigned long fg, unsigned long bg)
 {
     icon_bits   = (bmchar *)bits;
     icon_width  = w;
index ca933a5a82d03b1344af645cd747b8be3bf6b35c..9a5c4fd0a4ae145532b1beb1db5ae5f0cca3949a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017, 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.
@@ -146,7 +146,7 @@ class ExactStringBlockChecker : public IReferenceDataEntryChecker
 
 
 //! Helper function to parse a floating-point reference data value.
-double convertDoubleReferenceValue(const std::string &value)
+static inline double convertDoubleReferenceValue(const std::string &value)
 {
     try
     {