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*/
}
-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
}
-void mk_chi_lookup (int **lookup, int maxchi, real **dih,
+void mk_chi_lookup (int **lookup, int maxchi,
int nlist, t_dlist dlist[])
{
}
-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,
*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;
}
}
-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;
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);
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;
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;
"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},
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)
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++)
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;
#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
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;
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. */
}
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;
};
t_filenm fnm[] = {
{ efPDB, "-f", NULL, ffREAD },
- { efPDB, "-ox", "cluster", ffWRITE },
{ efXVG, "-od", "edocked", ffWRITE },
{ efXVG, "-of", "efree", ffWRITE },
{ efLOG, "-g", "anadock", ffWRITE }
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);
}
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;
}
}
-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;
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;
{
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;
if (filtlen)
{
- filter(filtlen, n, nset, val, dt, oenv);
+ filter(filtlen, n, nset, val, dt);
}
if (msdfile)
}
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, */
*/
static gmx_bool legend2lambda(const char *fn,
const char *legend,
- xvg_t *ba,
lambda_vec_t *lam)
{
double lambda = 0;
return bFound;
}
-static void filename2lambda(const char *fn, xvg_t *ba)
+static void filename2lambda(const char *fn)
{
double lambda;
const char *ptr, *digitptr;
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;
/* 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);
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 */
* 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)
/* 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) */
{
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);
}
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;
{
if (minstruct > 1)
{
- ncluster = plot_clusters(nf, rms->mat, &clust, nlevels, minstruct);
+ ncluster = plot_clusters(nf, rms->mat, &clust, minstruct);
}
else
{
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;
{
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,
{
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,
}
-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;
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
}
-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)
{
/*
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;
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)
{
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,
};
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 */
"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},
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 },
{ efXVG, "-dip3d", "dip3d", ffOPTWR },
{ efXVG, "-cos", "cosaver", ffOPTWR },
{ efXPM, "-cmap", "cmap", ffOPTWR },
- { efXVG, "-q", "quadrupole", ffOPTWR },
{ efXVG, "-slab", "slab", ffOPTWR }
};
#define NFILE asize(fnm)
{
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))
{
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);
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)
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)
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++)
{
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;
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')
{
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)
{
}
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,
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);
{
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,
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);
}
}
return hb;
}
-static void mk_hbmap(t_hbdata *hb, gmx_bool bTwo)
+static void mk_hbmap(t_hbdata *hb)
{
int i, j;
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;
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];
/* 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++)
/* 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)
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};
{
printf("Making hbmap structure...");
/* Generate hbond data structure */
- mk_hbmap(hb, bTwo);
+ mk_hbmap(hb);
printf("done.\n");
}
if (bOMP)
{
- sync_hbdata(hb, p_hb[threadNr], nframes, t);
+ sync_hbdata(p_hb[threadNr], nframes);
}
#pragma omp single
{
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.");
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))
{
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)
{
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)
{
}
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++)
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)
{
}
}
- 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++)
{
}
}
-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;
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),
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++)
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++)
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++)
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);
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;
gnx[0], index[0], &residues);
if (debug)
{
- dump_res(debug, nres, residues, gnx[0], index[0]);
+ dump_res(debug, nres, residues, index[0]);
}
}
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)
{
/* 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;
{
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
/* 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;
/* 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;
}
-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;
{
/* 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;
/* 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[],
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++)
{
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
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;
"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;
"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},
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);
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);
}
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))
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;
{
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
{
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;
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++)
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",
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;
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[] =
{ "-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 "
}
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)
* 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;
/*! \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;
*
* 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;
/* 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 */
(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 */
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;
}
else
{
- wheel2(ftp2fn(efEPS, NFILE, fnm), nres, resnm, r0, rot0, title);
+ wheel2(ftp2fn(efEPS, NFILE, fnm), nres, resnm, rot0, title);
}
return 0;
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;
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;
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;
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;
}
}
-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;
*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)
{
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);
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[]);
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[]);
* 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[]);
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[]);
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
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,
#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