gmxana: clean up -Wunused-parameter warnings
authorAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Sat, 29 Jun 2013 05:52:29 +0000 (09:52 +0400)
committerAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Sun, 14 Jul 2013 10:57:00 +0000 (14:57 +0400)
Clean up (most) of unused params

Change-Id: Ic9a521924e467d3779ed8c137f7afce44b200378
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
40 files changed:
src/gromacs/gmxana/anadih.c
src/gromacs/gmxana/autocorr.c
src/gromacs/gmxana/dlist.c
src/gromacs/gmxana/fitahx.c
src/gromacs/gmxana/fitahx.h
src/gromacs/gmxana/geminate.c
src/gromacs/gmxana/geminate.h
src/gromacs/gmxana/gmx_anadock.c
src/gromacs/gmxana/gmx_analyze.c
src/gromacs/gmxana/gmx_bar.c
src/gromacs/gmxana/gmx_chi.c
src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_confrms.c
src/gromacs/gmxana/gmx_current.c
src/gromacs/gmxana/gmx_densorder.c
src/gromacs/gmxana/gmx_dipoles.c
src/gromacs/gmxana/gmx_disre.c
src/gromacs/gmxana/gmx_dos.c
src/gromacs/gmxana/gmx_dyndom.c
src/gromacs/gmxana/gmx_energy.c
src/gromacs/gmxana/gmx_hbond.c
src/gromacs/gmxana/gmx_helix.c
src/gromacs/gmxana/gmx_hydorder.c
src/gromacs/gmxana/gmx_kinetics.c
src/gromacs/gmxana/gmx_mindist.c
src/gromacs/gmxana/gmx_msd.c
src/gromacs/gmxana/gmx_order.c
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_sham.c
src/gromacs/gmxana/gmx_sigeps.c
src/gromacs/gmxana/gmx_sorient.c
src/gromacs/gmxana/gmx_spol.c
src/gromacs/gmxana/gmx_tcaf.c
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxana/gmx_wheel.c
src/gromacs/gmxana/hxprops.c
src/gromacs/gmxana/hxprops.h
src/gromacs/legacyheaders/gstat.h
src/gromacs/legacyheaders/types/simple.h

index 5c854a93f3f0854e0d3e18f94205ebcb272e6174..fdce1a092f5fc4eae2bd5fa379efeb3db1b4e6d5 100644 (file)
@@ -69,7 +69,7 @@ void print_one(const output_env_t oenv, const char *base, const char *name,
     ffclose(fp);
 }
 
-static int calc_RBbin(real phi, int multiplicity, real core_frac)
+static int calc_RBbin(real phi, int gmx_unused multiplicity, real gmx_unused core_frac)
 {
     /* multiplicity and core_frac NOT used,
      * just given to enable use of pt-to-fn in caller low_ana_dih_trans*/
@@ -338,7 +338,7 @@ void low_ana_dih_trans(gmx_bool bTrans, const char *fn_trans,
 
 }
 
-void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih,
+void mk_multiplicity_lookup (int *multiplicity, int maxchi,
                              int nlist, t_dlist dlist[], int nangles)
 {
     /* new by grs - for dihedral j (as in dih[j]) get multiplicity from dlist
@@ -402,7 +402,7 @@ void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih,
 
 }
 
-void mk_chi_lookup (int **lookup, int maxchi, real **dih,
+void mk_chi_lookup (int **lookup, int maxchi,
                     int nlist, t_dlist dlist[])
 {
 
@@ -440,7 +440,7 @@ void mk_chi_lookup (int **lookup, int maxchi, real **dih,
 }
 
 
-void get_chi_product_traj (real **dih, int nframes, int nangles, int nlist,
+void get_chi_product_traj (real **dih, int nframes, int nlist,
                            int maxchi, t_dlist dlist[], real time[],
                            int **lookup, int *multiplicity, gmx_bool bRb, gmx_bool bNormalize,
                            real core_frac, gmx_bool bAll, const char *fnall,
@@ -667,7 +667,7 @@ void calc_distribution_props(int nh, int histo[], real start,
     *S2 = tdc*tdc+tds*tds;
 }
 
-static void calc_angles(FILE *log, t_pbc *pbc,
+static void calc_angles(t_pbc *pbc,
                         int n3, atom_id index[], real ang[], rvec x_s[])
 {
     int  i, ix, t1, t2;
@@ -721,7 +721,7 @@ static real calc_fraction(real angles[], int nangles)
     }
 }
 
-static void calc_dihs(FILE *log, t_pbc *pbc,
+static void calc_dihs(t_pbc *pbc,
                       int n4, atom_id index[], real ang[], rvec x_s[])
 {
     int  i, ix, t1, t2, t3;
@@ -870,11 +870,11 @@ void read_ang_dih(const char *trj_fn,
 
         if (bAngles)
         {
-            calc_angles(stdout, pbc, isize, index, angles[cur], x);
+            calc_angles(pbc, isize, index, angles[cur], x);
         }
         else
         {
-            calc_dihs(stdout, pbc, isize, index, angles[cur], x);
+            calc_dihs(pbc, isize, index, angles[cur], x);
 
             /* Trans fraction */
             fraction              = calc_fraction(angles[cur], nangles);
index 5cc1e8403d439268938e718c8c67e28906a26087..6ddced10883cf898b884614efe8d414929ae2a57 100644 (file)
@@ -55,7 +55,7 @@
 
 typedef struct {
     unsigned long mode;
-    int           nrestart, nout, P, fitfn, nskip;
+    int           nrestart, nout, P, fitfn;
     gmx_bool      bFour, bNormalize;
     real          tbeginfit, tendfit;
 } t_acf;
@@ -775,7 +775,7 @@ void low_do_autocorr(const char *fn, const output_env_t oenv, const char *title,
                      real dt, unsigned long mode, int nrestart,
                      gmx_bool bAver, gmx_bool bNormalize,
                      gmx_bool bVerbose, real tbeginfit, real tendfit,
-                     int eFitFn, int nskip)
+                     int eFitFn)
 {
     FILE       *fp, *gp = NULL;
     int         i, k, nfour;
@@ -983,8 +983,6 @@ t_pargs *add_acf_pargs(int *npargs, t_pargs *pa)
           "Order of Legendre polynomial for ACF (0 indicates none)" },
         { "-fitfn",    FALSE, etENUM, {s_ffn},
           "Fit function" },
-        { "-ncskip",   FALSE, etINT,  {&acf.nskip},
-          "Skip this many points in the output file of correlation functions" },
         { "-beginfit", FALSE, etREAL, {&acf.tbeginfit},
           "Time where to begin the exponential fit of the correlation function" },
         { "-endfit",   FALSE, etREAL, {&acf.tendfit},
@@ -1051,7 +1049,7 @@ void do_autocorr(const char *fn, const output_env_t oenv, const char *title,
     low_do_autocorr(fn, oenv, title, nframes, nitem, acf.nout, c1, dt, mode,
                     acf.nrestart, bAver, acf.bNormalize,
                     bDebugMode(), acf.tbeginfit, acf.tendfit,
-                    acf.fitfn, acf.nskip);
+                    acf.fitfn);
 }
 
 int get_acfnout(void)
index d2e7373be598e5f498e1986216a898bb1b80221a..cb01f0ea75cf5888a34150b5c47f3d3f38579ee8 100644 (file)
@@ -322,7 +322,7 @@ gmx_bool has_dihedral(int Dih, t_dlist *dl)
     return b;
 }
 
-static void pr_one_ro(FILE *fp, t_dlist *dl, int nDih, real dt)
+static void pr_one_ro(FILE *fp, t_dlist *dl, int nDih, real gmx_unused dt)
 {
     int k;
     for (k = 0; k < NROT; k++)
index 4c65b5032e11f7fead734634cc8de12b217ad061..f4f1ac3104d9eccbf2071183c653f2b8d9b2e4ac 100644 (file)
@@ -70,7 +70,7 @@ static void my_sub_xcm(int nbb, atom_id bbind[], rvec x[], rvec xcm)
 
 real fit_ahx(int nres, t_bb bb[], int natoms, int nall, atom_id allindex[],
              rvec x[], int nca,
-             atom_id caindex[], matrix box, gmx_bool bFit)
+             atom_id caindex[], gmx_bool bFit)
 {
     static rvec *xref = NULL;
     static real *mass = NULL;
index 0cb7137307fb015b997ba3cc62a2761e427bc7ba..ad8c6191c678875b942059259fc3561af649718b 100644 (file)
@@ -41,6 +41,6 @@
 #include "hxprops.h"
 
 extern real fit_ahx(int nres, t_bb bb[], int natoms, int nall, atom_id allindex[],
-                    rvec x[], int nca, atom_id caindex[], matrix box, gmx_bool bFit);
+                    rvec x[], int nca, atom_id caindex[], gmx_bool bFit);
 
 #endif
index 717f5dd22c56fdd5279c0ea2c0ccc0a65d115b94..7f852c3b32f8d0fb760eeb0b5d402dd030e5978c 100644 (file)
@@ -525,7 +525,7 @@ static double getLogIndex(const int i, const t_gemParams *params)
 extern t_gemParams *init_gemParams(const double sigma, const double D,
                                    const real *t, const int len, const int nFitPoints,
                                    const real begFit, const real endFit,
-                                   const real ballistic, const int nBalExp, const gmx_bool bDt)
+                                   const real ballistic, const int nBalExp)
 {
     double       tDelta;
     t_gemParams *p;
index b5894c82fc91abfdce8244ff4634d6ae305b2f7b..a3f5afd46912c14b9e9c32d2cd5d6dde3cc27364 100644 (file)
@@ -130,7 +130,7 @@ extern void takeAwayBallistic(double *ct, double *t,
 extern t_gemParams *init_gemParams(const double sigma, const double D,
                                    const real *t, const int len, const int nFitPoints,
                                    const real begFit, const real endFit,
-                                   const real ballistic, const int nBalExp, const gmx_bool bDt);
+                                   const real ballistic, const int nBalExp);
 
 /* Fit to geminate recombination model.
    Returns root mean square error of fit. */
index 1c68e21631dfc3ceebc6ee595bdef0018326fa8f..32859066e56dc35914a8057c091fb236a93766c5 100644 (file)
@@ -265,7 +265,7 @@ static void line(FILE *fp)
 }
 
 static void cluster_em_all(FILE *fp, int npdb, t_pdbfile *pdbf[],
-                           const char *pdbout, gmx_bool bFree, gmx_bool bRMSD, real cutoff)
+                           gmx_bool bFree, gmx_bool bRMSD, real cutoff)
 {
     int   i, j, k;
     int  *cndx, ncluster;
@@ -353,7 +353,6 @@ int gmx_anadock(int argc, char *argv[])
     };
     t_filenm        fnm[] = {
         { efPDB, "-f", NULL,       ffREAD  },
-        { efPDB, "-ox", "cluster", ffWRITE },
         { efXVG, "-od", "edocked", ffWRITE },
         { efXVG, "-of", "efree",   ffWRITE },
         { efLOG, "-g",  "anadock", ffWRITE }
@@ -388,8 +387,7 @@ int gmx_anadock(int argc, char *argv[])
     analyse_em_all(npdbf, pdbf, opt2fn("-od", NFILE, fnm), opt2fn("-of", NFILE, fnm),
                    oenv);
 
-    cluster_em_all(fp, npdbf, pdbf, opt2fn("-ox", NFILE, fnm),
-                   bFree, bRMS, cutoff);
+    cluster_em_all(fp, npdbf, pdbf, bFree, bRMS, cutoff);
 
     gmx_thanx(fp);
     ffclose(fp);
index 6a48bb1a55cbbdcb38fb6ecad70337a1afd4e8cc..a15c074775b2f9932f757df980088ca50cdd5c18 100644 (file)
@@ -643,7 +643,7 @@ static void estimate_error(const char *eefile, int nb_min, int resol, int n,
             }
             low_do_autocorr(NULL, oenv, NULL, n, 1, -1, &ac,
                             dt, eacNormal, 1, FALSE, TRUE,
-                            FALSE, 0, 0, effnNONE, 0);
+                            FALSE, 0, 0, effnNONE);
 
             fitlen = n/nb_min;
 
@@ -737,8 +737,7 @@ static void luzar_correl(int nn, real *time, int nset, real **val, real temp,
     }
 }
 
-static void filter(real flen, int n, int nset, real **val, real dt,
-                   const output_env_t oenv)
+static void filter(real flen, int n, int nset, real **val, real dt)
 {
     int     f, s, i, j;
     double *filt, sum, vf, fluc, fluctot;
@@ -886,11 +885,10 @@ static void do_fit(FILE *out, int n, gmx_bool bYdy,
 static void do_ballistic(const char *balFile, int nData,
                          real *t, real **val, int nSet,
                          real balTime, int nBalExp,
-                         gmx_bool bDerivative,
                          const output_env_t oenv)
 {
     double     **ctd   = NULL, *td = NULL;
-    t_gemParams *GP    = init_gemParams(0, 0, t, nData, 0, 0, 0, balTime, nBalExp, bDerivative);
+    t_gemParams *GP    = init_gemParams(0, 0, t, nData, 0, 0, 0, balTime, nBalExp);
     static char *leg[] = {"Ac'(t)"};
     FILE        *fp;
     int          i, set;
@@ -951,7 +949,7 @@ static void do_geminate(const char *gemFile, int nData,
 {
     double     **ctd = NULL, **ctdGem = NULL, *td = NULL;
     t_gemParams *GP  = init_gemParams(rcut, D, t, nData, nFitPoints,
-                                      begFit, endFit, balTime, 1, FALSE);
+                                      begFit, endFit, balTime, 1);
     const char  *leg[] = {"Ac\\sgem\\N(t)"};
     FILE        *fp;
     int          i, set;
@@ -1326,7 +1324,7 @@ int gmx_analyze(int argc, char *argv[])
 
     if (filtlen)
     {
-        filter(filtlen, n, nset, val, dt, oenv);
+        filter(filtlen, n, nset, val, dt);
     }
 
     if (msdfile)
@@ -1378,7 +1376,7 @@ int gmx_analyze(int argc, char *argv[])
     }
     if (balfile)
     {
-        do_ballistic(balfile, n, t, val, nset, balTime, nBalExp, bDer, oenv);
+        do_ballistic(balfile, n, t, val, nset, balTime, nBalExp, oenv);
     }
 /*   if (gemfile) */
 /*       do_geminate(gemfile,n,t,val,nset,diffusion,rcut,balTime, */
index c3e86fe453d98c4d649b5e89c43f344bbdc81ce3..f29509423fad73436dfc3ca9045cb447ed44b0d9 100644 (file)
@@ -2433,7 +2433,6 @@ static gmx_bool read_lambda_vector(const char   *str,
  */
 static gmx_bool legend2lambda(const char   *fn,
                               const char   *legend,
-                              xvg_t        *ba,
                               lambda_vec_t *lam)
 {
     double        lambda = 0;
@@ -2679,7 +2678,7 @@ static gmx_bool subtitle2lambda(const char *subtitle, xvg_t *ba, const char *fn,
     return bFound;
 }
 
-static void filename2lambda(const char *fn, xvg_t *ba)
+static void filename2lambda(const char *fn)
 {
     double        lambda;
     const char   *ptr, *digitptr;
@@ -2807,7 +2806,7 @@ static void read_bar_xvg_lowlevel(const char *fn, real *temp, xvg_t *ba,
             if (!native_lambda_read)
             {
                 /* Deduce lambda from the file name */
-                filename2lambda(fn, ba);
+                filename2lambda(fn);
                 native_lambda_read = TRUE;
             }
             ba->lambda[0] = ba->native_lambda;
@@ -2825,7 +2824,7 @@ static void read_bar_xvg_lowlevel(const char *fn, real *temp, xvg_t *ba,
             /* Read lambda from the legend */
             lambda_vec_init( &(ba->lambda[i]), lc );
             lambda_vec_copy( &(ba->lambda[i]), &(ba->native_lambda));
-            use = legend2lambda(fn, legend[i], ba, &(ba->lambda[i]));
+            use = legend2lambda(fn, legend[i], &(ba->lambda[i]));
             if (use)
             {
                 lambda_vec_print(&(ba->lambda[i]), buf, FALSE);
index 24f2fec9c06f095dbe62546ea0407419f587b6dd..0bdd7446d7147fb98be79206afb682b8d6161ad1 100644 (file)
@@ -995,8 +995,7 @@ static void do_rama(int nf, int nlist, t_dlist dlist[], real **dih,
 
 
 static void print_transitions(const char *fn, int maxchi, int nlist,
-                              t_dlist dlist[], t_atoms *atoms, rvec x[],
-                              matrix box, gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, real dt,
+                              t_dlist dlist[], real dt,
                               const output_env_t oenv)
 {
     /* based on order_params below */
@@ -1482,7 +1481,7 @@ int gmx_chi(int argc, char *argv[])
      * added multiplicity */
 
     snew(multiplicity, ndih);
-    mk_multiplicity_lookup(multiplicity, maxchi, dih, nlist, dlist, ndih);
+    mk_multiplicity_lookup(multiplicity, maxchi, nlist, dlist, ndih);
 
     strcpy(grpname, "All residues, ");
     if (bPhi)
@@ -1533,8 +1532,7 @@ int gmx_chi(int argc, char *argv[])
     /* transitions to xvg */
     if (bDo_rt)
     {
-        print_transitions(opt2fn("-rt", NFILE, fnm), maxchi, nlist, dlist,
-                          &atoms, x, box, bPhi, bPsi, bChi, traj_t_ns, oenv);
+        print_transitions(opt2fn("-rt", NFILE, fnm), maxchi, nlist, dlist, traj_t_ns, oenv);
     }
 
     /* chi_product trajectories (ie one "rotamer number" for each residue) */
@@ -1545,9 +1543,9 @@ int gmx_chi(int argc, char *argv[])
         {
             snew(chi_lookup[i], maxchi);
         }
-        mk_chi_lookup(chi_lookup, maxchi, dih, nlist, dlist);
+        mk_chi_lookup(chi_lookup, maxchi, nlist, dlist);
 
-        get_chi_product_traj(dih, nf, nactdih, nlist,
+        get_chi_product_traj(dih, nf, nactdih,
                              maxchi, dlist, time, chi_lookup, multiplicity,
                              FALSE, bNormHisto, core_frac, bAll,
                              opt2fn("-cp", NFILE, fnm), oenv);
index 78c1634ff4db4da1f9342faa951d85e8894399f6..dd4b940ec592f83588567cdd3d4ce1bf2f727234 100644 (file)
@@ -781,7 +781,7 @@ rvec **read_whole_trj(const char *fn, int isize, atom_id index[], int skip,
 }
 
 static int plot_clusters(int nf, real **mat, t_clusters *clust,
-                         int nlevels, int minstruct)
+                         int minstruct)
 {
     int  i, j, ncluster, ci;
     int *cl_id, *nstruct, *strind;
@@ -1805,7 +1805,7 @@ int gmx_cluster(int argc, char *argv[])
     {
         if (minstruct > 1)
         {
-            ncluster = plot_clusters(nf, rms->mat, &clust, nlevels, minstruct);
+            ncluster = plot_clusters(nf, rms->mat, &clust, minstruct);
         }
         else
         {
index 40286ec3984bef21ac724a58c995c8323466c4c7..b7a77d6922456b091e74c8d1289117dd7433380a 100644 (file)
@@ -123,9 +123,9 @@ int debug_strcmp(char s1[], char s2[])
     return strcmp(s1, s2);
 }
 
-int find_next_match_atoms_in_res(int *i1, int isize1, atom_id index1[],
+int find_next_match_atoms_in_res(int *i1, atom_id index1[],
                                  int m1, char **atnms1[],
-                                 int *i2, int isize2, atom_id index2[],
+                                 int *i2, atom_id index2[],
                                  int m2, char **atnms2[])
 {
     int      dx, dy, dmax, cmp;
@@ -388,8 +388,8 @@ void find_matching_names(int *isize1, atom_id index1[], t_atoms *atoms1,
             {
                 fprintf(debug, " [%d<%d %d<%d]", i1, m1, i2, m2);
             }
-            atcmp = find_next_match_atoms_in_res(&i1, *isize1, index1, m1, atnms1,
-                                                 &i2, *isize2, index2, m2, atnms2);
+            atcmp = find_next_match_atoms_in_res(&i1, index1, m1, atnms1,
+                                                 &i2, index2, m2, atnms2);
             if (debug)
             {
                 fprintf(debug, " -> %d %d %s-%s", i1, i2,
@@ -425,8 +425,8 @@ void find_matching_names(int *isize1, atom_id index1[], t_atoms *atoms1,
             {
                 fprintf(debug, " [%d<%d %d<%d]", i1, m1, i2, m2);
             }
-            atcmp = find_next_match_atoms_in_res(&i1, *isize1, index1, m1, atnms1,
-                                                 &i2, *isize2, index2, m2, atnms2);
+            atcmp = find_next_match_atoms_in_res(&i1, index1, m1, atnms1,
+                                                 &i2, index2, m2, atnms2);
             if (debug)
             {
                 fprintf(debug, " -> %d %d %s-%s", i1, i2,
index e81132b73123071d4dec6087e7af30de92eb7e21..de82a7db1dd9c903e31489fc72c674ef02f30149 100644 (file)
@@ -325,7 +325,7 @@ static real calc_cacf(FILE *fcacf, real prefactor, real cacf[], real time[], int
 
 }
 
-static void calc_mjdsp(FILE *fmjdsp, real vol, real temp, real prefactor, rvec mjdsp[], real dsp2[], real time[], int nfr, real refr[])
+static void calc_mjdsp(FILE *fmjdsp, real prefactor, real dsp2[], real time[], int nfr, real refr[])
 {
 
     int     i;
@@ -630,7 +630,7 @@ static void dielectric(FILE *fmj, FILE *fmd, FILE *outf, FILE *fcur, FILE *mcor,
 
     fprintf(stderr, "Prefactor fit E-H: 1 / 6.0*V*k_B*T: %g\n", prefactorav);
 
-    calc_mjdsp(fmjdsp, volume_av, temp, prefactorav, mjdsp, dsp2, time, nfr, xshfr);
+    calc_mjdsp(fmjdsp, prefactorav, dsp2, time, nfr, xshfr);
 
     /*
      * Now we can average and calculate the correlation functions
index 1a61fc6caf1eaa69ce09f06617a4c50dfb877945..fee0f4915d561a412fe1a759be3e35de42c74796 100644 (file)
@@ -101,7 +101,7 @@ static void center_coords(t_atoms *atoms, matrix box, rvec x0[], int axis)
 }
 
 
-static void density_in_time (const char *fn, atom_id **index, int gnx[], int grpn, real bw, real bwz, int nsttblock, real *****Densdevel, int *xslices, int *yslices, int *zslices, int *tblock, t_topology *top, int ePBC, int axis, gmx_bool bCenter, gmx_bool bps1d, const output_env_t oenv)
+static void density_in_time (const char *fn, atom_id **index, int gnx[], real bw, real bwz, int nsttblock, real *****Densdevel, int *xslices, int *yslices, int *zslices, int *tblock, t_topology *top, int ePBC, int axis, gmx_bool bCenter, gmx_bool bps1d, const output_env_t oenv)
 
 {
 /*
@@ -667,7 +667,6 @@ int gmx_densorder(int argc, char *argv[])
     static int         nsttblock = 100;
     static int         axis      = 2;
     static char       *axtitle   = "Z";
-    static int         ngrps     = 1;
     atom_id          **index; /* Index list for single group*/
     int                xslices, yslices, zslices, tblock;
     static gmx_bool    bGraph   = FALSE;
@@ -736,16 +735,16 @@ int gmx_densorder(int argc, char *argv[])
     bGraph   = opt2bSet("-og", NFILE, fnm);
     bOut     = opt2bSet("-o", NFILE, fnm);
     top      = read_top(ftp2fn(efTPX, NFILE, fnm), &ePBC);
-    snew(grpname, ngrps);
-    snew(index, ngrps);
-    snew(ngx, ngrps);
+    snew(grpname, 1);
+    snew(index, 1);
+    snew(ngx, 1);
 
 /* Calculate axis */
     axis = toupper(axtitle[0]) - 'X';
 
-    get_index(&top->atoms, ftp2fn_null(efNDX, NFILE, fnm), ngrps, ngx, index, grpname);
+    get_index(&top->atoms, ftp2fn_null(efNDX, NFILE, fnm), 1, ngx, index, grpname);
 
-    density_in_time(ftp2fn(efTRX, NFILE, fnm), index, ngx, ngrps, binw, binwz, nsttblock, &Densmap, &xslices, &yslices, &zslices, &tblock, top, ePBC, axis, bCenter, b1d, oenv);
+    density_in_time(ftp2fn(efTRX, NFILE, fnm), index, ngx, binw, binwz, nsttblock, &Densmap, &xslices, &yslices, &zslices, &tblock, top, ePBC, axis, bCenter, b1d, oenv);
 
     if (ftorder > 0)
     {
index 473ffc4e5bf53afb7ee4969a955dc330e2085f2b..b4fc0d7a023608987f666b714c82f14b9e3f9422 100644 (file)
@@ -726,7 +726,7 @@ static void do_dip(t_topology *top, int ePBC, real volume,
                    gmx_bool bPhi,     int  *nlevels,  int ndegrees,
                    int  ncos,
                    const char *cmap,    real rcmax,
-                   gmx_bool bQuad,    const char *quadfn,
+                   gmx_bool bQuad,
                    gmx_bool bMU,      const char *mufn,
                    int  *gnx,     int  *molindex[],
                    real mu_max,   real mu_aver,
@@ -1530,7 +1530,7 @@ int gmx_dipoles(int argc, char *argv[])
     };
     real           mu_max     = 5, mu_aver = -1, rcmax = 0;
     real           epsilonRF  = 0.0, temp = 300;
-    gmx_bool       bAverCorr  = FALSE, bMolCorr = FALSE, bPairs = TRUE, bPhi = FALSE;
+    gmx_bool       bAverCorr  = FALSE, bMolCorr = FALSE, bPairs = TRUE, bPhi = FALSE, bQuad = FALSE;
     const char    *corrtype[] = {NULL, "none", "mol", "molsep", "total", NULL};
     const char    *axtitle    = "Z";
     int            nslices    = 10; /* nr of slices defined       */
@@ -1552,6 +1552,8 @@ int gmx_dipoles(int argc, char *argv[])
           "Correlation function to calculate" },
         { "-pairs",    FALSE, etBOOL, {&bPairs},
           "Calculate [MAG][COS][GRK]theta[grk][cos][mag] between all pairs of molecules. May be slow" },
+        { "-quad",     FALSE, etBOOL, {&bQuad},
+          "Take quadrupole into account"},
         { "-ncos",     FALSE, etINT, {&ncos},
           "Must be 1 or 2. Determines whether the [CHEVRON][COS][GRK]theta[grk][cos][chevron] is computed between all molecules in one group, or between molecules in two different groups. This turns on the [TT]-g[tt] flag." },
         { "-axis",     FALSE, etSTR, {&axtitle},
@@ -1575,7 +1577,7 @@ int gmx_dipoles(int argc, char *argv[])
     int            nFF[2];
     atom_id      **grpindex;
     char         **grpname = NULL;
-    gmx_bool       bCorr, bQuad, bGkr, bMU, bSlab;
+    gmx_bool       bCorr, bGkr, bMU, bSlab;
     t_filenm       fnm[] = {
         { efEDR, "-en", NULL,         ffOPTRD },
         { efTRX, "-f", NULL,           ffREAD },
@@ -1591,7 +1593,6 @@ int gmx_dipoles(int argc, char *argv[])
         { efXVG, "-dip3d", "dip3d",    ffOPTWR },
         { efXVG, "-cos", "cosaver",    ffOPTWR },
         { efXPM, "-cmap", "cmap",       ffOPTWR },
-        { efXVG, "-q",   "quadrupole", ffOPTWR },
         { efXVG, "-slab", "slab",       ffOPTWR }
     };
 #define NFILE asize(fnm)
@@ -1619,7 +1620,6 @@ int gmx_dipoles(int argc, char *argv[])
     {
         gmx_fatal(FARGS, "Due to new ways of treating molecules in GROMACS the total dipole in the energy file may be incorrect, because molecules can be split over periodic boundary conditions before computing the dipole. Please use your trajectory file.");
     }
-    bQuad = opt2bSet("-q", NFILE, fnm);
     bGkr  = opt2bSet("-g", NFILE, fnm);
     if (opt2parg_bSet("-ncos", asize(pa), pa))
     {
@@ -1679,8 +1679,7 @@ int gmx_dipoles(int argc, char *argv[])
            bPhi,    &nlevels,  ndegrees,
            ncos,
            opt2fn("-cmap", NFILE, fnm), rcmax,
-           bQuad,   opt2fn("-q", NFILE, fnm),
-           bMU,     opt2fn("-en", NFILE, fnm),
+           bQuad, bMU,     opt2fn("-en", NFILE, fnm),
            gnx, grpindex, mu_max, mu_aver, epsilonRF, temp, nFF, skip,
            bSlab, nslices, axtitle, opt2fn("-slab", NFILE, fnm), oenv);
 
index 0dea4511aa1b85483d84b766b893e61ec351733e..87bf8639e446e33063f2bfd93cbc79727f7da5a1 100644 (file)
@@ -144,7 +144,7 @@ static void print5(FILE *fp)
 
 static void check_viol(FILE *log, t_commrec *cr,
                        t_ilist *disres, t_iparams forceparams[],
-                       t_functype functype[], rvec x[], rvec f[],
+                       rvec x[], rvec f[],
                        t_forcerec *fr, t_pbc *pbc, t_graph *g, t_dr_result dr[],
                        int clust_id, int isize, atom_id index[], real vvindex[],
                        t_fcdata *fcd)
@@ -859,13 +859,13 @@ int gmx_disre(int argc, char *argv[])
             my_clust = clust->inv_clust[j];
             range_check(my_clust, 0, clust->clust->nr);
             check_viol(fplog, cr, &(top->idef.il[F_DISRES]),
-                       top->idef.iparams, top->idef.functype,
+                       top->idef.iparams,
                        x, f, fr, pbc_null, g, dr_clust, my_clust, isize, index, vvindex, &fcd);
         }
         else
         {
             check_viol(fplog, cr, &(top->idef.il[F_DISRES]),
-                       top->idef.iparams, top->idef.functype,
+                       top->idef.iparams,
                        x, f, fr, pbc_null, g, &dr, 0, isize, index, vvindex, &fcd);
         }
         if (bPDB)
index 3a03d45418deeea642ef4b4c02c27833b09d97eb..42c5384e7e89a52154e439dc4faebaa80da3d593 100644 (file)
@@ -407,7 +407,7 @@ int gmx_dos(int argc, char *argv[])
                gnx, nframes);
     }
     low_do_autocorr(NULL, oenv, NULL, nframes, gnx, nframes, c1, dt, eacNormal, 0, FALSE,
-                    FALSE, FALSE, -1, -1, 0, 0);
+                    FALSE, FALSE, -1, -1, 0);
     snew(dos, DOS_NR);
     for (j = 0; (j < DOS_NR); j++)
     {
index a72bb7a61f45bdea936a58098ecbce62b8ffbf90..e5cae1a55f3a6ea5bf56c223646e19269afb074d 100644 (file)
 
 
 static void rot_conf(t_atoms *atoms, rvec x[], rvec v[], real trans, real angle,
-                     rvec head, rvec tail, matrix box, int isize, atom_id index[],
+                     rvec head, rvec tail, int isize, atom_id index[],
                      rvec xout[], rvec vout[])
 {
-    rvec     arrow, center, xcm;
+    rvec     arrow, xcm;
     real     theta, phi, arrow_len;
-    mat4     Rx, Ry, Rz, Rinvy, Rinvz, Mtot, Tcm, Tinvcm, Tx;
-    mat4     temp1, temp2, temp3, temp4, temp21, temp43;
+    mat4     Rx, Ry, Rz, Rinvy, Rinvz, Mtot;
+    mat4     temp1, temp2, temp3;
     vec4     xv;
     int      i, j, ai;
 
@@ -229,7 +229,7 @@ int gmx_dyndom(int argc, char *argv[])
         trans = trans0*0.1*angle/maxangle;
         printf("Frame: %2d (label %c), angle: %8.3f deg., trans: %8.3f nm\n",
                i, label, angle, trans);
-        rot_conf(&atoms, x, v, trans, angle, head, tail, box, isize, index, xout, vout);
+        rot_conf(&atoms, x, v, trans, angle, head, tail, isize, index, xout, vout);
 
         if (label > 'Z')
         {
index 0ee09ca6e1f78225140632556e6fe6c380a6ee22..409319c07ec03f51ffc5db77968fee302941873d 100644 (file)
@@ -973,7 +973,7 @@ static void remove_drift(int nset, int nbmin, int nbmax, real dt, enerdata_t *ed
 
 static void calc_fluctuation_props(FILE *fp,
                                    gmx_bool bDriftCorr, real dt,
-                                   int nset, int set[], int nmol,
+                                   int nset, int nmol,
                                    char **leg, enerdata_t *edat,
                                    int nbmin, int nbmax)
 {
@@ -1129,7 +1129,7 @@ static void calc_fluctuation_props(FILE *fp,
 }
 
 static void analyse_ener(gmx_bool bCorr, const char *corrfn,
-                         gmx_bool bFee, gmx_bool bSum, gmx_bool bFluct, gmx_bool bTempFluct,
+                         gmx_bool bFee, gmx_bool bSum, gmx_bool bFluct,
                          gmx_bool bVisco, const char *visfn, int nmol,
                          gmx_large_int_t start_step, double start_t,
                          gmx_large_int_t step, double t,
@@ -1385,13 +1385,13 @@ static void analyse_ener(gmx_bool bCorr, const char *corrfn,
             strcpy(buf, "Shear Viscosity");
             low_do_autocorr(corrfn, oenv, buf, edat->nframes, 3,
                             (edat->nframes+1)/2, eneset, Dt,
-                            eacNormal, 1, TRUE, FALSE, FALSE, 0.0, 0.0, 0, 1);
+                            eacNormal, 1, TRUE, FALSE, FALSE, 0.0, 0.0, 0);
 
             /* Now for bulk viscosity */
             strcpy(buf, "Bulk Viscosity");
             low_do_autocorr(corrfn, oenv, buf, edat->nframes, 1,
                             (edat->nframes+1)/2, &(eneset[11]), Dt,
-                            eacNormal, 1, TRUE, FALSE, FALSE, 0.0, 0.0, 0, 1);
+                            eacNormal, 1, TRUE, FALSE, FALSE, 0.0, 0.0, 0);
 
             factor = (Vaver*1e-26/(BOLTZMANN*Temp))*Dt;
             fp     = xvgropen(visfn, buf, "Time (ps)", "\\8h\\4 (cp)", oenv);
@@ -2791,7 +2791,7 @@ int gmx_energy(int argc, char *argv[])
     {
         double dt = (frame[cur].t-start_t)/(edat.nframes-1);
         analyse_ener(opt2bSet("-corr", NFILE, fnm), opt2fn("-corr", NFILE, fnm),
-                     bFee, bSum, bFluct, opt2parg_bSet("-nmol", npargs, ppa),
+                     bFee, bSum, opt2parg_bSet("-nmol", npargs, ppa),
                      bVisco, opt2fn("-vis", NFILE, fnm),
                      nmol,
                      start_step, start_t, frame[cur].step, frame[cur].t,
@@ -2800,7 +2800,7 @@ int gmx_energy(int argc, char *argv[])
                      oenv);
         if (bFluctProps)
         {
-            calc_fluctuation_props(stdout, bDriftCorr, dt, nset, set, nmol, leg, &edat,
+            calc_fluctuation_props(stdout, bDriftCorr, dt, nset, nmol, leg, &edat,
                                    nbmin, nbmax);
         }
     }
index 5fff37049fe7aedbe26e8be2d5ff379ef801760a..8c9cd720b9078f3b2bbc920a9b747d3e90a20b14 100644 (file)
@@ -352,7 +352,7 @@ static t_hbdata *mk_hbdata(gmx_bool bHBmap, gmx_bool bDAnr, gmx_bool oneHB, gmx_
     return hb;
 }
 
-static void mk_hbmap(t_hbdata *hb, gmx_bool bTwo)
+static void mk_hbmap(t_hbdata *hb)
 {
     int  i, j;
 
@@ -2718,7 +2718,7 @@ static void normalizeACF(real *ct, real *gt, int nhb, int len)
 static void do_hbac(const char *fn, t_hbdata *hb,
                     int nDump, gmx_bool bMerge, gmx_bool bContact, real fit_start,
                     real temp, gmx_bool R2, real smooth_tail_start, const output_env_t oenv,
-                    t_gemParams *params, const char *gemType, int nThreads,
+                    const char *gemType, int nThreads,
                     const int NN, const gmx_bool bBallistic, const gmx_bool bGemFit)
 {
     FILE          *fp;
@@ -3142,7 +3142,7 @@ static void do_hbac(const char *fn, t_hbdata *hb,
                                         if (rHbExGem[m][0] > 0  && n0+poff[m] < nn /*  && m==0 */)
                                         {
                                             low_do_autocorr(NULL, oenv, NULL, nframes, 1, -1, &(rHbExGem[m]), hb->time[1]-hb->time[0],
-                                                            eacNormal, 1, FALSE, bNorm, FALSE, 0, -1, 0, 1);
+                                                            eacNormal, 1, FALSE, bNorm, FALSE, 0, -1, 0);
                                             for (j = 0; (j < nn); j++)
                                             {
                                                 __ACDATA[j] += rHbExGem[m][j];
@@ -3337,7 +3337,7 @@ static void do_hbac(const char *fn, t_hbdata *hb,
 
                             /* The autocorrelation function is normalized after summation only */
                             low_do_autocorr(NULL, oenv, NULL, nframes, 1, -1, &rhbex, hb->time[1]-hb->time[0],
-                                            eacNormal, 1, FALSE, bNorm, FALSE, 0, -1, 0, 1);
+                                            eacNormal, 1, FALSE, bNorm, FALSE, 0, -1, 0);
 
                             /* Cross correlation analysis for thermodynamics */
                             for (j = nframes; (j < n2); j++)
@@ -3619,8 +3619,7 @@ static void dump_hbmap(t_hbdata *hb,
 
 /* sync_hbdata() updates the parallel t_hbdata p_hb using hb as template.
  * It mimics add_frames() and init_frame() to some extent. */
-static void sync_hbdata(t_hbdata *hb, t_hbdata *p_hb,
-                        int nframes, real t)
+static void sync_hbdata(t_hbdata *p_hb, int nframes)
 {
     int i;
     if (nframes >= p_hb->max_frames)
@@ -3729,7 +3728,7 @@ int gmx_hbond(int argc, char *argv[])
     static int         nDump    = 0, nFitPoints = 100;
     static int         nThreads = 0, nBalExp = 4;
 
-    static gmx_bool    bContact     = FALSE, bBallistic = FALSE, bBallisticDt = FALSE, bGemFit = FALSE;
+    static gmx_bool    bContact     = FALSE, bBallistic = FALSE, bGemFit = FALSE;
     static real        logAfterTime = 10, gemBallistic = 0.2; /* ps */
     static const char *NNtype[]     = {NULL, "none", "binary", "oneOverR3", "dipole", NULL};
 
@@ -4090,7 +4089,7 @@ int gmx_hbond(int argc, char *argv[])
     {
         printf("Making hbmap structure...");
         /* Generate hbond data structure */
-        mk_hbmap(hb, bTwo);
+        mk_hbmap(hb);
         printf("done.\n");
     }
 
@@ -4270,7 +4269,7 @@ int gmx_hbond(int argc, char *argv[])
 
             if (bOMP)
             {
-                sync_hbdata(hb, p_hb[threadNr], nframes, t);
+                sync_hbdata(p_hb[threadNr], nframes);
             }
 #pragma omp single
             {
@@ -4746,7 +4745,7 @@ int gmx_hbond(int argc, char *argv[])
             if (bGem || bNN)
             {
                 params = init_gemParams(rcut, D, hb->time, hb->nframes/2, nFitPoints, fit_start, fit_end,
-                                        gemBallistic, nBalExp, bBallisticDt);
+                                        gemBallistic, nBalExp);
                 if (params == NULL)
                 {
                     gmx_fatal(FARGS, "Could not initiate t_gemParams params.");
@@ -4755,7 +4754,7 @@ int gmx_hbond(int argc, char *argv[])
             gemstring = strdup(gemType[hb->per->gemtype]);
             do_hbac(opt2fn("-ac", NFILE, fnm), hb, nDump,
                     bMerge, bContact, fit_start, temp, r2cut > 0, smooth_tail_start, oenv,
-                    params, gemstring, nThreads, NN, bBallistic, bGemFit);
+                    gemstring, nThreads, NN, bBallistic, bGemFit);
         }
         if (opt2bSet("-life", NFILE, fnm))
         {
index 54b0bafc2923994877e780736f855af29de5309f..883ff82b7fdf9e243fb368f8396405d1f914bea6 100644 (file)
@@ -260,8 +260,8 @@ int gmx_helix(int argc, char *argv[])
     snew(xref, top->atoms.nr);
     read_tpx(ftp2fn(efTPX, NFILE, fnm),
              NULL, NULL, &natoms, xref, NULL, NULL, NULL);
-    calc_hxprops(nres, bb, xref, box);
-    do_start_end(nres, bb, xref, &nbb, bbindex, &nca, caindex, bRange, rStart, rEnd);
+    calc_hxprops(nres, bb, xref);
+    do_start_end(nres, bb, &nbb, bbindex, &nca, caindex, bRange, rStart, rEnd);
     sfree(xref);
     if (bDBG)
     {
@@ -282,15 +282,15 @@ int gmx_helix(int argc, char *argv[])
         gmx_rmpbc(gpbc, natoms, box, x);
 
 
-        calc_hxprops(nres, bb, x, box);
+        calc_hxprops(nres, bb, x);
         if (bCheck)
         {
-            do_start_end(nres, bb, x, &nbb, bbindex, &nca, caindex, FALSE, 0, 0);
+            do_start_end(nres, bb, &nbb, bbindex, &nca, caindex, FALSE, 0, 0);
         }
 
         if (nca >= 5)
         {
-            rms = fit_ahx(nres, bb, natoms, nall, allindex, x, nca, caindex, box, bFit);
+            rms = fit_ahx(nres, bb, natoms, nall, allindex, x, nca, caindex, bFit);
 
             if (teller == 1)
             {
@@ -299,13 +299,13 @@ int gmx_helix(int argc, char *argv[])
             }
 
             xf[efhRAD].val   = radius(xf[efhRAD].fp2, nca, caindex, x);
-            xf[efhTWIST].val = twist(xf[efhTWIST].fp2, nca, caindex, x);
+            xf[efhTWIST].val = twist(nca, caindex, x);
             xf[efhRISE].val  = rise(nca, caindex, x);
-            xf[efhLEN].val   = ahx_len(nca, caindex, x, box);
+            xf[efhLEN].val   = ahx_len(nca, caindex, x);
             xf[efhCD222].val = ellipticity(nres, bb);
             xf[efhDIP].val   = dip(nbb, bbindex, x, top->atoms.atom);
             xf[efhRMS].val   = rms;
-            xf[efhCPHI].val  = ca_phi(nca, caindex, x, box);
+            xf[efhCPHI].val  = ca_phi(nca, caindex, x);
             xf[efhPPRMS].val = pprms(xf[efhPPRMS].fp2, nres, bb);
 
             for (j = 0; (j <= efhCPHI); j++)
index abf30f4ecae8b9490e9d161815881eaf73eb6193..e742d16182bc348c724be3b074cdf91cd744cab8 100644 (file)
@@ -87,7 +87,7 @@ static void check_length(real length, int a, int b)
 static void find_tetra_order_grid(t_topology top, int ePBC,
                                   int natoms, matrix box,
                                   rvec x[], int maxidx, atom_id index[],
-                                  real time, real *sgmean, real *skmean,
+                                  real *sgmean, real *skmean,
                                   int nslicex, int nslicey, int nslicez,
                                   real ***sggrid, real ***skgrid)
 {
@@ -367,7 +367,7 @@ static void calc_tetra_order_interface(const char *fnNDX, const char *fnTPS, con
             }
         }
 
-        find_tetra_order_grid(top, ePBC, natoms, box, x, isize[0], index[0], t,
+        find_tetra_order_grid(top, ePBC, natoms, box, x, isize[0], index[0],
                               &sg, &sk, *nslicex, *nslicey, nslicez, sg_grid, sk_grid);
         for (i = 0; i < *nslicex; i++)
         {
index f3da5028a55e3acad038a34312f3eb274db735f2..f3a31688281ad23bf01a773ddd0aeb2865dcfacb 100644 (file)
@@ -377,7 +377,7 @@ static double my_f(const gsl_vector *v, void *params)
     }
 }
 
-static void optimize_remd_parameters(FILE *fp, t_remd_data *d, int maxiter,
+static void optimize_remd_parameters(t_remd_data *d, int maxiter,
                                      real tol)
 {
     real   size, d2;
@@ -1002,7 +1002,7 @@ int gmx_kinetics(int argc, char *argv[])
     preprocess_remd(fp, &remd, cutoff, tref, ucut, bBack, Euf, Efu, Ei, t0, t1,
                     bSum, bDiscrete, nmult);
 
-    optimize_remd_parameters(fp, &remd, maxiter, tol);
+    optimize_remd_parameters(&remd, maxiter, tol);
 
     dump_remd_parameters(fp, &remd, opt2fn("-o", NFILE, fnm),
                          opt2fn_null("-o2", NFILE, fnm),
@@ -1024,7 +1024,7 @@ int gmx_kinetics(int argc, char *argv[])
             remd.nmask++;
         }
         sum_ft(&remd);
-        optimize_remd_parameters(fp, &remd, maxiter, tol);
+        optimize_remd_parameters(&remd, maxiter, tol);
         dump_remd_parameters(fp, &remd, "test1.xvg", NULL, NULL, NULL, NULL, skip, tref, oenv);
 
         for (i = 0; (i < remd.nreplica); i++)
@@ -1034,7 +1034,7 @@ int gmx_kinetics(int argc, char *argv[])
         remd.nmask = remd.nreplica - remd.nmask;
 
         sum_ft(&remd);
-        optimize_remd_parameters(fp, &remd, maxiter, tol);
+        optimize_remd_parameters(&remd, maxiter, tol);
         dump_remd_parameters(fp, &remd, "test2.xvg", NULL, NULL, NULL, NULL, skip, tref, oenv);
 
         for (i = 0; (i < remd.nreplica); i++)
@@ -1048,7 +1048,7 @@ int gmx_kinetics(int argc, char *argv[])
             remd.nmask++;
         }
         sum_ft(&remd);
-        optimize_remd_parameters(fp, &remd, maxiter, tol);
+        optimize_remd_parameters(&remd, maxiter, tol);
         dump_remd_parameters(fp, &remd, "test1.xvg", NULL, NULL, NULL, NULL, skip, tref, oenv);
 
         for (i = 0; (i < remd.nreplica); i++)
@@ -1062,7 +1062,7 @@ int gmx_kinetics(int argc, char *argv[])
             remd.nmask++;
         }
         sum_ft(&remd);
-        optimize_remd_parameters(fp, &remd, maxiter, tol);
+        optimize_remd_parameters(&remd, maxiter, tol);
         dump_remd_parameters(fp, &remd, "test1.xvg", NULL, NULL, NULL, NULL, skip, tref, oenv);
     }
     ffclose(fp);
index 536094832f0e05187ea34df50db962dd51ae7f0c..2d5543f26135352ffbcbd01b188054705ce6d59c 100644 (file)
@@ -598,7 +598,7 @@ int find_residues(t_atoms *atoms, int n, atom_id index[], atom_id **resindex)
     return nres;
 }
 
-void dump_res(FILE *out, int nres, atom_id *resindex, int n, atom_id index[])
+void dump_res(FILE *out, int nres, atom_id *resindex, atom_id index[])
 {
     int i, j;
 
@@ -768,7 +768,7 @@ int gmx_mindist(int argc, char *argv[])
                              gnx[0], index[0], &residues);
         if (debug)
         {
-            dump_res(debug, nres, residues, gnx[0], index[0]);
+            dump_res(debug, nres, residues, index[0]);
         }
     }
 
index ac7dcb658b581fed765f10bc2ba849716bbde716..8718b180d84b16da99c4d76efd15e00981e6851d 100644 (file)
@@ -95,8 +95,8 @@ typedef struct {
                                  point. */
 } t_corr;
 
-typedef real t_calc_func (t_corr *, int, atom_id[], int, rvec[], rvec, gmx_bool, matrix,
-                          const output_env_t oenv);
+typedef real t_calc_func (t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
+                          rvec dcom, gmx_bool bTen, matrix mat);
 
 static real thistime(t_corr *curr)
 {
@@ -218,8 +218,7 @@ static void corr_print(t_corr *curr, gmx_bool bTen, const char *fn, const char *
 
 /* called from corr_loop, to do the main calculations */
 static void calc_corr(t_corr *curr, int nr, int nx, atom_id index[], rvec xc[],
-                      gmx_bool bRmCOMM, rvec com, t_calc_func *calc1, gmx_bool bTen,
-                      const output_env_t oenv)
+                      gmx_bool bRmCOMM, rvec com, t_calc_func *calc1, gmx_bool bTen)
 {
     int    nx0;
     real   g;
@@ -251,7 +250,7 @@ static void calc_corr(t_corr *curr, int nr, int nx, atom_id index[], rvec xc[],
         {
             clear_rvec(dcom);
         }
-        g = calc1(curr, nx, index, nx0, xc, dcom, bTen, mat, oenv);
+        g = calc1(curr, nx, index, nx0, xc, dcom, bTen, mat);
 #ifdef DEBUG2
         printf("g[%d]=%g\n", nx0, g);
 #endif
@@ -267,7 +266,7 @@ static void calc_corr(t_corr *curr, int nr, int nx, atom_id index[], rvec xc[],
 
 /* the non-mass-weighted mean-squared displacement calcuation */
 static real calc1_norm(t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
-                       rvec dcom, gmx_bool bTen, matrix mat, const output_env_t oenv)
+                       rvec dcom, gmx_bool bTen, matrix mat)
 {
     int  i, ix, m, m2;
     real g, r, r2;
@@ -405,7 +404,7 @@ static real calc_one_mw(t_corr *curr, int ix, int nx0, rvec xc[], real *tm,
 
 /* the normal, mass-weighted mean-squared displacement calcuation */
 static real calc1_mw(t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
-                     rvec dcom, gmx_bool bTen, matrix mat, const output_env_t oenv)
+                     rvec dcom, gmx_bool bTen, matrix mat)
 {
     int  i;
     real g, tm;
@@ -521,8 +520,8 @@ static void calc_com(gmx_bool bMol, int gnx, atom_id index[],
 }
 
 
-static real calc1_mol(t_corr *curr, int nx, atom_id index[], int nx0, rvec xc[],
-                      rvec dcom, gmx_bool bTen, matrix mat, const output_env_t oenv)
+static real calc1_mol(t_corr *curr, int nx, atom_id gmx_unused index[], int nx0, rvec xc[],
+                      rvec dcom, gmx_bool bTen, matrix mat)
 {
     int  i;
     real g, tm, gtot, tt;
@@ -815,7 +814,7 @@ int corr_loop(t_corr *curr, const char *fn, t_topology *top, int ePBC,
         {
             /* calculate something useful, like mean square displacements */
             calc_corr(curr, i, gnx[i], index[i], xa[cur], (gnx_com != NULL), com,
-                      calc1, bTen, oenv);
+                      calc1, bTen);
         }
         cur    = prev;
         t_prev = t;
index 417f37db8889cbc010428ef849d91647dca630a1..1ff165a2f1a0fd6144e3656a83eacc6a649c0b37 100644 (file)
 /* P.J. van Maaren, November 2005     Added tetrahedral stuff               */
 /****************************************************************************/
 
-static void find_nearest_neighbours(t_topology top, int ePBC,
+static void find_nearest_neighbours(int ePBC,
                                     int natoms, matrix box,
                                     rvec x[], int maxidx, atom_id index[],
-                                    real time,
                                     real *sgmean, real *skmean,
                                     int nslice, int slice_dim,
                                     real sgslice[], real skslice[],
@@ -306,7 +305,7 @@ static void calc_tetra_order_parm(const char *fnNDX, const char *fnTPS,
     nframes = 0;
     do
     {
-        find_nearest_neighbours(top, ePBC, natoms, box, x, isize[0], index[0], t,
+        find_nearest_neighbours(ePBC, natoms, box, x, isize[0], index[0],
                                 &sg, &sk, nslice, slice_dim, sg_slice, sk_slice, gpbc);
         for (i = 0; (i < nslice); i++)
         {
index a27ed7ed662520edfa17907afdd1d7d6f4aff3f6..ed92c87dbb20868244934dbbb1992d5cc4c8340d 100644 (file)
@@ -421,7 +421,7 @@ static real estimate_reciprocal(
         rvec         x[],   /* array of particles */
         real         q[],   /* array of charges */
         int          nr,    /* number of charges = size of the charge array */
-        FILE        *fp_out,
+        FILE  gmx_unused  *fp_out,
         gmx_bool     bVerbose,
         unsigned int seed,     /* The seed for the random number generator */
         int         *nsamples, /* Return the number of samples used if Monte Carlo
index 2f54909d2fa0884ce55d6cd960b420f69d096c94..7b6dcc109f5d87200cbf6ed235e8dbd8894b735a 100644 (file)
@@ -418,7 +418,7 @@ static void do_sham(const char *fn, const char *ndx,
                     real Tref,
                     real pmax, real gmax,
                     real *emin, real *emax, int nlevels, real pmin,
-                    const char *mname, gmx_bool bSham, int *idim, int *ibox,
+                    const char *mname, int *idim, int *ibox,
                     gmx_bool bXmin, real *xmin, gmx_bool bXmax, real *xmax)
 {
     FILE        *fp;
@@ -965,7 +965,7 @@ int gmx_sham(int argc, char *argv[])
         "is the natural quantity to use, as it will produce bins of the same",
         "volume."
     };
-    static real        tb        = -1, te = -1, frac = 0.5, filtlen = 0, binwidth = 0.1;
+    static real        tb        = -1, te = -1, frac = 0.5, filtlen = 0;
     static gmx_bool    bHaveT    = TRUE, bDer = FALSE, bSubAv = TRUE, bAverCorr = FALSE, bXYdy = FALSE;
     static gmx_bool    bEESEF    = FALSE, bEENLC = FALSE, bEeFitAc = FALSE, bPower = FALSE;
     static gmx_bool    bShamEner = TRUE, bSham = TRUE;
@@ -988,8 +988,6 @@ int gmx_sham(int argc, char *argv[])
           "Read this number of sets separated by lines containing only an ampersand" },
         { "-d",       FALSE, etBOOL, {&bDer},
           "Use the derivative" },
-        { "-bw",      FALSE, etREAL, {&binwidth},
-          "Binwidth for the distribution" },
         { "-sham",    FALSE, etBOOL, {&bSham},
           "Turn off energy weighting even if energies are given" },
         { "-tsham",   FALSE, etREAL, {&Tref},
@@ -1164,7 +1162,7 @@ int gmx_sham(int argc, char *argv[])
             opt2parg_bSet("-emin", NPA, pa) ? &emin : NULL,
             opt2parg_bSet("-emax", NPA, pa) ? &emax : NULL,
             nlevels, pmin,
-            mname, bSham, idim, ibox,
+            mname, idim, ibox,
             opt2parg_bSet("-xmin", NPA, pa), rmin,
             opt2parg_bSet("-xmax", NPA, pa), rmax);
 
index 09481d0a49d42cda2f74825ea3881350e22f5bd9..61ea4a647386982259debb13c83a5dd67c68355d 100644 (file)
@@ -62,7 +62,7 @@ real pot(real x, real qq, real c6, real cn, int npow)
     return cn*pow(x, -npow)-c6*pow(x, -6)+qq*ONE_4PI_EPS0/x;
 }
 
-real bhpot(real x, real qq, real A, real B, real C)
+real bhpot(real x, real A, real B, real C)
 {
     return A*exp(-B*x) - C*pow(x, -6.0);
 }
@@ -173,7 +173,7 @@ int gmx_sigeps(int argc, char *argv[])
         x        = sigfac*sig+sig*i*0.02;
         dp[next] = dpot(x, qq, c6, cn, npow);
         fprintf(fp, "%10g  %10g  %10g\n", x, pot(x, qq, c6, cn, npow),
-                bhpot(x, qq, Abh, Bbh, Cbh));
+                bhpot(x, Abh, Bbh, Cbh));
         if (qq != 0)
         {
             if ((i > 0) && (dp[cur]*dp[next] < 0))
index 2ac9537768c079c409543fe1c0d6c32bfb8a28d6..aefb2380dc2716f7f5c6d0a5769bcf558f947b0c 100644 (file)
@@ -49,7 +49,7 @@
 
 
 static void calc_com_pbc(int nrefat, t_topology *top, rvec x[], t_pbc *pbc,
-                         atom_id index[], rvec xref, gmx_bool bPBC, matrix box)
+                         atom_id index[], rvec xref, gmx_bool bPBC)
 {
     const real tol = 1e-4;
     gmx_bool   bChanged;
@@ -288,7 +288,7 @@ int gmx_sorient(int argc, char *argv[])
         {
             if (bCom)
             {
-                calc_com_pbc(nrefat, &top, x, &pbc, index[0], xref, bPBC, box);
+                calc_com_pbc(nrefat, &top, x, &pbc, index[0], xref, bPBC);
             }
             else
             {
index 67dabb39cccd6cc8d3ca9989e8693c07f4f7645b..abccd8de06631f13c0930bb180b6aa82e081f00e 100644 (file)
@@ -50,7 +50,7 @@
 
 
 static void calc_com_pbc(int nrefat, t_topology *top, rvec x[], t_pbc *pbc,
-                         atom_id index[], rvec xref, int ePBC, matrix box)
+                         atom_id index[], rvec xref, int ePBC)
 {
     const real tol = 1e-4;
     gmx_bool   bChanged;
@@ -273,7 +273,7 @@ int gmx_spol(int argc, char *argv[])
         set_pbc(&pbc, ir->ePBC, box);
         if (bCom)
         {
-            calc_com_pbc(nrefat, top, x, &pbc, index[0], xref, ir->ePBC, box);
+            calc_com_pbc(nrefat, top, x, &pbc, index[0], xref, ir->ePBC);
         }
 
         for (m = 0; m < isize[1]; m++)
index 96ee7e13648cbdd795c3732a464cad0c7ddf268c..9e3dc7592b7aca99bf9647a3cb98a4af5ee9a4aa 100644 (file)
@@ -129,7 +129,7 @@ static void process_tcaf(int nframes, real dt, int nkc, real **tc, rvec *kfac,
 
     low_do_autocorr(fn_tca, oenv, "Transverse Current Autocorrelation Functions",
                     nframes, ntc, ncorr, tc, dt, eacNormal,
-                    1, FALSE, FALSE, FALSE, 0, 0, 0, 0);
+                    1, FALSE, FALSE, FALSE, 0, 0, 0);
     do_view(oenv, fn_tca, "-nxy");
 
     fp = xvgropen(fn_tc, "Transverse Current Autocorrelation Functions",
index d5c1246ca9b5de5b0206eb52ae116873c2d0f168..3313a9a8f82cbe8327f762d19a9cb2b28c819f25 100644 (file)
@@ -72,8 +72,7 @@ enum {
 
 
 static void calc_pbc_cluster(int ecenter, int nrefat, t_topology *top, int ePBC,
-                             rvec x[], atom_id index[],
-                             rvec clust_com, matrix box, rvec clustercenter)
+                             rvec x[], atom_id index[], matrix box)
 {
     int       m, i, j, j0, j1, jj, ai, aj;
     int       imin, jmin;
@@ -734,7 +733,6 @@ int gmx_trjconv(int argc, char *argv[])
     static char     *exec_command  = NULL;
     static real      dropunder     = 0, dropover = 0;
     static gmx_bool  bRound        = FALSE;
-    static rvec      clustercenter = {0, 0, 0};
 
     t_pargs
         pa[] =
@@ -766,9 +764,6 @@ int gmx_trjconv(int argc, char *argv[])
         { "-box", FALSE, etRVEC,
           { newbox },
           "Size for new cubic box (default: read from input)" },
-        { "-clustercenter", FALSE, etRVEC,
-          { clustercenter },
-          "Optional starting point for pbc cluster option" },
         { "-trans", FALSE, etRVEC,
           { trans },
           "All coordinates will be translated by trans. This "
@@ -1449,9 +1444,7 @@ int gmx_trjconv(int argc, char *argv[])
                 }
                 else if (bCluster)
                 {
-                    rvec com;
-
-                    calc_pbc_cluster(ecenter, ifit, &top, ePBC, fr.x, ind_fit, com, fr.box, clustercenter);
+                    calc_pbc_cluster(ecenter, ifit, &top, ePBC, fr.x, ind_fit, fr.box);
                 }
 
                 if (bPFit)
index 7fb0ec3b1ec41bbe03ba1d71b3af2539928c057b..238de2b23078b7156734285e79a90ec33f3af402 100644 (file)
@@ -2528,8 +2528,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, t_UmbrellaOptions *opt,
-                                        const char* fn)
+void readIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins, const char* fn)
 {
     int      nlines, ny, i, ig;
     double **iact;
@@ -2787,7 +2786,7 @@ void calcIntegratedAutocorrelationTimes(t_UmbrellaWindow *window, int nwins,
 /*! \brief
  * compute average and sigma of each umbrella histogram
  */
-void averageSigma(t_UmbrellaWindow *window, int nwins, t_UmbrellaOptions *opt)
+void averageSigma(t_UmbrellaWindow *window, int nwins)
 {
     int  i, ig, ntot, k;
     real av, sum2, sig, diff, *ztime, nSamplesIndep;
@@ -2942,8 +2941,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,
-                           char *fn)
+void guessPotByIntegration(t_UmbrellaWindow *window, int nWindows, t_UmbrellaOptions *opt)
 {
     int    i, j, ig, bins = opt->bins, nHist, winmin, groupmin;
     double dz, min = opt->min, *pot, pos, hispos, dist, diff, fAv, distmin, *f;
@@ -3552,7 +3550,7 @@ int gmx_wham(int argc, char *argv[])
     /* Integrated autocorrelation times provided ? */
     if (opt.bTauIntGiven)
     {
-        readIntegratedAutocorrelationTimes(window, nwins, &opt, opt2fn("-iiact", NFILE, fnm));
+        readIntegratedAutocorrelationTimes(window, nwins, opt2fn("-iiact", NFILE, fnm));
     }
 
     /* Compute integrated autocorrelation times */
@@ -3565,13 +3563,13 @@ int gmx_wham(int argc, char *argv[])
        (maybe required for bootstrapping. If not, this is fast anyhow) */
     if (opt.nBootStrap && opt.bsMethod == bsMethod_trajGauss)
     {
-        averageSigma(window, nwins, &opt);
+        averageSigma(window, nwins);
     }
 
     /* Get initial potential by simple integration */
     if (opt.bInitPotByIntegration)
     {
-        guessPotByIntegration(window, nwins, &opt, 0);
+        guessPotByIntegration(window, nwins, &opt);
     }
 
     /* Check if complete reaction coordinate is covered */
index d720a046bdc04b09c7f45cd33e44cad77b9f87db..b310b9905ca24e792d79c63bfa6ae2c4763a14ec 100644 (file)
@@ -156,7 +156,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[], int r0, real rot0, char *title)
+void wheel2(const char *fn, int nres, char *resnm[], real rot0, char *title)
 {
     const real fontsize  = 14;
     const real gray      = 0.9;
@@ -287,7 +287,7 @@ int gmx_wheel(int argc, char *argv[])
     }
     else
     {
-        wheel2(ftp2fn(efEPS, NFILE, fnm), nres, resnm, r0, rot0, title);
+        wheel2(ftp2fn(efEPS, NFILE, fnm), nres, resnm, rot0, title);
     }
 
     return 0;
index 8752929c7f87bb560045d8c9645a48c1fde90596..21d01f628118ca5505f86ef24b3163eaa435938a 100644 (file)
@@ -93,7 +93,7 @@ real ellipticity(int nres, t_bb bb[])
     return ell;
 }
 
-real ahx_len(int gnx, atom_id index[], rvec x[], matrix box)
+real ahx_len(int gnx, atom_id index[], rvec x[])
 /* Assume we have a list of Calpha atoms only! */
 {
     rvec dx;
@@ -146,7 +146,7 @@ static real rot(rvec x1, rvec x2)
     return dphi;
 }
 
-real twist(FILE *fp, int nca, atom_id caindex[], rvec x[])
+real twist(int nca, atom_id caindex[], rvec x[])
 {
     real pt, dphi;
     int  i, a0, a1;
@@ -169,7 +169,7 @@ real twist(FILE *fp, int nca, atom_id caindex[], rvec x[])
     return (pt/(nca-1));
 }
 
-real ca_phi(int gnx, atom_id index[], rvec x[], matrix box)
+real ca_phi(int gnx, atom_id index[], rvec x[])
 /* Assume we have a list of Calpha atoms only! */
 {
     real phi, phitot;
@@ -473,7 +473,7 @@ real pprms(FILE *fp, int nbb, t_bb bb[])
     return rms;
 }
 
-void calc_hxprops(int nres, t_bb bb[], rvec x[], matrix box)
+void calc_hxprops(int nres, t_bb bb[], rvec x[])
 {
     int  i, ao, an, t1, t2, t3;
     rvec dx, r_ij, r_kj, r_kl, m, n;
@@ -519,7 +519,7 @@ void calc_hxprops(int nres, t_bb bb[], rvec x[], matrix box)
     }
 }
 
-static void check_ahx(int nres, t_bb bb[], rvec x[],
+static void check_ahx(int nres, t_bb bb[],
                       int *hstart, int *hend)
 {
     int  h0, h1, h0sav, h1sav;
@@ -552,7 +552,7 @@ static void check_ahx(int nres, t_bb bb[], rvec x[],
     *hend   = h1sav;
 }
 
-void do_start_end(int nres, t_bb bb[], rvec x[], int *nbb, atom_id bbindex[],
+void do_start_end(int nres, t_bb bb[], int *nbb, atom_id bbindex[],
                   int *nca, atom_id caindex[],
                   gmx_bool bRange, int rStart, int rEnd)
 {
@@ -579,7 +579,7 @@ void do_start_end(int nres, t_bb bb[], rvec x[], int *nbb, atom_id bbindex[],
     else
     {
         /* Find start and end of longest helix fragment */
-        check_ahx(nres, bb, x, &hstart, &hend);
+        check_ahx(nres, bb, &hstart, &hend);
     }
     fprintf(stderr, "helix from: %d through %d\n",
             bb[hstart].resno, bb[hend].resno);
index 48152b03066b22c5ffca592b87d53a905204fb1b..033e9e35adc3793df6000dd6a0094d330760aa1b 100644 (file)
@@ -63,7 +63,7 @@ enum {
     efhAHX,  efhNR
 };
 
-extern real ahx_len(int gnx, atom_id index[], rvec x[], matrix box);
+extern real ahx_len(int gnx, atom_id index[], rvec x[]);
 /* Assume we have a list of Calpha atoms only! */
 
 extern real ellipticity(int nres, t_bb bb[]);
@@ -71,7 +71,7 @@ extern real ellipticity(int nres, t_bb bb[]);
 extern real radius(FILE *fp, int nca, atom_id ca_index[], rvec x[]);
 /* Assume we have calphas */
 
-extern real twist(FILE *fp, int nca, atom_id caindex[], rvec x[]);
+extern real twist(int nca, atom_id caindex[], rvec x[]);
 /* Calculate the twist of the helix */
 
 extern real pprms(FILE *fp, int nbb, t_bb bb[]);
@@ -79,7 +79,7 @@ extern real pprms(FILE *fp, int nbb, t_bb bb[]);
  * and the distance per residue
  */
 
-extern real ca_phi(int gnx, atom_id index[], rvec x[], matrix box);
+extern real ca_phi(int gnx, atom_id index[], rvec x[]);
 /* Assume we have a list of Calpha atoms only! */
 
 extern real dip(int nbb, atom_id bbind[], rvec x[], t_atom atom[]);
@@ -100,11 +100,11 @@ extern t_bb *mkbbind(const char *fn, int *nres, int *nbb, int res0,
                      char ***atomname, t_atom atom[],
                      t_resinfo *resinfo);
 
-extern void do_start_end(int nres, t_bb bb[], rvec x[], int *nbb,
+extern void do_start_end(int nres, t_bb bb[], int *nbb,
                          atom_id bbindex[], int *nca, atom_id caindex[],
                          gmx_bool bRange, int rStart, int rEnd);
 
-extern void calc_hxprops(int nres, t_bb bb[], rvec x[], matrix box);
+extern void calc_hxprops(int nres, t_bb bb[], rvec x[]);
 
 extern void pr_bb(FILE *fp, int nres, t_bb bb[]);
 
index aa991441b66d91b262e9cd1fc7c7be5645d8c4b9..bc0ecd8a8acbaefaf0b65151acd11e1ebc77f388 100644 (file)
@@ -133,7 +133,7 @@ void low_do_autocorr(const char *fn, const output_env_t oenv,
                      int nout, real **c1, real dt, unsigned long mode,
                      int nrestart, gmx_bool bAver, gmx_bool bNormalize,
                      gmx_bool bVerbose, real tbeginfit, real tendfit,
-                     int nfitparm, int nskip);
+                     int nfitparm);
 /*
  * do_autocorr calculates autocorrelation functions for many things.
  * It takes a 2 d array containing nitem arrays of length nframes
@@ -403,13 +403,13 @@ void pr_dlist(FILE *fp, int nl, t_dlist dl[], real dt,  int printtype,
 
 int pr_trans(FILE *fp, int nl, t_dlist dl[], real dt, int Xi);
 
-void mk_chi_lookup (int **lookup, int maxchi, real **dih,
+void mk_chi_lookup (int **lookup, int maxchi,
                     int nlist, t_dlist dlist[]);
 
-void mk_multiplicity_lookup (int *multiplicity, int maxchi, real **dih,
+void mk_multiplicity_lookup (int *multiplicity, int maxchi,
                              int nlist, t_dlist dlist[], int nangle);
 
-void get_chi_product_traj (real **dih, int nframes, int nangles,
+void get_chi_product_traj (real **dih, int nframes,
                            int nlist, int maxchi, t_dlist dlist[],
                            real time[], int **lookup, int *multiplicity,
                            gmx_bool bRb, gmx_bool bNormalize,
index 317efeeba0faa1deb2d749d64ddcd637f6049385..a58ca74fd8aa2f5723388501d9c36422f179f4b0 100644 (file)
@@ -287,6 +287,32 @@ typedef int gmx_large_int_t;
 
 #endif
 
+/*
+ * These attributes suppress compiler warnings about unused function arguments
+ * by marking them as possibly unused. Some arguments are unused but
+ * have to be retained to preserve a function signature
+ * that must match that of another function.
+ * Some arguments are only used in *some* code paths (e.g. MPI)
+ */
+
+#ifndef gmx_unused
+#ifdef __GNUC__
+/* GCC, clang, and some ICC pretending to be GCC */
+#  define gmx_unused __attribute__ ((unused))
+#elif (defined(__INTEL_COMPILER) || defined(__ECC)) && !defined(_MSC_VER)
+/* ICC on *nix */
+#  define gmx_unused __attribute__ ((unused))
+#elif defined _MSC_VER
+/* MSVC */
+#  define gmx_unused /*@unused@*/
+#elif defined(__xlC__)
+/* IBM */
+#  define gmx_unused __attribute__ ((unused))
+#else
+#  define gmx_unused
+#endif
+#endif
+
 /* Standard sizes for char* string buffers */
 #define STRLEN 4096
 #define BIG_STRLEN 1048576