int nfile, t_filenm fnm[], int npargs, t_pargs *pa,
int ndesc, const char **desc,
int nbugs, const char **bugs,
- output_env_t *oenv)
+ gmx_output_env_t **oenv)
{
/* This array should match the order of the enum in oenv.h */
const char *const xvg_formats[] = { "xmgrace", "xmgr", "none" };
#include "gromacs/fileio/filenm.h"
#include "gromacs/fileio/oenv.h"
-#include "gromacs/legacyheaders/types/oenv.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
struct t_commrec;
+struct gmx_output_env_t;
#ifdef __cplusplus
extern "C"
int nfile, t_filenm fnm[], int npargs, t_pargs *pa,
int ndesc, const char **desc,
int nbugs, const char **bugs,
- output_env_t *oenv);
+ gmx_output_env_t **oenv);
/*! \} */
CommandLine args_;
private:
- output_env_t oenv_;
+ gmx_output_env_t *oenv_;
size_t fileCount_;
gmx::test::TestFileManager tempFiles_;
};
}
}
-void low_do_autocorr(const char *fn, const output_env_t oenv, const char *title,
+void low_do_autocorr(const char *fn, const gmx_output_env_t *oenv, const char *title,
int nframes, int nitem, int nout, real **c1,
real dt, unsigned long mode, int nrestart,
gmx_bool bAver, gmx_bool bNormalize,
return ppa;
}
-void do_autocorr(const char *fn, const output_env_t oenv, const char *title,
+void do_autocorr(const char *fn, const gmx_output_env_t *oenv, const char *title,
int nframes, int nitem, real **c1,
real dt, unsigned long mode, gmx_bool bAver)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "gromacs/commandline/pargs.h"
#include "gromacs/utility/real.h"
+struct gmx_output_env_t;
+
#ifdef __cplusplus
extern "C" {
#endif
* \param[in] bAver If set, all ndih C(t) functions are averaged into a single
* C(t)
*/
-void do_autocorr(const char *fn, const output_env_t oenv,
+void do_autocorr(const char *fn, const gmx_output_env_t *oenv,
const char *title,
int nframes, int nitem, real **c1,
real dt, unsigned long mode, gmx_bool bAver);
* \param[in] tendfit Time to end fitting to the ACF
* \param[in] nfitparm Number of fitting parameters in a multi-exponential fit
*/
-void low_do_autocorr(const char *fn, const output_env_t oenv,
+void low_do_autocorr(const char *fn, const gmx_output_env_t *oenv,
const char *title, int nframes, int nitem,
int nout, real **c1, real dt, unsigned long mode,
int nrestart, gmx_bool bAver, gmx_bool bNormalize,
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
-void print_one(const output_env_t oenv, const char *base, const char *name,
+void print_one(const gmx_output_env_t *oenv, const char *base, const char *name,
const char *title, const char *ylabel, int nf, real time[],
real data[])
{
void ana_dih_trans(const char *fn_trans, const char *fn_histo,
real **dih, int nframes, int nangles,
const char *grpname, real *time, gmx_bool bRb,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
/* just a wrapper; declare extra args, then chuck away at end. */
int maxchi = 0;
real **dih, int nlist, t_dlist dlist[], int nframes,
int nangles, const char *grpname, int multiplicity[],
real *time, gmx_bool bRb, real core_frac,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
int *tr_f, *tr_h;
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,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
gmx_bool bRotZero, bHaveChi = FALSE;
real **trans_frac,
real **aver_angle,
real *dih[],
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
struct t_pbc *pbc;
t_trxstatus *status;
}
void low_rmsd_dist(const char *fn, real maxrms, int nn, real **mat,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
int i, j, *histo, x;
sfree(histo);
}
-void rmsd_distribution(const char *fn, t_mat *rms, const output_env_t oenv)
+void rmsd_distribution(const char *fn, t_mat *rms, const gmx_output_env_t *oenv)
{
low_rmsd_dist(fn, rms->maxrms, rms->nn, rms->mat, oenv);
}
#ifndef _cmat_h
#define _cmat_h
-#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/real.h"
+
+struct gmx_output_env_t;
#ifdef __cplusplus
extern "C"
extern void swap_mat(t_mat *m);
extern void low_rmsd_dist(const char *fn, real maxrms, int nn, real **mat,
- const output_env_t oenv);
+ const gmx_output_env_t *oenv);
-extern void rmsd_distribution(const char *fn, t_mat *m, const output_env_t oenv);
+extern void rmsd_distribution(const char *fn, t_mat *m, const gmx_output_env_t *oenv);
extern t_clustid *new_clustid(int n1);
#include "gromacs/gmxana/gstat.h"
#include "gromacs/topology/residuetypes.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
}
static void analyse_em_all(int npdb, t_pdbfile *pdbf[], const char *edocked,
- const char *efree, const output_env_t oenv)
+ const char *efree, const gmx_output_env_t *oenv)
{
FILE *fp;
int i;
int gmx_anadock(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] analyses the results of an Autodock run and clusters the",
"structures together, based on distance or RMSD. The docked energy",
"and free energy estimates are analysed, and for each cluster the",
"using [gmx-cluster] and then sort the clusters on either lowest",
"energy or average energy."
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efPDB, "-f", NULL, ffREAD },
{ efXVG, "-od", "edocked", ffWRITE },
{ efXVG, "-of", "efree", ffWRITE },
{ efLOG, "-g", "anadock", ffWRITE }
};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
#define NFILE asize(fnm)
- static gmx_bool bFree = FALSE, bRMS = TRUE;
- static real cutoff = 0.2;
- t_pargs pa[] = {
+ static gmx_bool bFree = FALSE, bRMS = TRUE;
+ static real cutoff = 0.2;
+ t_pargs pa[] = {
{ "-free", FALSE, etBOOL, {&bFree},
"Use Free energy estimate from autodock for sorting the classes" },
{ "-rms", FALSE, etBOOL, {&bRMS},
const char *xlabel, const char **ylabel,
int n, real *x, real **y, real ***sy,
real scale_x, gmx_bool bZero, gmx_bool bSplit,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *out;
int g, s, i;
rvec **eigvec1,
int nvec2, int *eignr2, rvec **eigvec2,
int noutvec, int *outvec,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *out;
int i, v, vec, x;
real *sqrtm, rvec *xav,
int *eignr, rvec **eigvec,
int noutvec, int *outvec, gmx_bool bSplit,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *xvgrout = NULL;
int nat, i, j, d, v, vec, nfr, nframes = 0, snew_size, frame;
static void components(const char *outfile, int natoms,
int *eignr, rvec **eigvec,
int noutvec, int *outvec,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
int g, s, v, i;
real *x, ***y;
int *eignr, rvec **eigvec,
int noutvec, int *outvec,
real *eigval, int neig,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
int g, v, i;
real *x, **y;
};
#define NPA asize(pa)
- t_topology top;
- int ePBC = -1;
- t_atoms *atoms = NULL;
- rvec *xtop, *xref1, *xref2, *xrefp = NULL;
- gmx_bool bDMR1, bDMA1, bDMR2, bDMA2;
- int nvec1, nvec2, *eignr1 = NULL, *eignr2 = NULL;
- rvec *xav1, *xav2, **eigvec1 = NULL, **eigvec2 = NULL;
- matrix topbox;
- real totmass, *sqrtm, *w_rls, t;
- int natoms;
- char *grpname;
- const char *indexfile;
- int i, j, d;
- int nout, *iout, noutvec, *outvec, nfit;
- atom_id *index = NULL, *ifit = NULL;
- const char *VecFile, *Vec2File, *topfile;
- const char *EigFile, *Eig2File;
- const char *CompFile, *RmsfFile, *ProjOnVecFile;
- const char *TwoDPlotFile, *ThreeDPlotFile;
- const char *FilterFile, *ExtremeFile;
- const char *OverlapFile, *InpMatFile;
- gmx_bool bFit1, bFit2, bM, bIndex, bTPS, bTop, bVec2, bProj;
- gmx_bool bFirstToLast, bFirstLastSet, bTraj, bCompare, bPDB3D;
- real *eigval1 = NULL, *eigval2 = NULL;
- int neig1, neig2;
- double **xvgdata;
- output_env_t oenv;
- gmx_rmpbc_t gpbc;
-
- t_filenm fnm[] = {
+ t_topology top;
+ int ePBC = -1;
+ t_atoms *atoms = NULL;
+ rvec *xtop, *xref1, *xref2, *xrefp = NULL;
+ gmx_bool bDMR1, bDMA1, bDMR2, bDMA2;
+ int nvec1, nvec2, *eignr1 = NULL, *eignr2 = NULL;
+ rvec *xav1, *xav2, **eigvec1 = NULL, **eigvec2 = NULL;
+ matrix topbox;
+ real totmass, *sqrtm, *w_rls, t;
+ int natoms;
+ char *grpname;
+ const char *indexfile;
+ int i, j, d;
+ int nout, *iout, noutvec, *outvec, nfit;
+ atom_id *index = NULL, *ifit = NULL;
+ const char *VecFile, *Vec2File, *topfile;
+ const char *EigFile, *Eig2File;
+ const char *CompFile, *RmsfFile, *ProjOnVecFile;
+ const char *TwoDPlotFile, *ThreeDPlotFile;
+ const char *FilterFile, *ExtremeFile;
+ const char *OverlapFile, *InpMatFile;
+ gmx_bool bFit1, bFit2, bM, bIndex, bTPS, bTop, bVec2, bProj;
+ gmx_bool bFirstToLast, bFirstLastSet, bTraj, bCompare, bPDB3D;
+ real *eigval1 = NULL, *eigval2 = NULL;
+ int neig1, neig2;
+ double **xvgdata;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc;
+
+ t_filenm fnm[] = {
{ efTRN, "-v", "eigenvec", ffREAD },
{ efTRN, "-v2", "eigenvec2", ffOPTRD },
{ efTRX, "-f", NULL, ffOPTRD },
}
static void plot_coscont(const char *ccfile, int n, int nset, real **val,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
int s;
}
void histogram(const char *distfile, real binwidth, int n, int nset, real **val,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
int i, s;
static void estimate_error(const char *eefile, int nb_min, int resol, int n,
int nset, double *av, double *sig, real **val, real dt,
gmx_bool bFitAc, gmx_bool bSingleExpFit, gmx_bool bAllowNegLTCorr,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
int bs, prev_bs, nbs, nb;
static void do_fit(FILE *out, int n, gmx_bool bYdy,
int ny, real *x0, real **val,
- int npargs, t_pargs *ppa, const output_env_t oenv,
+ int npargs, t_pargs *ppa, const gmx_output_env_t *oenv,
const char *fn_fitted)
{
real *c1 = NULL, *sig = NULL;
}
}
-static void print_fitted_function(const char *fitfile,
- const char *fn_fitted,
- gmx_bool bXYdy,
- int nset,
- int n,
- real *t,
- real **val,
- int npargs,
- t_pargs *ppa,
- output_env_t oenv)
+static void print_fitted_function(const char *fitfile,
+ const char *fn_fitted,
+ gmx_bool bXYdy,
+ int nset,
+ int n,
+ real *t,
+ real **val,
+ int npargs,
+ t_pargs *ppa,
+ gmx_output_env_t *oenv)
{
FILE *out_fit = gmx_ffopen(fitfile, "w");
if (bXYdy && nset >= 2)
};
#define NPA asize(pa)
- FILE *out;
- int n, nlast, s, nset, i, j = 0;
- real **val, *t, dt, tot, error;
- double *av, *sig, cum1, cum2, cum3, cum4, db;
- const char *acfile, *msdfile, *ccfile, *distfile, *avfile, *eefile, *fitfile;
- output_env_t oenv;
+ FILE *out;
+ int n, nlast, s, nset, i, j = 0;
+ real **val, *t, dt, tot, error;
+ double *av, *sig, cum1, cum2, cum3, cum4, db;
+ const char *acfile, *msdfile, *ccfile, *distfile, *avfile, *eefile, *fitfile;
+ gmx_output_env_t *oenv;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efXVG, "-f", "graph", ffREAD },
{ efXVG, "-ac", "autocorr", ffOPTWR },
{ efXVG, "-msd", "msd", ffOPTWR },
int nframes, maxangstat, mult, *angstat;
int i, j, nangles, first, last;
gmx_bool bAver, bRb, bPeriodic,
- bFrac, /* calculate fraction too? */
- bTrans, /* worry about transtions too? */
- bCorr; /* correlation function ? */
- real aver, aver2, aversig; /* fraction trans dihedrals */
- double tfrac = 0;
- char title[256];
- real **dih = NULL; /* mega array with all dih. angles at all times*/
- real *time, *trans_frac, *aver_angle;
- t_filenm fnm[] = {
+ bFrac, /* calculate fraction too? */
+ bTrans, /* worry about transtions too? */
+ bCorr; /* correlation function ? */
+ real aver, aver2, aversig; /* fraction trans dihedrals */
+ double tfrac = 0;
+ char title[256];
+ real **dih = NULL; /* mega array with all dih. angles at all times*/
+ real *time, *trans_frac, *aver_angle;
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efNDX, NULL, "angle", ffREAD },
{ efXVG, "-od", "angdist", ffWRITE },
{ efTRR, "-or", NULL, ffOPTWR }
};
#define NFILE asize(fnm)
- int npargs;
- t_pargs *ppa;
- output_env_t oenv;
+ int npargs;
+ t_pargs *ppa;
+ gmx_output_env_t *oenv;
npargs = asize(pa);
ppa = add_acf_pargs(&npargs, pa);
/* write a collection of histograms to a file */
void sim_data_histogram(sim_data_t *sd, const char *filename,
- int nbin_default, const output_env_t oenv)
+ int nbin_default, const gmx_output_env_t *oenv)
{
char label_x[STRLEN];
const char *dhdl = "dH/d\\lambda", *deltag = "\\DeltaH", *lambda = "\\lambda";
};
#define NFILE asize(fnm)
- int f;
- int nf = 0; /* file counter */
- int nfile_tot; /* total number of input files */
- int nxvgfile = 0;
- int nedrfile = 0;
- char **fxvgnms;
- char **fedrnms;
- sim_data_t sim_data; /* the simulation data */
- barres_t *results; /* the results */
- int nresults; /* number of results in results array */
-
- double *partsum;
- double prec, dg_tot;
- FILE *fpb, *fpi;
- char dgformat[20], xvg2format[STRLEN], xvg3format[STRLEN];
- char buf[STRLEN], buf2[STRLEN];
- char ktformat[STRLEN], sktformat[STRLEN];
- char kteformat[STRLEN], skteformat[STRLEN];
- output_env_t oenv;
- double kT;
- gmx_bool result_OK = TRUE, bEE = TRUE;
-
- gmx_bool disc_err = FALSE;
- double sum_disc_err = 0.; /* discretization error */
- gmx_bool histrange_err = FALSE;
- double sum_histrange_err = 0.; /* histogram range error */
- double stat_err = 0.; /* statistical error */
+ int f;
+ int nf = 0; /* file counter */
+ int nfile_tot; /* total number of input files */
+ int nxvgfile = 0;
+ int nedrfile = 0;
+ char **fxvgnms;
+ char **fedrnms;
+ sim_data_t sim_data; /* the simulation data */
+ barres_t *results; /* the results */
+ int nresults; /* number of results in results array */
+
+ double *partsum;
+ double prec, dg_tot;
+ FILE *fpb, *fpi;
+ char dgformat[20], xvg2format[STRLEN], xvg3format[STRLEN];
+ char buf[STRLEN], buf2[STRLEN];
+ char ktformat[STRLEN], sktformat[STRLEN];
+ char kteformat[STRLEN], skteformat[STRLEN];
+ gmx_output_env_t *oenv;
+ double kT;
+ gmx_bool result_OK = TRUE, bEE = TRUE;
+
+ gmx_bool disc_err = FALSE;
+ double sum_disc_err = 0.; /* discretization error */
+ gmx_bool histrange_err = FALSE;
+ double sum_histrange_err = 0.; /* histogram range error */
+ double stat_err = 0.; /* statistical error */
if (!parse_common_args(&argc, argv,
PCA_CAN_VIEW,
int gmx_bundle(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] analyzes bundles of axes. The axes can be for instance",
"helix axes. The program reads two index groups and divides both",
"of them in [TT]-na[tt] parts. The centers of mass of these parts",
"command line option [TT]-nmrpdb[tt], and type [TT]set axis true[tt] to",
"display the reference axis."
};
- static int n = 0;
- static gmx_bool bZ = FALSE;
- t_pargs pa[] = {
+ static int n = 0;
+ static gmx_bool bZ = FALSE;
+ t_pargs pa[] = {
{ "-na", FALSE, etINT, {&n},
"Number of axes" },
{ "-z", FALSE, etBOOL, {&bZ},
"Use the [IT]z[it]-axis as reference instead of the average axis" }
};
- FILE *flen, *fdist, *fz, *ftilt, *ftiltr, *ftiltl;
- FILE *fkink = NULL, *fkinkr = NULL, *fkinkl = NULL;
- t_trxstatus *status;
- t_trxstatus *fpdb;
- t_topology top;
- int ePBC;
- rvec *xtop;
- matrix box;
- t_trxframe fr;
- t_atoms outatoms;
- real t, comp;
- char *grpname[MAX_ENDS];
+ FILE *flen, *fdist, *fz, *ftilt, *ftiltr, *ftiltl;
+ FILE *fkink = NULL, *fkinkr = NULL, *fkinkl = NULL;
+ t_trxstatus *status;
+ t_trxstatus *fpdb;
+ t_topology top;
+ int ePBC;
+ rvec *xtop;
+ matrix box;
+ t_trxframe fr;
+ t_atoms outatoms;
+ real t, comp;
+ char *grpname[MAX_ENDS];
/* FIXME: The constness should not be cast away */
- char *anm = (char *)"CA", *rnm = (char *)"GLY";
- int i, gnx[MAX_ENDS];
- atom_id *index[MAX_ENDS];
- t_bundle bun;
- gmx_bool bKink;
- rvec va, vb, vc, vr, vl;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
+ char *anm = (char *)"CA", *rnm = (char *)"GLY";
+ int i, gnx[MAX_ENDS];
+ atom_id *index[MAX_ENDS];
+ t_bundle bun;
+ gmx_bool bKink;
+ rvec va, vb, vc, vr, vl;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
#define NLEG asize(leg)
t_filenm fnm[] = {
static void do_dihcorr(const char *fn, int nf, int ndih, real **dih, real dt,
int nlist, t_dlist dlist[], real time[], int maxchi,
gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, gmx_bool bOmega,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
char name1[256], name2[256];
int i, j, Xi;
static void dump_em_all(int nlist, t_dlist dlist[], int nf, real time[],
real **dih, int maxchi,
gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, gmx_bool bOmega, gmx_bool bRAD,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
char name[256], titlestr[256], ystr[256];
real *data;
gmx_bool bNormalize, gmx_bool bSSHisto, const char *ssdump,
real bfac_max, t_atoms *atoms,
gmx_bool bDo_jc, const char *fn,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
/* also gets 3J couplings and order parameters S2 */
t_karplus kkkphi[] = {
}
static FILE *rama_file(const char *fn, const char *title, const char *xaxis,
- const char *yaxis, const output_env_t oenv)
+ const char *yaxis, const gmx_output_env_t *oenv)
{
FILE *fp;
}
static void do_rama(int nf, int nlist, t_dlist dlist[], real **dih,
- gmx_bool bViol, gmx_bool bRamOmega, const output_env_t oenv)
+ gmx_bool bViol, gmx_bool bRamOmega, const gmx_output_env_t *oenv)
{
FILE *fp, *gp = NULL;
gmx_bool bOm;
static void print_transitions(const char *fn, int maxchi, int nlist,
t_dlist dlist[], real dt,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
/* based on order_params below */
FILE *fp;
const char *fn, int maxchi, int nlist, t_dlist dlist[],
const char *pdbfn, real bfac_init,
t_atoms *atoms, rvec x[], int ePBC, matrix box,
- gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, const output_env_t oenv)
+ gmx_bool bPhi, gmx_bool bPsi, gmx_bool bChi, const gmx_output_env_t *oenv)
{
FILE *fp;
int nh[edMax];
gmx_bool bChi, bCorr, bSSHisto;
gmx_bool bDo_rt, bDo_oh, bDo_ot, bDo_jc;
real dt = 0, traj_t_ns;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
gmx_residuetype_t *rt;
atom_id isize, *index;
void mc_optimize(FILE *log, t_mat *m, real *time,
int maxiter, int nrandom,
int seed, real kT,
- const char *conv, output_env_t oenv)
+ const char *conv, gmx_output_env_t *oenv)
{
FILE *fp = NULL;
real ecur, enext, emin, prob, enorm;
}
rvec **read_whole_trj(const char *fn, int isize, atom_id index[], int skip,
- int *nframe, real **time, const output_env_t oenv, gmx_bool bPBC, gmx_rmpbc_t gpbc)
+ int *nframe, real **time, const gmx_output_env_t *oenv, gmx_bool bPBC, gmx_rmpbc_t gpbc)
{
rvec **xx, *x;
matrix box;
static void ana_trans(t_clusters *clust, int nf,
const char *transfn, const char *ntransfn, FILE *log,
- t_rgb rlo, t_rgb rhi, const output_env_t oenv)
+ t_rgb rlo, t_rgb rhi, const gmx_output_env_t *oenv)
{
FILE *fp;
real **trans, *axis;
const char *clustidfn, gmx_bool bAverage,
int write_ncl, int write_nst, real rmsmin,
gmx_bool bFit, FILE *log, t_rgb rlo, t_rgb rhi,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *size_fp = NULL;
char buf[STRLEN], buf1[40], buf2[40], buf3[40], *trxsfn;
m_monte_carlo, m_diagonalize, m_gromos, m_nr
};
/* Set colors for plotting: white = zero RMS, black = maximum */
- static t_rgb rlo_top = { 1.0, 1.0, 1.0 };
- static t_rgb rhi_top = { 0.0, 0.0, 0.0 };
- static t_rgb rlo_bot = { 1.0, 1.0, 1.0 };
- static t_rgb rhi_bot = { 0.0, 0.0, 1.0 };
- static int nlevels = 40, skip = 1;
- static real scalemax = -1.0, rmsdcut = 0.1, rmsmin = 0.0;
- gmx_bool bRMSdist = FALSE, bBinary = FALSE, bAverage = FALSE, bFit = TRUE;
- static int niter = 10000, nrandom = 0, seed = 1993, write_ncl = 0, write_nst = 1, minstruct = 1;
- static real kT = 1e-3;
- static int M = 10, P = 3;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
-
- t_pargs pa[] = {
+ static t_rgb rlo_top = { 1.0, 1.0, 1.0 };
+ static t_rgb rhi_top = { 0.0, 0.0, 0.0 };
+ static t_rgb rlo_bot = { 1.0, 1.0, 1.0 };
+ static t_rgb rhi_bot = { 0.0, 0.0, 1.0 };
+ static int nlevels = 40, skip = 1;
+ static real scalemax = -1.0, rmsdcut = 0.1, rmsmin = 0.0;
+ gmx_bool bRMSdist = FALSE, bBinary = FALSE, bAverage = FALSE, bFit = TRUE;
+ static int niter = 10000, nrandom = 0, seed = 1993, write_ncl = 0, write_nst = 1, minstruct = 1;
+ static real kT = 1e-3;
+ static int M = 10, P = 3;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
+
+ t_pargs pa[] = {
{ "-dista", FALSE, etBOOL, {&bRMSdist},
"Use RMSD of distances instead of RMS deviation" },
{ "-nlevels", FALSE, etINT, {&nlevels},
{ "-pbc", FALSE, etBOOL,
{ &bPBC }, "PBC check" }
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffOPTRD },
{ efTPS, "-s", NULL, ffOPTRD },
{ efNDX, NULL, NULL, ffOPTRD },
const char *mcn, gmx_bool bMol, gmx_bool bPBC, const char *tpr,
real cut, int nskip, int nlevels,
t_rgb rmid, t_rgb rhi, int ndf,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp, *gp, *hp, *tp;
atom_id *index = NULL;
int gmx_clustsize(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes the size distributions of molecular/atomic clusters in",
"the gas phase. The output is given in the form of an [REF].xpm[ref] file.",
"The total number of clusters is written to an [REF].xvg[ref] file.[PAR]",
"atom numbers of the largest cluster."
};
- static real cutoff = 0.35;
- static int nskip = 0;
- static int nlevels = 20;
- static int ndf = -1;
- static gmx_bool bMol = FALSE;
- static gmx_bool bPBC = TRUE;
- static rvec rlo = { 1.0, 1.0, 0.0 };
- static rvec rhi = { 0.0, 0.0, 1.0 };
+ static real cutoff = 0.35;
+ static int nskip = 0;
+ static int nlevels = 20;
+ static int ndf = -1;
+ static gmx_bool bMol = FALSE;
+ static gmx_bool bPBC = TRUE;
+ static rvec rlo = { 1.0, 1.0, 0.0 };
+ static rvec rhi = { 0.0, 0.0, 1.0 };
- output_env_t oenv;
+ gmx_output_env_t *oenv;
- t_pargs pa[] = {
+ t_pargs pa[] = {
{ "-cut", FALSE, etREAL, {&cutoff},
"Largest distance (nm) to be considered in a cluster" },
{ "-mol", FALSE, etBOOL, {&bMol},
"RGB values for the color of the highest occupied cluster size" }
};
#define NPA asize(pa)
- const char *fnNDX, *fnTPR;
- t_rgb rgblo, rgbhi;
+ const char *fnNDX, *fnTPR;
+ t_rgb rgblo, rgbhi;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPR, NULL, NULL, ffOPTRD },
{ efNDX, NULL, NULL, ffOPTRD },
#define NFILE asize(fnm)
/* the two structure files */
- const char *conf1file, *conf2file, *matchndxfile, *outfile;
- FILE *fp;
- char *name1, *name2;
- t_topology *top1, *top2;
- int ePBC1, ePBC2;
- t_atoms *atoms1, *atoms2;
- int warn = 0;
- atom_id at;
- real *w_rls, mass, totmass;
- rvec *x1, *v1, *x2, *v2, *fit_x;
- matrix box1, box2;
-
- output_env_t oenv;
+ const char *conf1file, *conf2file, *matchndxfile, *outfile;
+ FILE *fp;
+ char *name1, *name2;
+ t_topology *top1, *top2;
+ int ePBC1, ePBC2;
+ t_atoms *atoms1, *atoms2;
+ int warn = 0;
+ atom_id at;
+ real *w_rls, mass, totmass;
+ rvec *x1, *v1, *x2, *v2, *fit_x;
+ matrix box1, box2;
+
+ gmx_output_env_t *oenv;
/* counters */
int i, m;
int gmx_covar(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] calculates and diagonalizes the (mass-weighted)",
"covariance matrix.",
"All structures are fitted to the structure in the structure file.",
"should consider carefully whether a reduced set of atoms will meet",
"your needs for lower costs."
};
- static gmx_bool bFit = TRUE, bRef = FALSE, bM = FALSE, bPBC = TRUE;
- static int end = -1;
- t_pargs pa[] = {
+ static gmx_bool bFit = TRUE, bRef = FALSE, bM = FALSE, bPBC = TRUE;
+ static int end = -1;
+ t_pargs pa[] = {
{ "-fit", FALSE, etBOOL, {&bFit},
"Fit to a reference structure"},
{ "-ref", FALSE, etBOOL, {&bRef},
{ "-pbc", FALSE, etBOOL, {&bPBC},
"Apply corrections for periodic boundary conditions" }
};
- FILE *out = NULL; /* initialization makes all compilers happy */
- t_trxstatus *status;
- t_topology top;
- int ePBC;
- t_atoms *atoms;
- rvec *x, *xread, *xref, *xav, *xproj;
- matrix box, zerobox;
- real *sqrtm, *mat, *eigenvalues, sum, trace, inv_nframes;
- real t, tstart, tend, **mat2;
- real xj, *w_rls = NULL;
- real min, max, *axis;
- int natoms, nat, nframes0, nframes, nlevels;
- gmx_int64_t ndim, i, j, k, l;
- int WriteXref;
- const char *fitfile, *trxfile, *ndxfile;
- const char *eigvalfile, *eigvecfile, *averfile, *logfile;
- const char *asciifile, *xpmfile, *xpmafile;
- char str[STRLEN], *fitname, *ananame;
- int d, dj, nfit;
- atom_id *index, *ifit;
- gmx_bool bDiffMass1, bDiffMass2;
- char timebuf[STRLEN];
- t_rgb rlo, rmi, rhi;
- real *eigenvectors;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
-
- t_filenm fnm[] = {
+ FILE *out = NULL; /* initialization makes all compilers happy */
+ t_trxstatus *status;
+ t_topology top;
+ int ePBC;
+ t_atoms *atoms;
+ rvec *x, *xread, *xref, *xav, *xproj;
+ matrix box, zerobox;
+ real *sqrtm, *mat, *eigenvalues, sum, trace, inv_nframes;
+ real t, tstart, tend, **mat2;
+ real xj, *w_rls = NULL;
+ real min, max, *axis;
+ int natoms, nat, nframes0, nframes, nlevels;
+ gmx_int64_t ndim, i, j, k, l;
+ int WriteXref;
+ const char *fitfile, *trxfile, *ndxfile;
+ const char *eigvalfile, *eigvecfile, *averfile, *logfile;
+ const char *asciifile, *xpmfile, *xpmafile;
+ char str[STRLEN], *fitname, *ananame;
+ int d, dj, nfit;
+ atom_id *index, *ifit;
+ gmx_bool bDiffMass1, bDiffMass2;
+ char timebuf[STRLEN];
+ t_rgb rlo, rmi, rhi;
+ real *eigenvectors;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
+
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
real bfit, real efit, real bvit, real evit,
t_trxstatus *status, int isize, int nmols, int nshift,
atom_id *index0, int indexm[], real mass2[],
- real qmol[], real eps_rf, const output_env_t oenv)
+ real qmol[], real eps_rf, const gmx_output_env_t *oenv)
{
int i, j;
int valloc, nalloc, nfr, nvfr;
"Temperature for calculating epsilon."}
};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
t_topology top;
char **grpname = NULL;
const char *indexfn;
int axis, int nr_grps, real *slWidth,
t_electron eltab[], int nr, gmx_bool bCenter,
atom_id *index_center, int ncenter,
- gmx_bool bRelative, const output_env_t oenv)
+ gmx_bool bRelative, const gmx_output_env_t *oenv)
{
rvec *x0; /* coordinates without pbc */
matrix box; /* box (3x3) */
double ***slDensity, int *nslices, t_topology *top, int ePBC,
int axis, int nr_grps, real *slWidth, gmx_bool bCenter,
atom_id *index_center, int ncenter,
- gmx_bool bRelative, const output_env_t oenv)
+ gmx_bool bRelative, const gmx_output_env_t *oenv)
{
rvec *x0; /* coordinates without pbc */
matrix box; /* box (3x3) */
int nr_grps, char *grpname[], real slWidth,
const char **dens_opt,
gmx_bool bCenter, gmx_bool bRelative, gmx_bool bSymmetrize,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *den;
const char *title = NULL;
"",
};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
static const char *dens_opt[] =
{ NULL, "mass", "number", "charge", "electron", NULL };
static int axis = 2; /* normal to memb. default z */
real invspa = 0, invspz = 0, axial, r, vol_old, vol, rowsum;
int nlev = 51;
t_rgb rlo = {1, 1, 1}, rhi = {0, 0, 0};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
const char *label[] = { "x (nm)", "y (nm)", "z (nm)" };
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
}
-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 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 gmx_output_env_t *oenv)
{
/*
static void interfaces_txy (real ****Densmap, int xslices, int yslices, int zslices,
int tblocks, real binwidth, int method,
real dens1, real dens2, t_interf ****intf1,
- t_interf ****intf2, const output_env_t oenv)
+ t_interf ****intf2, const gmx_output_env_t *oenv)
{
/*Returns two pointers to 3D arrays of t_interf structs containing (position,thickness) of the interface(s)*/
FILE *xvg;
static void writeraw(t_interf ***int1, t_interf ***int2, int tblocks,
int xbins, int ybins, char **fnms,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *raw1, *raw2;
int i, j, n;
* options when running the program, without mentioning them here!
*/
- output_env_t oenv;
+ gmx_output_env_t *oenv;
t_topology *top;
char **grpname;
int ePBC, *ngx;
}
void do_four(const char *fn, const char *cn, int nx, real x[], real dy[],
- real eps0, real epsRF, const output_env_t oenv)
+ real eps0, real epsRF, const gmx_output_env_t *oenv)
{
FILE *fp, *cp;
t_complex *tmp, gw, hw, kw;
int gmx_dielectric(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] calculates frequency dependent dielectric constants",
"from the autocorrelation function of the total dipole moment in",
"your simulation. This ACF can be generated by [gmx-dipoles].",
"For a pure exponential relaxation (Debye relaxation) the latter",
"plot should be one half of a circle."
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efXVG, "-f", "dipcorr", ffREAD },
{ efXVG, "-d", "deriv", ffWRITE },
{ efXVG, "-o", "epsw", ffWRITE },
{ efXVG, "-c", "cole", ffWRITE }
};
#define NFILE asize(fnm)
- output_env_t oenv;
- int i, j, nx, ny, nxtail, eFitFn, nfitparm;
- real dt, integral, fitintegral, fac, rffac;
- double *fitparms;
- double **yd;
- real **y;
- const char *legend[] = { "Correlation", "Std. Dev.", "Fit", "Combined", "Derivative" };
- static int fix = 0, bX = 1, nsmooth = 3;
- static real tendInt = 5.0, tbegin = 5.0, tend = 500.0;
- static real A = 0.5, tau1 = 10.0, tau2 = 1.0, eps0 = 80, epsRF = 78.5, tail = 500.0;
- real lambda;
- t_pargs pa[] = {
+ gmx_output_env_t *oenv;
+ int i, j, nx, ny, nxtail, eFitFn, nfitparm;
+ real dt, integral, fitintegral, fac, rffac;
+ double *fitparms;
+ double **yd;
+ real **y;
+ const char *legend[] = { "Correlation", "Std. Dev.", "Fit", "Combined", "Derivative" };
+ static int fix = 0, bX = 1, nsmooth = 3;
+ static real tendInt = 5.0, tbegin = 5.0, tend = 500.0;
+ static real A = 0.5, tau1 = 10.0, tau2 = 1.0, eps0 = 80, epsRF = 78.5, tail = 500.0;
+ real lambda;
+ t_pargs pa[] = {
{ "-x1", FALSE, etBOOL, {&bX},
"use first column as [IT]x[it]-axis rather than first data set" },
{ "-eint", FALSE, etREAL, {&tendInt},
static void print_gkrbin(const char *fn, t_gkrbin *gb,
int ngrp, int nframes, real volume,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
/* We compute Gk(r), gOO and hOO according to
* Nymand & Linse, JCP 112 (2000) pp 6386-6395.
static void dump_slab_dipoles(const char *fn, int idim, int nslice,
rvec slab_dipole[], matrix box, int nframes,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
char buf[STRLEN];
int *gkatom, int skip,
gmx_bool bSlab, int nslices,
const char *axtitle, const char *slabfn,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
const char *leg_mtot[] = {
"M\\sx \\N",
}
int gmx_dipoles(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes the total dipole plus fluctuations of a simulation",
"system. From this you can compute e.g. the dielectric constant for",
"low-dielectric media.",
"an average dipole moment of the molecule of 2.273 (SPC). For the",
"distribution function a maximum of 5.0 will be used."
};
- real mu_max = 5, mu_aver = -1, rcmax = 0;
- real epsilonRF = 0.0, temp = 300;
- gmx_bool 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 */
- int skip = 0, nFA = 0, nFB = 0, ncos = 1;
- int nlevels = 20, ndegrees = 90;
- output_env_t oenv;
- t_pargs pa[] = {
+ real mu_max = 5, mu_aver = -1, rcmax = 0;
+ real epsilonRF = 0.0, temp = 300;
+ gmx_bool 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 */
+ int skip = 0, nFA = 0, nFB = 0, ncos = 1;
+ int nlevels = 20, ndegrees = 90;
+ gmx_output_env_t *oenv;
+ t_pargs pa[] = {
{ "-mu", FALSE, etREAL, {&mu_aver},
"dipole of a single molecule (in Debye)" },
{ "-mumax", FALSE, etREAL, {&mu_max},
{ "-ndegrees", FALSE, etINT, {&ndegrees},
"Number of divisions on the [IT]y[it]-axis in the cmap output (for 180 degrees)" }
};
- int *gnx;
- int nFF[2];
- atom_id **grpindex;
- char **grpname = NULL;
- gmx_bool bGkr, bMU, bSlab;
- t_filenm fnm[] = {
+ int *gnx;
+ int nFF[2];
+ atom_id **grpindex;
+ char **grpname = NULL;
+ gmx_bool bGkr, bMU, bSlab;
+ t_filenm fnm[] = {
{ efEDR, "-en", NULL, ffOPTRD },
{ efTRX, "-f", NULL, ffREAD },
{ efTPR, NULL, NULL, ffREAD },
{ efXVG, "-slab", "slab", ffOPTWR }
};
#define NFILE asize(fnm)
- int npargs;
- t_pargs *ppa;
- t_topology *top;
- int ePBC;
- int k, natoms;
- matrix box;
+ int npargs;
+ t_pargs *ppa;
+ t_topology *top;
+ int ePBC;
+ int k, natoms;
+ matrix box;
npargs = asize(pa);
ppa = add_acf_pargs(&npargs, pa);
int gmx_disre(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes violations of distance restraints.",
"The program always",
"computes the instantaneous violations rather than time-averaged,",
"the program will compute average violations using the third power",
"averaging algorithm and print them in the log file."
};
- static int ntop = 0;
- static int nlevels = 20;
- static real max_dr = 0;
- static gmx_bool bThird = TRUE;
- t_pargs pa[] = {
+ static int ntop = 0;
+ static int nlevels = 20;
+ static real max_dr = 0;
+ static gmx_bool bThird = TRUE;
+ t_pargs pa[] = {
{ "-ntop", FALSE, etINT, {&ntop},
"Number of large violations that are stored in the log file every step" },
{ "-maxdr", FALSE, etREAL, {&max_dr},
"Use inverse third power averaging or linear for matrix output" }
};
- FILE *out = NULL, *aver = NULL, *numv = NULL, *maxxv = NULL, *xvg = NULL;
- t_tpxheader header;
- t_inputrec ir;
- gmx_mtop_t mtop;
- rvec *xtop;
- gmx_localtop_t *top;
- t_atoms *atoms = NULL;
- t_fcdata fcd;
- t_nrnb nrnb;
- t_graph *g;
- int ntopatoms, natoms, i, j, kkk;
- t_trxstatus *status;
- real t;
- rvec *x, *f, *xav = NULL;
- matrix box;
- gmx_bool bPDB;
- int isize;
- atom_id *index = NULL, *ind_fit = NULL;
- char *grpname;
- t_cluster_ndx *clust = NULL;
- t_dr_result dr, *dr_clust = NULL;
- char **leg;
- real *vvindex = NULL, *w_rls = NULL;
- t_mdatoms *mdatoms;
- t_pbc pbc, *pbc_null;
- int my_clust;
- FILE *fplog;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
-
- t_filenm fnm[] = {
+ FILE *out = NULL, *aver = NULL, *numv = NULL, *maxxv = NULL, *xvg = NULL;
+ t_tpxheader header;
+ t_inputrec ir;
+ gmx_mtop_t mtop;
+ rvec *xtop;
+ gmx_localtop_t *top;
+ t_atoms *atoms = NULL;
+ t_fcdata fcd;
+ t_nrnb nrnb;
+ t_graph *g;
+ int ntopatoms, natoms, i, j, kkk;
+ t_trxstatus *status;
+ real t;
+ rvec *x, *f, *xav = NULL;
+ matrix box;
+ gmx_bool bPDB;
+ int isize;
+ atom_id *index = NULL, *ind_fit = NULL;
+ char *grpname;
+ t_cluster_ndx *clust = NULL;
+ t_dr_result dr, *dr_clust = NULL;
+ char **leg;
+ real *vvindex = NULL, *w_rls = NULL;
+ t_mdatoms *mdatoms;
+ t_pbc pbc, *pbc_null;
+ int my_clust;
+ FILE *fplog;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
+
+ t_filenm fnm[] = {
{ efTPR, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
{ efXVG, "-ds", "drsum", ffWRITE },
gmx_bool bPhobres[], real t,
real *acc, FILE *fTArea,
t_matrix *mat, int average_area[],
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
static gmx_bool bFirst = TRUE;
static char *ssbuf;
}
void analyse_ss(const char *outfile, t_matrix *mat, const char *ss_string,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
t_mapping *map;
char pdbfile[32], tmpfile[32];
char dssp[256];
const char *dptr;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
gmx_rmpbc_t gpbc = NULL;
t_filenm fnm[] = {
int nV, nframes, n_alloc, i, j, fftcode, Nmol, Natom;
double rho, dt, Vsum, V, tmass, dostot, dos2;
real **c1, **dos, mi, beta, bfac, *nu, *tt, stddev, c1j;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
gmx_fft_t fft;
double cP, DiffCoeff, Delta, f, y, z, sigHS, Shs, Sig, DoS0, recip_fac;
double wCdiff, wSdiff, wAdiff, wEdiff;
"The [TT]-norm[tt] option (area-) normalizes the histograms."
};
- static gmx_bool bPBCdist = FALSE, bNormHist = FALSE;
- int histbins = 50;
- output_env_t oenv;
- real R0 = -1;
+ static gmx_bool bPBCdist = FALSE, bNormHist = FALSE;
+ int histbins = 50;
+ gmx_output_env_t *oenv;
+ real R0 = -1;
- t_pargs pa[] =
+ t_pargs pa[] =
{
{ "-pbcdist", FALSE, etBOOL, { &bPBCdist }, "Distance R based on PBC" },
{ "-norm", FALSE, etBOOL, { &bNormHist }, "Normalize histograms" },
int gmx_dyndom(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] reads a [REF].pdb[ref] file output from DynDom",
"(http://www.cmp.uea.ac.uk/dyndom/).",
"It reads the coordinates, the coordinates of the rotation axis,",
"inspection, and energy minimization may be necessary to",
"validate the structure."
};
- static real trans0 = 0;
- static rvec head = { 0, 0, 0 };
- static rvec tail = { 0, 0, 0 };
- static real angle0 = 0, angle1 = 0, maxangle = 0;
- static int label = 0, nframes = 11;
- t_pargs pa[] = {
+ static real trans0 = 0;
+ static rvec head = { 0, 0, 0 };
+ static rvec tail = { 0, 0, 0 };
+ static real angle0 = 0, angle1 = 0, maxangle = 0;
+ static int label = 0, nframes = 11;
+ t_pargs pa[] = {
{ "-firstangle", FALSE, etREAL, {&angle0},
"Angle of rotation about rotation vector" },
{ "-lastangle", FALSE, etREAL, {&angle1},
{ "-tail", FALSE, etRVEC, {tail},
"Last atom of the arrow vector" }
};
- int i, j, natoms, isize;
- t_trxstatus *status;
- atom_id *index = NULL, *index_all;
- char *grpname;
- real angle, trans;
- rvec *x, *v, *xout, *vout;
- matrix box;
- output_env_t oenv;
+ int i, j, natoms, isize;
+ t_trxstatus *status;
+ atom_id *index = NULL, *index_all;
+ char *grpname;
+ real angle, trans;
+ rvec *x, *v, *xout, *vout;
+ matrix box;
+ gmx_output_env_t *oenv;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efPDB, "-f", "dyndom", ffREAD },
{ efTRO, "-o", "rotated", ffWRITE },
{ efNDX, "-n", "domains", ffREAD }
};
#define NPA asize(pa)
- FILE *out;
- const char *infile, *outfile;
- int outftp, inftp, natom, i, j, n_bfac, itype, ntype;
- double *bfac = NULL, c6, c12;
- int *bfac_nr = NULL;
- t_topology *top = NULL;
- char *grpname, *sgrpname, *agrpname;
- int isize, ssize, asize;
- atom_id *index, *sindex, *aindex;
- rvec *x, *v, gc, rmin, rmax, size;
- int ePBC;
- matrix box, rotmatrix, trans;
- rvec princd, tmpvec;
- gmx_bool bIndex, bSetSize, bSetAng, bDist, bSetCenter, bAlign;
- gmx_bool bHaveV, bScale, bRho, bTranslate, bRotate, bCalcGeom, bCalcDiam;
- real diam = 0, mass = 0, d, vdw;
- gmx_atomprop_t aps;
- gmx_conect conect;
- output_env_t oenv;
- t_filenm fnm[] =
+ FILE *out;
+ const char *infile, *outfile;
+ int outftp, inftp, natom, i, j, n_bfac, itype, ntype;
+ double *bfac = NULL, c6, c12;
+ int *bfac_nr = NULL;
+ t_topology *top = NULL;
+ char *grpname, *sgrpname, *agrpname;
+ int isize, ssize, asize;
+ atom_id *index, *sindex, *aindex;
+ rvec *x, *v, gc, rmin, rmax, size;
+ int ePBC;
+ matrix box, rotmatrix, trans;
+ rvec princd, tmpvec;
+ gmx_bool bIndex, bSetSize, bSetAng, bDist, bSetCenter, bAlign;
+ gmx_bool bHaveV, bScale, bRho, bTranslate, bRotate, bCalcGeom, bCalcDiam;
+ real diam = 0, mass = 0, d, vdw;
+ gmx_atomprop_t aps;
+ gmx_conect conect;
+ gmx_output_env_t *oenv;
+ t_filenm fnm[] =
{
{ efSTX, "-f", NULL, ffREAD },
{ efNDX, "-n", NULL, ffOPTRD },
int gmx_eneconv(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"With [IT]multiple files[it] specified for the [TT]-f[tt] option:[PAR]",
"Concatenates several energy files in sorted order.",
"In the case of double time frames, the one",
"[TT]-settime[tt] is applied first, then [TT]-dt[tt]/[TT]-offset[tt]",
"followed by [TT]-b[tt] and [TT]-e[tt] to select which frames to write."
};
- const char *bugs[] = {
+ const char *bugs[] = {
"When combining trajectories the sigma and E^2 (necessary for statistics) are not updated correctly. Only the actual energy is correct. One thus has to compute statistics in another way."
};
- ener_file_t in = NULL, out = NULL;
- gmx_enxnm_t *enm = NULL;
+ ener_file_t in = NULL, out = NULL;
+ gmx_enxnm_t *enm = NULL;
#if 0
- ener_file_t in, out = NULL;
- gmx_enxnm_t *enm = NULL;
+ ener_file_t in, out = NULL;
+ gmx_enxnm_t *enm = NULL;
#endif
- t_enxframe *fr, *fro;
- gmx_int64_t ee_sum_step = 0, ee_sum_nsteps, ee_sum_nsum;
- t_energy *ee_sum;
- gmx_int64_t lastfilestep, laststep, startstep_file = 0;
- int noutfr;
- int nre, nremax, this_nre, nfile, f, i, kkk, nset, *set = NULL;
- double last_t;
- char **fnms;
- real *readtime, *settime, timestep, tadjust;
- char buf[22], buf2[22];
- int *cont_type;
- gmx_bool bNewFile, bFirst, bNewOutput;
- output_env_t oenv;
- gmx_bool warned_about_dh = FALSE;
- t_enxblock *blocks = NULL;
- int nblocks = 0;
- int nblocks_alloc = 0;
-
- t_filenm fnm[] = {
+ t_enxframe *fr, *fro;
+ gmx_int64_t ee_sum_step = 0, ee_sum_nsteps, ee_sum_nsum;
+ t_energy *ee_sum;
+ gmx_int64_t lastfilestep, laststep, startstep_file = 0;
+ int noutfr;
+ int nre, nremax, this_nre, nfile, f, i, kkk, nset, *set = NULL;
+ double last_t;
+ char **fnms;
+ real *readtime, *settime, timestep, tadjust;
+ char buf[22], buf2[22];
+ int *cont_type;
+ gmx_bool bNewFile, bFirst, bNewOutput;
+ gmx_output_env_t *oenv;
+ gmx_bool warned_about_dh = FALSE;
+ t_enxblock *blocks = NULL;
+ int nblocks = 0;
+ int nblocks_alloc = 0;
+
+ t_filenm fnm[] = {
{ efEDR, "-f", NULL, ffRDMULT },
{ efEDR, "-o", "fixed", ffWRITE },
};
egTotal (total energy) */
#define egTotal egNR
#define egSP 1
- gmx_bool egrp_use[egNR+egSP];
- ener_file_t in;
- FILE *out;
- int timecheck = 0;
- gmx_enxnm_t *enm = NULL;
- t_enxframe *fr;
- int teller = 0;
- real sum;
- gmx_bool bCont, bRef;
- gmx_bool bCutmax, bCutmin;
- real **eneset, *time = NULL;
- int *set, i, j, k, prevk, m = 0, n, nre, nset, nenergy;
- char **groups = NULL;
- char groupname[255], fn[255];
- int ngroups;
- t_rgb rlo, rhi, rmid;
- real emax, emid, emin;
- real ***emat, **etot, *groupnr;
- double beta, expE, **e, *eaver, *efree = NULL, edum;
- char label[234];
- char **ereflines, **erefres = NULL;
- real *eref = NULL, *edif = NULL;
- int neref = 0;
- output_env_t oenv;
+ gmx_bool egrp_use[egNR+egSP];
+ ener_file_t in;
+ FILE *out;
+ int timecheck = 0;
+ gmx_enxnm_t *enm = NULL;
+ t_enxframe *fr;
+ int teller = 0;
+ real sum;
+ gmx_bool bCont, bRef;
+ gmx_bool bCutmax, bCutmin;
+ real **eneset, *time = NULL;
+ int *set, i, j, k, prevk, m = 0, n, nre, nset, nenergy;
+ char **groups = NULL;
+ char groupname[255], fn[255];
+ int ngroups;
+ t_rgb rlo, rhi, rmid;
+ real emax, emid, emin;
+ real ***emat, **etot, *groupnr;
+ double beta, expE, **e, *eaver, *efree = NULL, edum;
+ char label[234];
+ char **ereflines, **erefres = NULL;
+ real *eref = NULL, *edif = NULL;
+ int neref = 0;
+ gmx_output_env_t *oenv;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efEDR, "-f", NULL, ffOPTRD },
{ efDAT, "-groups", "groups", ffREAD },
{ efDAT, "-eref", "eref", ffOPTRD },
static void analyse_disre(const char *voutfn, int nframes,
real violaver[], real bounds[], int index[],
int pair[], int nbounds,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *vout;
double sum, sumt, sumaver;
static void einstein_visco(const char *fn, const char *fni, int nsets,
int nint, real **eneint,
real V, real T, double dt,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp0, *fp1;
double av[4], avold[4];
char **leg, gmx_enxnm_t *enm,
real Vaver, real ezero,
int nbmin, int nbmax,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
/* Check out the printed manual for equations! */
static void fec(const char *ene2fn, const char *runavgfn,
real reftemp, int nset, int set[], char *leg[],
enerdata_t *edat, double time[],
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
const char * ravgleg[] = {
"\\8D\\4E = E\\sB\\N-E\\sA\\N",
static void do_dhdl(t_enxframe *fr, t_inputrec *ir, FILE **fp_dhdl,
const char *filename, gmx_bool bDp,
int *blocks, int *hists, int *samples, int *nlambdas,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
const char *dhdl = "dH/d\\lambda", *deltag = "\\DeltaH", *lambda = "\\lambda";
char title[STRLEN], label_x[STRLEN], label_y[STRLEN], legend[STRLEN];
int resnr_j, resnr_k;
const char *orinst_sub = "@ subtitle \"instantaneous\"\n";
char buf[256];
- output_env_t oenv;
+ gmx_output_env_t *oenv;
t_enxblock *blk = NULL;
t_enxblock *blk_disre = NULL;
int ndisre = 0;
int gmx_filter(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] performs frequency filtering on a trajectory.",
"The filter shape is cos([GRK]pi[grk] t/A) + 1 from -A to +A, where A is given",
"by the option [TT]-nf[tt] times the time step in the input trajectory.",
"the coordinates in the structure file."
};
- static int nf = 10;
- static gmx_bool bNoJump = TRUE, bFit = FALSE, bLowAll = FALSE;
- t_pargs pa[] = {
+ static int nf = 10;
+ static gmx_bool bNoJump = TRUE, bFit = FALSE, bLowAll = FALSE;
+ t_pargs pa[] = {
{ "-nf", FALSE, etINT, {&nf},
"Sets the filter length as well as the output interval for low-pass filtering" },
{ "-all", FALSE, etBOOL, {&bLowAll},
{ "-fit", FALSE, etBOOL, {&bFit},
"Fit all frames to a reference structure" }
};
- const char *topfile, *lowfile, *highfile;
- gmx_bool bTop = FALSE;
- t_topology top;
- int ePBC = -1;
- rvec *xtop;
- matrix topbox, *box, boxf;
- char *grpname;
- int isize;
- atom_id *index;
- real *w_rls = NULL;
- t_trxstatus *in;
- t_trxstatus *outl, *outh;
- int nffr, i, fr, nat, j, d, m;
- atom_id *ind;
- real flen, *filt, sum, *t;
- rvec xcmtop, xcm, **x, *ptr, *xf, *xn, *xp, hbox;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
+ const char *topfile, *lowfile, *highfile;
+ gmx_bool bTop = FALSE;
+ t_topology top;
+ int ePBC = -1;
+ rvec *xtop;
+ matrix topbox, *box, boxf;
+ char *grpname;
+ int isize;
+ atom_id *index;
+ real *w_rls = NULL;
+ t_trxstatus *in;
+ t_trxstatus *outl, *outh;
+ int nffr, i, fr, nat, j, d, m;
+ atom_id *ind;
+ real flen, *filt, sum, *t;
+ rvec xcmtop, xcm, **x, *ptr, *xf, *xn, *xp, hbox;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
#define NLEG asize(leg)
t_filenm fnm[] = {
char *grpname;
gmx_bool *bSet;
int i, nw, nwa, nsa, nsalt, iqtot;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
gmx_rng_t rng;
t_filenm fnm[] = {
{ efTPR, NULL, NULL, ffREAD },
};
#define npargs asize(pa)
- output_env_t oenv;
- t_atoms *atoms = NULL;
- int i, j, k;
- FILE *out;
- int igrp;
- real d, dd, lo, hi;
- atom_id *ind_grp;
- const char *xfn, *nfn;
- char *gn_grp;
- matrix box;
- gmx_bool bFreeze;
- rvec dx, *x = NULL, *v = NULL;
+ gmx_output_env_t *oenv;
+ t_atoms *atoms = NULL;
+ int i, j, k;
+ FILE *out;
+ int igrp;
+ real d, dd, lo, hi;
+ atom_id *ind_grp;
+ const char *xfn, *nfn;
+ char *gn_grp;
+ matrix box;
+ gmx_bool bFreeze;
+ rvec dx, *x = NULL, *v = NULL;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efSTX, "-f", NULL, ffREAD },
{ efNDX, "-n", NULL, ffOPTRD },
{ efITP, "-o", "posre", ffWRITE },
int gmx_gyrate(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes the radius of gyration of a molecule",
"and the radii of gyration about the [IT]x[it]-, [IT]y[it]- and [IT]z[it]-axes,",
"as a function of time. The atoms are explicitly mass weighted.[PAR]",
"With the option [TT]-nz[tt] 2D radii of gyration in the [IT]x-y[it] plane",
"of slices along the [IT]z[it]-axis are calculated."
};
- static int nmol = 1, nz = 0;
- static gmx_bool bQ = FALSE, bRot = FALSE, bMOI = FALSE;
- t_pargs pa[] = {
+ static int nmol = 1, nz = 0;
+ static gmx_bool bQ = FALSE, bRot = FALSE, bMOI = FALSE;
+ t_pargs pa[] = {
{ "-nmol", FALSE, etINT, {&nmol},
"The number of molecules to analyze" },
{ "-q", FALSE, etBOOL, {&bQ},
{ "-nz", FALSE, etINT, {&nz},
"Calculate the 2D radii of gyration of this number of slices along the z-axis" },
};
- FILE *out;
- t_trxstatus *status;
- t_topology top;
- int ePBC;
- rvec *x, *x_s;
- rvec xcm, gvec, gvec1;
- matrix box, trans;
- gmx_bool bACF;
- real **moi_trans = NULL;
- int max_moi = 0, delta_moi = 100;
- rvec d, d1; /* eigenvalues of inertia tensor */
- real t, t0, tm, gyro;
- int natoms;
- char *grpname;
- int j, m, gnx, nam, mol;
- atom_id *index;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
- const char *leg[] = { "Rg", "Rg\\sX\\N", "Rg\\sY\\N", "Rg\\sZ\\N" };
- const char *legI[] = { "Itot", "I1", "I2", "I3" };
+ FILE *out;
+ t_trxstatus *status;
+ t_topology top;
+ int ePBC;
+ rvec *x, *x_s;
+ rvec xcm, gvec, gvec1;
+ matrix box, trans;
+ gmx_bool bACF;
+ real **moi_trans = NULL;
+ int max_moi = 0, delta_moi = 100;
+ rvec d, d1; /* eigenvalues of inertia tensor */
+ real t, t0, tm, gyro;
+ int natoms;
+ char *grpname;
+ int j, m, gnx, nam, mol;
+ atom_id *index;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
+ const char *leg[] = { "Rg", "Rg\\sX\\N", "Rg\\sY\\N", "Rg\\sZ\\N" };
+ const char *legI[] = { "Itot", "I1", "I2", "I3" };
#define NLEG asize(leg)
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efXVG, "-acf", "moi-acf", ffOPTWR },
};
#define NFILE asize(fnm)
- int npargs;
- t_pargs *ppa;
+ int npargs;
+ t_pargs *ppa;
npargs = asize(pa);
ppa = add_acf_pargs(&npargs, pa);
real **slOrder, real *slWidth, int *nslices,
t_topology *top, int ePBC,
int axis, gmx_bool bMicel, atom_id micel[], int nmic,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
rvec *x0, /* coordinates with pbc */
dipole, /* dipole moment due to one molecules */
}
void h2order_plot(rvec dipole[], real order[], const char *afile,
- int nslices, real slWidth, const output_env_t oenv)
+ int nslices, real slWidth, const gmx_output_env_t *oenv)
{
FILE *ord; /* xvgr files with order parameters */
int slice; /* loop index */
"assigning molecules to slices is different."
};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
real *slOrder, /* av. cosine, per slice */
slWidth = 0.0; /* width of a slice */
rvec *slDipole;
}
static void do_hblife(const char *fn, t_hbdata *hb, gmx_bool bMerge, gmx_bool bContact,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
const char *leg[] = { "p(t)", "t p(t)" };
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, const output_env_t oenv,
+ real temp, gmx_bool R2, const gmx_output_env_t *oenv,
int nThreads)
{
FILE *fp;
}
}
-static FILE *open_donor_properties_file(const char *fn,
- t_hbdata *hb,
- const output_env_t oenv)
+static FILE *open_donor_properties_file(const char *fn,
+ t_hbdata *hb,
+ const gmx_output_env_t *oenv)
{
FILE *fp = NULL;
const char *leg[] = { "Nbound", "Nfree" };
t_ncell *icell, *jcell;
ivec ngrid;
unsigned char *datable;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
int ii, hh, actual_nThreads;
int threadNr = 0;
gmx_bool bParallel;
real val;
} t_xvgrfile;
- t_xvgrfile xf[efhNR] = {
+ t_xvgrfile xf[efhNR] = {
{ NULL, NULL, TRUE, "radius", "Helix radius", NULL, "r (nm)", 0.0 },
{ NULL, NULL, TRUE, "twist", "Twist per residue", NULL, "Angle (deg)", 0.0 },
{ NULL, NULL, TRUE, "rise", "Rise per residue", NULL, "Rise (nm)", 0.0 },
{ NULL, NULL, FALSE, "helicity", "Helicity per Residue", "Residue", "% of time", 0.0 }
};
- output_env_t oenv;
- char buf[54];
- t_trxstatus *status;
- int natoms, nres;
- t_bb *bb;
- int i, j, nall, nbb, nca, teller;
- atom_id *bbindex, *caindex, *allindex;
- t_topology *top;
- int ePBC;
- rvec *x, *xref;
- real t;
- real rms;
- matrix box;
- gmx_rmpbc_t gpbc = NULL;
- gmx_bool bRange;
- t_filenm fnm[] = {
+ gmx_output_env_t *oenv;
+ char buf[54];
+ t_trxstatus *status;
+ int natoms, nres;
+ t_bb *bb;
+ int i, j, nall, nbb, nca, teller;
+ atom_id *bbindex, *caindex, *allindex;
+ t_topology *top;
+ int ePBC;
+ rvec *x, *xref;
+ real t;
+ real rms;
+ matrix box;
+ gmx_rmpbc_t gpbc = NULL;
+ gmx_bool bRange;
+ t_filenm fnm[] = {
{ efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
int gmx_helixorient(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] calculates the coordinates and direction of the average",
"axis inside an alpha helix, and the direction/vectors of both the",
"C[GRK]alpha[grk] and (optionally) a sidechain atom relative to the axis.[PAR]",
"purposes, we also write out the actual Euler rotation angles as [TT]theta[1-3].xvg[tt]"
};
- t_topology *top = NULL;
- real t;
- rvec *x = NULL;
- matrix box;
- t_trxstatus *status;
- int natoms;
- real theta1, theta2, theta3;
-
- int i, j, teller = 0;
- int iCA, iSC;
- atom_id *ind_CA;
- atom_id *ind_SC;
- char *gn_CA;
- char *gn_SC;
- rvec v1, v2;
- rvec *x_CA, *x_SC;
- rvec *r12;
- rvec *r23;
- rvec *r34;
- rvec *diff13;
- rvec *diff24;
- rvec *helixaxis;
- rvec *residuehelixaxis;
- rvec *residueorigin;
- rvec *residuevector;
- rvec *sidechainvector;
-
- rvec *residuehelixaxis_t0;
- rvec *residuevector_t0;
- rvec *axis3_t0;
- rvec *residuehelixaxis_tlast;
- rvec *residuevector_tlast;
- rvec *axis3_tlast;
- rvec refaxes[3], newaxes[3];
- rvec unitaxes[3];
- rvec rot_refaxes[3], rot_newaxes[3];
-
- real tilt, rotation;
- rvec *axis3;
- real *twist, *residuetwist;
- real *radius, *residueradius;
- real *rise, *residuerise;
- real *residuebending;
-
- real tmp;
- real weight[3];
- t_pbc pbc;
- matrix A;
-
- FILE *fpaxis, *fpcenter, *fptilt, *fprotation;
- FILE *fpradius, *fprise, *fptwist;
- FILE *fptheta1, *fptheta2, *fptheta3;
- FILE *fpbending;
- int ePBC;
-
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
-
- static gmx_bool bSC = FALSE;
- static gmx_bool bIncremental = FALSE;
-
- static t_pargs pa[] = {
+ t_topology *top = NULL;
+ real t;
+ rvec *x = NULL;
+ matrix box;
+ t_trxstatus *status;
+ int natoms;
+ real theta1, theta2, theta3;
+
+ int i, j, teller = 0;
+ int iCA, iSC;
+ atom_id *ind_CA;
+ atom_id *ind_SC;
+ char *gn_CA;
+ char *gn_SC;
+ rvec v1, v2;
+ rvec *x_CA, *x_SC;
+ rvec *r12;
+ rvec *r23;
+ rvec *r34;
+ rvec *diff13;
+ rvec *diff24;
+ rvec *helixaxis;
+ rvec *residuehelixaxis;
+ rvec *residueorigin;
+ rvec *residuevector;
+ rvec *sidechainvector;
+
+ rvec *residuehelixaxis_t0;
+ rvec *residuevector_t0;
+ rvec *axis3_t0;
+ rvec *residuehelixaxis_tlast;
+ rvec *residuevector_tlast;
+ rvec *axis3_tlast;
+ rvec refaxes[3], newaxes[3];
+ rvec unitaxes[3];
+ rvec rot_refaxes[3], rot_newaxes[3];
+
+ real tilt, rotation;
+ rvec *axis3;
+ real *twist, *residuetwist;
+ real *radius, *residueradius;
+ real *rise, *residuerise;
+ real *residuebending;
+
+ real tmp;
+ real weight[3];
+ t_pbc pbc;
+ matrix A;
+
+ FILE *fpaxis, *fpcenter, *fptilt, *fprotation;
+ FILE *fpradius, *fprise, *fptwist;
+ FILE *fptheta1, *fptheta2, *fptheta3;
+ FILE *fpbending;
+ int ePBC;
+
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
+
+ static gmx_bool bSC = FALSE;
+ static gmx_bool bIncremental = FALSE;
+
+ static t_pargs pa[] = {
{ "-sidechain", FALSE, etBOOL, {&bSC},
"Calculate sidechain directions relative to helix axis too." },
{ "-incremental", FALSE, etBOOL, {&bIncremental},
static void calc_tetra_order_interface(const char *fnNDX, const char *fnTPS, const char *fnTRX, real binw, int tblock,
int *nframes, int *nslicex, int *nslicey,
real sgang1, real sgang2, real ****intfpos,
- output_env_t oenv)
+ gmx_output_env_t *oenv)
{
FILE *fpsg = NULL, *fpsk = NULL;
t_topology top;
#define NFILE asize(fnm)
/*Filenames*/
- const char *ndxfnm, *tpsfnm, *trxfnm;
- char **spectra, **intfn, **raw;
- int nfspect, nfxpm, nfraw;
- output_env_t oenv;
+ const char *ndxfnm, *tpsfnm, *trxfnm;
+ char **spectra, **intfn, **raw;
+ int nfspect, nfxpm, nfraw;
+ gmx_output_env_t *oenv;
if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME,
NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
};
#define NPA asize(pa)
- FILE *out;
- int nre, nframes = 0, ct = 0;
- ener_file_t fp;
- t_liedata *ld;
- gmx_enxnm_t *enm = NULL;
- t_enxframe *fr;
- real lie;
- double lieaver = 0, lieav2 = 0;
- output_env_t oenv;
-
- t_filenm fnm[] = {
+ FILE *out;
+ int nre, nframes = 0, ct = 0;
+ ener_file_t fp;
+ t_liedata *ld;
+ gmx_enxnm_t *enm = NULL;
+ t_enxframe *fr;
+ real lie;
+ double lieaver = 0, lieav2 = 0;
+ gmx_output_env_t *oenv;
+
+ t_filenm fnm[] = {
{ efEDR, "-f", "ener", ffREAD },
{ efXVG, "-o", "lie", ffWRITE }
};
};
#define NPA asize(pa)
- rvec *xref1;
- int nvec1, *eignr1 = NULL;
- rvec *xav1, **eigvec1 = NULL;
- t_atoms *atoms = NULL;
- int nav; /* Number of atoms in the average structure */
- char *grpname;
- const char *indexfile;
- int i;
- atom_id *index, *ifit;
- int nfit; /* Number of atoms in the reference/fit structure */
- int ev_class; /* parameter _class i.e. evMON, evRADFIX etc. */
- int nvecs;
- real *eigval1 = NULL; /* in V3.3 this is parameter of read_eigenvectors */
-
- const char *EdiFile;
- const char *TargetFile;
- const char *OriginFile;
- const char *EigvecFile;
-
- output_env_t oenv;
+ rvec *xref1;
+ int nvec1, *eignr1 = NULL;
+ rvec *xav1, **eigvec1 = NULL;
+ t_atoms *atoms = NULL;
+ int nav; /* Number of atoms in the average structure */
+ char *grpname;
+ const char *indexfile;
+ int i;
+ atom_id *index, *ifit;
+ int nfit; /* Number of atoms in the reference/fit structure */
+ int ev_class; /* parameter _class i.e. evMON, evRADFIX etc. */
+ int nvecs;
+ real *eigval1 = NULL; /* in V3.3 this is parameter of read_eigenvectors */
+
+ const char *EdiFile;
+ const char *TargetFile;
+ const char *OriginFile;
+ const char *EigvecFile;
+
+ gmx_output_env_t *oenv;
/*to read topology file*/
t_topology top;
};
#define NPA asize(pa)
- output_env_t oenv;
- int nndxin;
- const char *stxfile;
- char **ndxinfiles;
- const char *ndxoutfile;
- gmx_bool bNatoms;
- int i, j;
- t_atoms *atoms;
- rvec *x, *v;
- int ePBC;
- matrix box;
- t_blocka *block, *block2;
- char **gnames, **gnames2;
- t_filenm fnm[] = {
+ gmx_output_env_t *oenv;
+ int nndxin;
+ const char *stxfile;
+ char **ndxinfiles;
+ const char *ndxoutfile;
+ gmx_bool bNatoms;
+ int i, j;
+ t_atoms *atoms;
+ rvec *x, *v;
+ int ePBC;
+ matrix box;
+ t_blocka *block, *block2;
+ char **gnames, **gnames2;
+ t_filenm fnm[] = {
{ efSTX, "-f", NULL, ffOPTRD },
{ efNDX, "-n", NULL, ffOPTRDMULT },
{ efNDX, "-o", NULL, ffWRITE }
};
#define NFILE asize(fnm)
- FILE *out = NULL, *fp;
- t_topology top;
- int ePBC;
- t_atoms useatoms;
- int isize;
- atom_id *index;
- char *grpname;
- int *rndx, *natm, prevres, newres;
-
- int i, j, nres, natoms, nframes, trxnat;
- t_trxstatus *status;
- gmx_bool bCalcN, bFrames;
- real t, ratio;
- char label[234];
- t_rgb rlo, rhi;
- rvec *x;
- real **mdmat, *resnr, **totmdmat;
- int **nmat, **totnmat;
- real *mean_n;
- int *tot_n;
- matrix box = {{0}};
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
+ FILE *out = NULL, *fp;
+ t_topology top;
+ int ePBC;
+ t_atoms useatoms;
+ int isize;
+ atom_id *index;
+ char *grpname;
+ int *rndx, *natm, prevres, newres;
+
+ int i, j, nres, natoms, nframes, trxnat;
+ t_trxstatus *status;
+ gmx_bool bCalcN, bFrames;
+ real t, ratio;
+ char label[234];
+ t_rgb rlo, rhi;
+ rvec *x;
+ real **mdmat, *resnr, **totmdmat;
+ int **nmat, **totnmat;
+ real *mean_n;
+ int *tot_n;
+ matrix box = {{0}};
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
if (!parse_common_args(&argc, argv, PCA_CAN_TIME, NFILE, fnm,
asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
static void periodic_mindist_plot(const char *trxfn, const char *outfn,
t_topology *top, int ePBC,
int n, atom_id index[], gmx_bool bSplit,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *out;
const char *leg[5] = { "min per.", "max int.", "box1", "box2", "box3" };
int ng, atom_id *index[], int gnx[], char *grpn[], gmx_bool bSplit,
gmx_bool bMin, int nres, atom_id *residue, gmx_bool bPBC, int ePBC,
gmx_bool bGroup, gmx_bool bEachResEachTime, gmx_bool bPrintResName,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *atm, *dist, *num;
t_trxstatus *trxout;
int gmx_mindist(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes the distance between one group and a number of",
"other groups. Both the minimum distance",
"(between any pair of atoms from the respective groups)",
"Also [gmx-distance] and [gmx-pairdist] calculate distances."
};
- static gmx_bool bMat = FALSE, bPI = FALSE, bSplit = FALSE, bMax = FALSE, bPBC = TRUE;
- static gmx_bool bGroup = FALSE;
- static real rcutoff = 0.6;
- static int ng = 1;
- static gmx_bool bEachResEachTime = FALSE, bPrintResName = FALSE;
- t_pargs pa[] = {
+ static gmx_bool bMat = FALSE, bPI = FALSE, bSplit = FALSE, bMax = FALSE, bPBC = TRUE;
+ static gmx_bool bGroup = FALSE;
+ static real rcutoff = 0.6;
+ static int ng = 1;
+ static gmx_bool bEachResEachTime = FALSE, bPrintResName = FALSE;
+ t_pargs pa[] = {
{ "-matrix", FALSE, etBOOL, {&bMat},
"Calculate half a matrix of group-group distances" },
{ "-max", FALSE, etBOOL, {&bMax},
{ "-printresname", FALSE, etBOOL, {&bPrintResName},
"Write residue names" }
};
- output_env_t oenv;
- t_topology *top = NULL;
- int ePBC = -1;
- rvec *x;
- matrix box;
- gmx_bool bTop = FALSE;
-
- int i, nres = 0;
- const char *trxfnm, *tpsfnm, *ndxfnm, *distfnm, *numfnm, *atmfnm, *oxfnm, *resfnm;
- char **grpname;
- int *gnx;
- atom_id **index, *residues = NULL;
- t_filenm fnm[] = {
+ gmx_output_env_t *oenv;
+ t_topology *top = NULL;
+ int ePBC = -1;
+ rvec *x;
+ matrix box;
+ gmx_bool bTop = FALSE;
+
+ int i, nres = 0;
+ const char *trxfnm, *tpsfnm, *ndxfnm, *distfnm, *numfnm, *atmfnm, *oxfnm, *resfnm;
+ char **grpname;
+ int *gnx;
+ atom_id **index, *residues = NULL;
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffOPTRD },
{ efNDX, NULL, NULL, ffOPTRD },
"Ignore angles with atoms with mass < 1.5 and magnitude of their charge less than this value" }
};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
FILE *out;
t_topology *top;
int i, j, ntype;
int gmx_morph(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] does a linear interpolation of conformations in order to",
"create intermediates. Of course these are completely unphysical, but",
"that you may try to justify yourself. Output is in the form of a ",
"if explicitly selected ([TT]-or[tt] option). In that case, an index file may be",
"read to select the group from which the RMS is computed."
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efSTX, "-f1", "conf1", ffREAD },
{ efSTX, "-f2", "conf2", ffREAD },
{ efTRX, "-o", "interm", ffWRITE },
{ efNDX, "-n", "index", ffOPTRD }
};
#define NFILE asize(fnm)
- static int ninterm = 11;
- static real first = 0.0;
- static real last = 1.0;
- static gmx_bool bFit = TRUE;
- t_pargs pa [] = {
+ static int ninterm = 11;
+ static real first = 0.0;
+ static real last = 1.0;
+ static gmx_bool bFit = TRUE;
+ t_pargs pa [] = {
{ "-ninterm", FALSE, etINT, {&ninterm},
"Number of intermediates" },
{ "-first", FALSE, etREAL, {&first},
{ "-fit", FALSE, etBOOL, {&bFit},
"Do a least squares fit of the second to the first structure before interpolating" }
};
- const char *leg[] = { "Ref = 1\\Sst\\N conf", "Ref = 2\\Snd\\N conf" };
- FILE *fp = NULL;
- int i, isize, is_lsq, nat1, nat2;
- t_trxstatus *status;
- atom_id *index, *index_lsq, *index_all, *dummy;
- rvec *x1, *x2, *xx;
- matrix box;
- real rms1, rms2, fac, *mass;
- char *grpname;
- gmx_bool bRMS;
- output_env_t oenv;
+ const char *leg[] = { "Ref = 1\\Sst\\N conf", "Ref = 2\\Snd\\N conf" };
+ FILE *fp = NULL;
+ int i, isize, is_lsq, nat1, nat2;
+ t_trxstatus *status;
+ atom_id *index, *index_lsq, *index_all, *dummy;
+ rvec *x1, *x2, *xx;
+ matrix box;
+ real rms1, rms2, fac, *mass;
+ char *grpname;
+ gmx_bool bRMS;
+ gmx_output_env_t *oenv;
if (!parse_common_args(&argc, argv, PCA_CAN_VIEW,
NFILE, fnm, asize(pa), pa, asize(desc), desc,
const char *yaxis,
real msdtime, real beginfit, real endfit,
real *DD, real *SigmaD, char *grpname[],
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *out;
int i, j;
void printmol(t_corr *curr, const char *fn,
const char *fn_pdb, int *molindex, t_topology *top,
- rvec *x, int ePBC, matrix box, const output_env_t oenv)
+ rvec *x, int ePBC, matrix box, const gmx_output_env_t *oenv)
{
#define NDIST 100
FILE *out;
gmx_bool bMol, int gnx[], atom_id *index[],
t_calc_func *calc1, gmx_bool bTen, int *gnx_com, atom_id *index_com[],
real dt, real t_pdb, rvec **x_pdb, matrix box_pdb,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
rvec *x[2]; /* the coordinates to read */
rvec *xa[2]; /* the coordinates to calculate displacements for */
int nrgrp, t_topology *top, int ePBC,
gmx_bool bTen, gmx_bool bMW, gmx_bool bRmCOMM,
int type, real dim_factor, int axis,
- real dt, real beginfit, real endfit, const output_env_t oenv)
+ real dt, real beginfit, real endfit, const gmx_output_env_t *oenv)
{
t_corr *msd;
int *gnx; /* the selected groups' sizes */
};
#define NFILE asize(fnm)
- t_topology top;
- int ePBC;
- matrix box;
- const char *trx_file, *tps_file, *ndx_file, *msd_file, *mol_file, *pdb_file;
- rvec *xdum;
- gmx_bool bTop;
- int axis, type;
- real dim_factor;
- output_env_t oenv;
+ t_topology top;
+ int ePBC;
+ matrix box;
+ const char *trx_file, *tps_file, *ndx_file, *msd_file, *mol_file, *pdb_file;
+ rvec *xdum;
+ gmx_bool bTop;
+ int axis, type;
+ real dim_factor;
+ gmx_output_env_t *oenv;
if (!parse_common_args(&argc, argv,
PCA_CAN_VIEW | PCA_CAN_BEGIN | PCA_CAN_END | PCA_TIME_UNIT,
real factor_omega_to_wavenumber;
real *spectrum = NULL;
real wfac;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
const char *qcleg[] = {
"Heat Capacity cV (J/mol K)",
"Enthalpy H (kJ/mol)"
int nout, *iout, noutvec, *outvec;
atom_id *index;
real rfac, rhalf, jr;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
gmx_rng_t rng;
int jran;
const unsigned long im = 0xffff;
real *phases;
const char *p;
char *pe;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
t_filenm fnm[] =
{
const char *skfn,
int nslice, int slice_dim,
const char *sgslfn, const char *skslfn,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fpsg = NULL, *fpsk = NULL;
t_topology top;
gmx_bool bUnsat, t_topology *top, int ePBC, int ngrps, int axis,
gmx_bool permolecule, gmx_bool radial, gmx_bool distcalc, const char *radfn,
real ***distvals,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
/* if permolecule = TRUE, order parameters will be calculed per molecule
* and stored in slOrder with #slices = # molecules */
void order_plot(rvec order[], real *slOrder[], const char *afile, const char *bfile,
const char *cfile, int ngrps, int nslices, real slWidth, gmx_bool bSzonly,
- gmx_bool permolecule, real **distvals, const output_env_t oenv)
+ gmx_bool permolecule, real **distvals, const gmx_output_env_t *oenv)
{
FILE *ord, *slOrd; /* xvgr files with order parameters */
int atom, slice; /* atom corresponding to order para.*/
xvgrclose(slOrd);
}
-void write_bfactors(t_filenm *fnm, int nfile, atom_id *index, atom_id *a, int nslices, int ngrps, real **order, t_topology *top, real **distvals, output_env_t oenv)
+void write_bfactors(t_filenm *fnm, int nfile, atom_id *index, atom_id *a, int nslices, int ngrps, real **order, t_topology *top, real **distvals, gmx_output_env_t *oenv)
{
/*function to write order parameters as B factors in PDB file using
first frame of trajectory*/
int ngrps, /* nr. of groups */
i,
axis = 0; /* normal axis */
- t_topology *top; /* topology */
- int ePBC;
- atom_id *index, /* indices for a */
+ t_topology *top; /* topology */
+ int ePBC;
+ atom_id *index, /* indices for a */
*a; /* atom numbers in each group */
- t_blocka *block; /* data from index file */
- t_filenm fnm[] = { /* files for g_order */
+ t_blocka *block; /* data from index file */
+ t_filenm fnm[] = { /* files for g_order */
{ efTRX, "-f", NULL, ffREAD }, /* trajectory file */
{ efNDX, "-n", NULL, ffREAD }, /* index file */
{ efNDX, "-nr", NULL, ffREAD }, /* index for radial axis calculation */
{ efXVG, "-Sgsl", "sg-ang-slice", ffOPTWR }, /* xvgr output file */
{ efXVG, "-Sksl", "sk-dist-slice", ffOPTWR }, /* xvgr output file */
};
- gmx_bool bSliced = FALSE; /* True if box is sliced */
+ gmx_bool bSliced = FALSE; /* True if box is sliced */
#define NFILE asize(fnm)
- real **distvals = NULL;
- const char *sgfnm, *skfnm, *ndxfnm, *tpsfnm, *trxfnm;
- output_env_t oenv;
+ real **distvals = NULL;
+ const char *sgfnm, *skfnm, *ndxfnm, *tpsfnm, *trxfnm;
+ gmx_output_env_t *oenv;
if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME,
NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
int seed = 0;
- static t_filenm fnm[] = {
+ static t_filenm fnm[] = {
{ efTPR, "-s", NULL, ffREAD },
{ efOUT, "-o", "error", ffWRITE },
{ efTPR, "-so", "tuned", ffOPTWR }
};
- output_env_t oenv = NULL;
+ gmx_output_env_t *oenv = NULL;
- t_pargs pa[] = {
+ t_pargs pa[] = {
{ "-beta", FALSE, etREAL, {&user_beta},
"If positive, overwrite ewald_beta from [REF].tpr[ref] file with this value" },
{ "-tune", FALSE, etBOOL, {&bTUNE},
};
#define NFILE asize(fnm)
- t_topology *top;
- output_env_t oenv;
- int ePBC;
- int isize, *index, nmol, *molind, mol, nat_min = 0, nat_max = 0;
- char *grpname;
- t_trxstatus *status;
- real t;
- rvec *x, *bond = NULL;
- matrix box;
- int natoms, i, j, frame, ind0, ind1, a, d, d2, ord[DIM] = {0};
- dvec cm, sum_eig = {0, 0, 0};
- double **gyr, **gyr_all, eig[DIM], **eigv;
- double sum_eed2, sum_eed2_tot, sum_gyro, sum_gyro_tot, sum_pers_tot;
- int *ninp = NULL;
- double *sum_inp = NULL, pers;
- double *intd, ymax, ymin;
- double mmol, m;
- char title[STRLEN];
- FILE *out, *outv, *outp, *outi;
- const char *leg[8] = {
+ t_topology *top;
+ gmx_output_env_t *oenv;
+ int ePBC;
+ int isize, *index, nmol, *molind, mol, nat_min = 0, nat_max = 0;
+ char *grpname;
+ t_trxstatus *status;
+ real t;
+ rvec *x, *bond = NULL;
+ matrix box;
+ int natoms, i, j, frame, ind0, ind1, a, d, d2, ord[DIM] = {0};
+ dvec cm, sum_eig = {0, 0, 0};
+ double **gyr, **gyr_all, eig[DIM], **eigv;
+ double sum_eed2, sum_eed2_tot, sum_gyro, sum_gyro_tot, sum_pers_tot;
+ int *ninp = NULL;
+ double *sum_inp = NULL, pers;
+ double *intd, ymax, ymin;
+ double mmol, m;
+ char title[STRLEN];
+ FILE *out, *outv, *outp, *outi;
+ const char *leg[8] = {
"end to end", "<R\\sg\\N>",
"<R\\sg\\N> eig1", "<R\\sg\\N> eig2", "<R\\sg\\N> eig3",
"<R\\sg\\N eig1>", "<R\\sg\\N eig2>", "<R\\sg\\N eig3>"
};
- char **legp, buf[STRLEN];
- gmx_rmpbc_t gpbc = NULL;
+ char **legp, buf[STRLEN];
+ gmx_rmpbc_t gpbc = NULL;
if (!parse_common_args(&argc, argv,
PCA_CAN_VIEW | PCA_CAN_TIME | PCA_TIME_UNIT,
t_topology *top, int ePBC,
int axis, int nr_grps, double *slWidth,
double fudge_z, gmx_bool bSpherical, gmx_bool bCorrect,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
rvec *x0; /* coordinates without pbc */
matrix box; /* box (3x3) */
void plot_potential(double *potential[], double *charge[], double *field[],
const char *afile, const char *bfile, const char *cfile,
int nslices, int nr_grps, const char *grpname[], double slWidth,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *pot, /* xvgr file with potential */
*cha, /* xvgr file with charges */
"spherical slices and twice integrating them. epsilon_r is taken as 1,",
"but 2 is more appropriate in many cases."
};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
static int axis = 2; /* normal to memb. default z */
static const char *axtitle = "Z";
static int nslices = 10; /* nr of slices defined */
int gmx_principal(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] calculates the three principal axes of inertia for a group",
"of atoms. NOTE: Old versions of GROMACS wrote the output data in a",
"strange transposed way. As of GROMACS 5.0, the output file paxis1.dat",
"each frame, and similarly for the middle and minor axes in paxis2.dat",
"and paxis3.dat."
};
- static gmx_bool foo = FALSE;
+ static gmx_bool foo = FALSE;
- t_pargs pa[] = {
+ t_pargs pa[] = {
{ "-foo", FALSE, etBOOL, {&foo}, "Dummy option to avoid empty array" }
};
- t_trxstatus *status;
- t_topology top;
- int ePBC;
- real t;
- rvec * x;
-
- int natoms;
- char *grpname;
- int i, gnx;
- atom_id *index;
- rvec moi;
- FILE * axis1;
- FILE * axis2;
- FILE * axis3;
- FILE * fmoi;
- matrix axes, box;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
- char ** legend;
-
- t_filenm fnm[] = {
+ t_trxstatus *status;
+ t_topology top;
+ int ePBC;
+ real t;
+ rvec * x;
+
+ int natoms;
+ char *grpname;
+ int i, gnx;
+ atom_id *index;
+ rvec moi;
+ FILE * axis1;
+ FILE * axis2;
+ FILE * axis3;
+ FILE * fmoi;
+ matrix axes, box;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
+ char ** legend;
+
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
int gmx_rama(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] selects the [GRK]phi[grk]/[GRK]psi[grk] dihedral combinations from your topology file",
"and computes these as a function of time.",
"Using simple Unix tools such as [IT]grep[it] you can select out",
"specific residues."
};
- FILE *out;
- t_xrama *xr;
- int j;
- output_env_t oenv;
- t_filenm fnm[] = {
+ FILE *out;
+ t_xrama *xr;
+ int j;
+ gmx_output_env_t *oenv;
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPR, NULL, NULL, ffREAD },
{ efXVG, NULL, "rama", ffWRITE }
real rlstot = 0, **rls, **rlsm = NULL, *time, *time2, *rlsnorm = NULL,
**rmsd_mat = NULL, **bond_mat = NULL, *axis, *axis2, *del_xaxis,
*del_yaxis, rmsd_max, rmsd_min, rmsd_avg, bond_max, bond_min, ang;
- real **rmsdav_mat = NULL, av_tot, weight, weight_tot;
- real **delta = NULL, delta_max, delta_scalex = 0, delta_scaley = 0,
+ real **rmsdav_mat = NULL, av_tot, weight, weight_tot;
+ real **delta = NULL, delta_max, delta_scalex = 0, delta_scaley = 0,
*delta_tot;
- int delta_xsize = 0, del_lev = 100, mx, my, abs_my;
- gmx_bool bA1, bA2, bPrev, bTop, *bInMat = NULL;
- int ifit, *irms, ibond = 0, *ind_bond1 = NULL, *ind_bond2 = NULL, n_ind_m =
+ int delta_xsize = 0, del_lev = 100, mx, my, abs_my;
+ gmx_bool bA1, bA2, bPrev, bTop, *bInMat = NULL;
+ int ifit, *irms, ibond = 0, *ind_bond1 = NULL, *ind_bond2 = NULL, n_ind_m =
0;
- atom_id *ind_fit, **ind_rms, *ind_m = NULL, *rev_ind_m = NULL, *ind_rms_m =
+ atom_id *ind_fit, **ind_rms, *ind_m = NULL, *rev_ind_m = NULL, *ind_rms_m =
NULL;
- char *gn_fit, **gn_rms;
- t_rgb rlo, rhi;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
+ char *gn_fit, **gn_rms;
+ t_rgb rlo, rhi;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
- t_filenm fnm[] =
+ t_filenm fnm[] =
{
{ efTPS, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
int gmx_rmsdist(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes the root mean square deviation of atom distances,",
"which has the advantage that no fit is needed like in standard RMS",
"deviation as computed by [gmx-rms].",
};
- int i, teller;
- real t;
-
- t_topology top;
- int ePBC;
- t_atoms *atoms;
- matrix box;
- rvec *x;
- FILE *fp;
-
- t_trxstatus *status;
- int isize, gnr = 0;
- atom_id *index, *noe_index;
- char *grpname;
- real **d_r, **d, **dtot, **dtot2, **mean, **rms, **rmsc, *resnr;
- real **dtot1_3 = NULL, **dtot1_6 = NULL;
- real rmsnow, meanmax, rmsmax, rmscmax;
- real max1_3, max1_6;
- t_noe_gr *noe_gr = NULL;
- t_noe **noe = NULL;
- t_rgb rlo, rhi;
- gmx_bool bRMS, bScale, bMean, bNOE, bNMR3, bNMR6, bNMR;
-
- static int nlevels = 40;
- static real scalemax = -1.0;
- static gmx_bool bSumH = TRUE;
- static gmx_bool bPBC = TRUE;
- output_env_t oenv;
-
- t_pargs pa[] = {
+ int i, teller;
+ real t;
+
+ t_topology top;
+ int ePBC;
+ t_atoms *atoms;
+ matrix box;
+ rvec *x;
+ FILE *fp;
+
+ t_trxstatus *status;
+ int isize, gnr = 0;
+ atom_id *index, *noe_index;
+ char *grpname;
+ real **d_r, **d, **dtot, **dtot2, **mean, **rms, **rmsc, *resnr;
+ real **dtot1_3 = NULL, **dtot1_6 = NULL;
+ real rmsnow, meanmax, rmsmax, rmscmax;
+ real max1_3, max1_6;
+ t_noe_gr *noe_gr = NULL;
+ t_noe **noe = NULL;
+ t_rgb rlo, rhi;
+ gmx_bool bRMS, bScale, bMean, bNOE, bNMR3, bNMR6, bNMR;
+
+ static int nlevels = 40;
+ static real scalemax = -1.0;
+ static gmx_bool bSumH = TRUE;
+ static gmx_bool bPBC = TRUE;
+ gmx_output_env_t *oenv;
+
+ t_pargs pa[] = {
{ "-nlevels", FALSE, etINT, {&nlevels},
"Discretize RMS in this number of levels" },
{ "-max", FALSE, etREAL, {&scalemax},
{ "-pbc", FALSE, etBOOL, {&bPBC},
"Use periodic boundary conditions when computing distances" }
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
}
void correlate_aniso(const char *fn, t_atoms *ref, t_atoms *calc,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
int i, j;
int gmx_rmsf(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes the root mean square fluctuation (RMSF, i.e. standard ",
"deviation) of atomic positions in the trajectory (supplied with [TT]-f[tt])",
"after (optionally) fitting to a reference frame (supplied with [TT]-s[tt]).[PAR]",
"This shows the directions in which the atoms fluctuate the most and",
"the least."
};
- static gmx_bool bRes = FALSE, bAniso = FALSE, bFit = TRUE;
- t_pargs pargs[] = {
+ static gmx_bool bRes = FALSE, bAniso = FALSE, bFit = TRUE;
+ t_pargs pargs[] = {
{ "-res", FALSE, etBOOL, {&bRes},
"Calculate averages for each residue" },
{ "-aniso", FALSE, etBOOL, {&bAniso},
{ "-fit", FALSE, etBOOL, {&bFit},
"Do a least squares superposition before computing RMSF. Without this you must make sure that the reference structure and the trajectory match." }
};
- int natom;
- int i, m, teller = 0;
- real t, *w_rls;
-
- t_topology top;
- int ePBC;
- t_atoms *pdbatoms, *refatoms;
-
- matrix box, pdbbox;
- rvec *x, *pdbx, *xref;
- t_trxstatus *status;
- const char *label;
-
- FILE *fp; /* the graphics file */
- const char *devfn, *dirfn;
- int resind;
-
- gmx_bool bReadPDB;
- atom_id *index;
- int isize;
- char *grpnames;
-
- real bfac, pdb_bfac, *Uaver;
- double **U, *xav;
- atom_id aid;
- rvec *rmsd_x = NULL;
- double *rmsf, invcount, totmass;
- int d;
- real count = 0;
- rvec xcm;
- gmx_rmpbc_t gpbc = NULL;
-
- output_env_t oenv;
-
- const char *leg[2] = { "MD", "X-Ray" };
-
- t_filenm fnm[] = {
+ int natom;
+ int i, m, teller = 0;
+ real t, *w_rls;
+
+ t_topology top;
+ int ePBC;
+ t_atoms *pdbatoms, *refatoms;
+
+ matrix box, pdbbox;
+ rvec *x, *pdbx, *xref;
+ t_trxstatus *status;
+ const char *label;
+
+ FILE *fp; /* the graphics file */
+ const char *devfn, *dirfn;
+ int resind;
+
+ gmx_bool bReadPDB;
+ atom_id *index;
+ int isize;
+ char *grpnames;
+
+ real bfac, pdb_bfac, *Uaver;
+ double **U, *xav;
+ atom_id aid;
+ rvec *rmsd_x = NULL;
+ double *rmsf, invcount, totmass;
+ int d;
+ real count = 0;
+ rvec xcm;
+ gmx_rmpbc_t gpbc = NULL;
+
+ gmx_output_env_t *oenv;
+
+ const char *leg[2] = { "MD", "X-Ray" };
+
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
int gmx_rotacf(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] calculates the rotational correlation function",
"for molecules. Atom triplets (i,j,k) must be given in the index",
"file, defining two vectors ij and jk. The rotational ACF",
"file. The correlation function will be fitted from 2.5 ps until 20.0 ps",
"to a two-parameter exponential."
};
- static gmx_bool bVec = FALSE, bAver = TRUE;
+ static gmx_bool bVec = FALSE, bAver = TRUE;
- t_pargs pa[] = {
+ t_pargs pa[] = {
{ "-d", FALSE, etBOOL, {&bVec},
"Use index doublets (vectors) for correlation function instead of triplets (planes)" },
{ "-aver", FALSE, etBOOL, {&bAver},
"Average over molecules" }
};
- t_trxstatus *status;
- int isize;
- atom_id *index;
- char *grpname;
- rvec *x, *x_s;
- matrix box;
- real **c1;
- rvec xij, xjk, n;
- int i, m, teller, n_alloc, natoms, nvec, ai, aj, ak;
- unsigned long mode;
- real t, t0, t1, dt;
- gmx_rmpbc_t gpbc = NULL;
- t_topology *top;
- int ePBC;
- t_filenm fnm[] = {
+ t_trxstatus *status;
+ int isize;
+ atom_id *index;
+ char *grpname;
+ rvec *x, *x_s;
+ matrix box;
+ real **c1;
+ rvec xij, xjk, n;
+ int i, m, teller, n_alloc, natoms, nvec, ai, aj, ak;
+ unsigned long mode;
+ real t, t0, t1, dt;
+ gmx_rmpbc_t gpbc = NULL;
+ t_topology *top;
+ int ePBC;
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffREAD },
{ efXVG, "-o", "rotacf", ffWRITE }
};
#define NFILE asize(fnm)
- int npargs;
- t_pargs *ppa;
+ int npargs;
+ t_pargs *ppa;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
npargs = asize(pa);
ppa = add_acf_pargs(&npargs, pa);
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/smalloc.h"
-static void get_refx(output_env_t oenv, const char *trxfn, int nfitdim, int skip,
+static void get_refx(gmx_output_env_t *oenv, const char *trxfn, int nfitdim, int skip,
int gnx, int *index,
gmx_bool bMW, t_topology *top, int ePBC, rvec *x_ref)
{
int gmx_rotmat(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] plots the rotation matrix required for least squares fitting",
"a conformation onto the reference conformation provided with",
"[TT]-s[tt]. Translation is removed before fitting.",
"Option [TT]-fitxy[tt] fits in the [IT]x-y[it] plane before determining",
"the rotation matrix."
};
- const char *reffit[] =
+ const char *reffit[] =
{ NULL, "none", "xyz", "xy", NULL };
- static int skip = 1;
- static gmx_bool bFitXY = FALSE, bMW = TRUE;
- t_pargs pa[] = {
+ static int skip = 1;
+ static gmx_bool bFitXY = FALSE, bMW = TRUE;
+ t_pargs pa[] = {
{ "-ref", FALSE, etENUM, {reffit},
"Determine the optimal reference structure" },
{ "-skip", FALSE, etINT, {&skip},
{ "-mw", FALSE, etBOOL, {&bMW},
"Use mass weighted fitting" }
};
- FILE *out;
- t_trxstatus *status;
- t_topology top;
- int ePBC;
- rvec *x_ref, *x;
- matrix box, R;
- real t;
- int natoms, i;
- char *grpname;
- int gnx;
- gmx_rmpbc_t gpbc = NULL;
- atom_id *index;
- output_env_t oenv;
- real *w_rls;
- const char *leg[] = { "xx", "xy", "xz", "yx", "yy", "yz", "zx", "zy", "zz" };
+ FILE *out;
+ t_trxstatus *status;
+ t_topology top;
+ int ePBC;
+ rvec *x_ref, *x;
+ matrix box, R;
+ real t;
+ int natoms, i;
+ char *grpname;
+ int gnx;
+ gmx_rmpbc_t gpbc = NULL;
+ atom_id *index;
+ gmx_output_env_t *oenv;
+ real *w_rls;
+ const char *leg[] = { "xx", "xy", "xz", "yx", "yy", "yz", "zx", "zy", "zz" };
#define NLEG asize(leg)
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
t_pbc pbc;
rvec *x;
matrix box;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
if (!parse_common_args(&argc, argv, PCA_CAN_TIME,
NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
t_filenm *fnmdup = NULL;
gmx_radial_distribution_histogram_t *prframecurrent = NULL, *pr = NULL;
gmx_static_structurefactor_t *sqframecurrent = NULL, *sq = NULL;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
#define NFILE asize(fnm)
int gmx_saxs(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] calculates SAXS structure factors for given index",
"groups based on Cromer's method.",
"Both topology and trajectory files are required."
};
- static real start_q = 0.0, end_q = 60.0, energy = 12.0;
- static int ngroups = 1;
+ static real start_q = 0.0, end_q = 60.0, energy = 12.0;
+ static int ngroups = 1;
- t_pargs pa[] = {
+ t_pargs pa[] = {
{ "-ng", FALSE, etINT, {&ngroups},
"Number of groups to compute SAXS" },
{"-startq", FALSE, etREAL, {&start_q},
"Energy of the incoming X-ray (keV) "}
};
#define NPA asize(pa)
- const char *fnTPS, *fnTRX, *fnNDX, *fnDAT = NULL;
- output_env_t oenv;
+ const char *fnTPS, *fnTRX, *fnNDX, *fnDAT = NULL;
+ gmx_output_env_t *oenv;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
}
}
-static void ehisto(const char *fh, int n, real **enerT, const output_env_t oenv)
+static void ehisto(const char *fh, int n, real **enerT, const gmx_output_env_t *oenv)
{
FILE *fp;
int i, j, k, nbin, blength;
};
#define NPA asize(pa)
- int n, e_n, nset, e_nset = 0, i, *idim, *ibox;
- real **val, **et_val, *t, *e_t, e_dt, dt;
- real *rmin, *rmax;
- const char *fn_ge, *fn_ene;
- output_env_t oenv;
- gmx_int64_t num_grid_points;
+ int n, e_n, nset, e_nset = 0, i, *idim, *ibox;
+ real **val, **et_val, *t, *e_t, e_dt, dt;
+ real *rmin, *rmax;
+ const char *fn_ge, *fn_ene;
+ gmx_output_env_t *oenv;
+ gmx_int64_t num_grid_points;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efXVG, "-f", "graph", ffREAD },
{ efXVG, "-ge", "gibbs", ffOPTRD },
{ efXVG, "-ene", "esham", ffOPTRD },
int gmx_sigeps(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] is a simple utility that converts C6/C12 or C6/Cn combinations",
"to [GRK]sigma[grk] and [GRK]epsilon[grk], or vice versa. It can also plot the potential",
"in file. In addition, it makes an approximation of a Buckingham potential",
"to a Lennard-Jones potential."
};
- static real c6 = 1.0e-3, cn = 1.0e-6, qi = 0, qj = 0, sig = 0.3, eps = 1, sigfac = 0.7;
- static real Abh = 1e5, Bbh = 32, Cbh = 1e-3;
- static int npow = 12;
- t_pargs pa[] = {
+ static real c6 = 1.0e-3, cn = 1.0e-6, qi = 0, qj = 0, sig = 0.3, eps = 1, sigfac = 0.7;
+ static real Abh = 1e5, Bbh = 32, Cbh = 1e-3;
+ static int npow = 12;
+ t_pargs pa[] = {
{ "-c6", FALSE, etREAL, {&c6}, "C6" },
{ "-cn", FALSE, etREAL, {&cn}, "Constant for repulsion" },
{ "-pow", FALSE, etINT, {&npow}, "Power of the repulsion term" },
{ "-qj", FALSE, etREAL, {&qj}, "qj" },
{ "-sigfac", FALSE, etREAL, {&sigfac}, "Factor in front of [GRK]sigma[grk] for starting the plot" }
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efXVG, "-o", "potje", ffWRITE }
};
- output_env_t oenv;
+ gmx_output_env_t *oenv;
#define NFILE asize(fnm)
- const char *legend[] = { "Lennard-Jones", "Buckingham" };
- FILE *fp;
- int i;
- gmx_bool bBham;
- real qq, x, oldx, minimum, mval, dp[2];
- int cur = 0;
+ const char *legend[] = { "Lennard-Jones", "Buckingham" };
+ FILE *fp;
+ int i;
+ gmx_bool bBham;
+ real qq, x, oldx, minimum, mval, dp[2];
+ int cur = 0;
#define next (1-cur)
if (!parse_common_args(&argc, argv, PCA_CAN_VIEW,
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
int gmx_sorient(int argc, char *argv[])
{
- t_topology top;
- int ePBC = -1;
- t_trxstatus *status;
- int natoms;
- real t;
- rvec *xtop, *x;
- matrix box;
-
- FILE *fp;
- int i, p, sa0, sa1, sa2, n, ntot, nf, m, *hist1, *hist2, *histn, nbin1, nbin2, nrbin;
- real *histi1, *histi2, invbw, invrbw;
- double sum1, sum2;
- int *isize, nrefgrp, nrefat;
- atom_id **index;
- char **grpname;
- real inp, outp, nav, normfac, rmin2, rmax2, rcut, rcut2, r2, r;
- real c1, c2;
- char str[STRLEN];
- gmx_bool bTPS;
- rvec xref, dx, dxh1, dxh2, outer;
- gmx_rmpbc_t gpbc = NULL;
- t_pbc pbc;
- const char *legr[] = {
+ t_topology top;
+ int ePBC = -1;
+ t_trxstatus *status;
+ int natoms;
+ real t;
+ rvec *xtop, *x;
+ matrix box;
+
+ FILE *fp;
+ int i, p, sa0, sa1, sa2, n, ntot, nf, m, *hist1, *hist2, *histn, nbin1, nbin2, nrbin;
+ real *histi1, *histi2, invbw, invrbw;
+ double sum1, sum2;
+ int *isize, nrefgrp, nrefat;
+ atom_id **index;
+ char **grpname;
+ real inp, outp, nav, normfac, rmin2, rmax2, rcut, rcut2, r2, r;
+ real c1, c2;
+ char str[STRLEN];
+ gmx_bool bTPS;
+ rvec xref, dx, dxh1, dxh2, outer;
+ gmx_rmpbc_t gpbc = NULL;
+ t_pbc pbc;
+ const char *legr[] = {
"<cos(\\8q\\4\\s1\\N)>",
"<3cos\\S2\\N(\\8q\\4\\s2\\N)-1>"
};
- const char *legc[] = {
+ const char *legc[] = {
"cos(\\8q\\4\\s1\\N)",
"3cos\\S2\\N(\\8q\\4\\s2\\N)-1"
};
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] analyzes solvent orientation around solutes.",
"It calculates two angles between the vector from one or more",
"reference positions to the first atom of each solvent molecule:",
"[TT]-rc[tt]: the distribution of the solvent molecules as a function of r"
};
- output_env_t oenv;
- static gmx_bool bCom = FALSE, bVec23 = FALSE, bPBC = FALSE;
- static real rmin = 0.0, rmax = 0.5, binwidth = 0.02, rbinw = 0.02;
- t_pargs pa[] = {
+ gmx_output_env_t *oenv;
+ static gmx_bool bCom = FALSE, bVec23 = FALSE, bPBC = FALSE;
+ static real rmin = 0.0, rmax = 0.5, binwidth = 0.02, rbinw = 0.02;
+ t_pargs pa[] = {
{ "-com", FALSE, etBOOL, {&bCom},
"Use the center of mass as the reference postion" },
{ "-v23", FALSE, etBOOL, {&bVec23},
{ "-pbc", FALSE, etBOOL, {&bPBC}, "Check PBC for the center of mass calculation. Only necessary when your reference group consists of several molecules." }
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, NULL, NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
int gmx_spatial(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] calculates the spatial distribution function and",
"outputs it in a form that can be read by VMD as Gaussian98 cube format.",
"For a system of 32,000 atoms and a 50 ns trajectory, the SDF can be generated",
"memory is allocated for cube bins based on the initial coordinates and the [TT]-nab[tt]",
"option value."
};
- const char *bugs[] = {
+ const char *bugs[] = {
"When the allocated memory is not large enough, a segmentation fault may occur. This is usually detected "
"and the program is halted prior to the fault while displaying a warning message suggesting the use of the [TT]-nab[tt] (Number of Additional Bins) "
"option. However, the program does not detect all such events. If you encounter a segmentation fault, run it again "
"with an increased [TT]-nab[tt] value."
};
- static gmx_bool bPBC = FALSE;
- static int iIGNOREOUTER = -1; /*Positive values may help if the surface is spikey */
- static gmx_bool bCUTDOWN = TRUE;
- static real rBINWIDTH = 0.05; /* nm */
- static gmx_bool bCALCDIV = TRUE;
- static int iNAB = 4;
+ static gmx_bool bPBC = FALSE;
+ static int iIGNOREOUTER = -1; /*Positive values may help if the surface is spikey */
+ static gmx_bool bCUTDOWN = TRUE;
+ static real rBINWIDTH = 0.05; /* nm */
+ static gmx_bool bCALCDIV = TRUE;
+ static int iNAB = 4;
- t_pargs pa[] = {
+ t_pargs pa[] = {
{ "-pbc", FALSE, etBOOL, {&bPBC},
"Use periodic boundary conditions for computing distances" },
{ "-div", FALSE, etBOOL, {&bCALCDIV},
"Number of additional bins to ensure proper memory allocation" }
};
- double MINBIN[3];
- double MAXBIN[3];
- t_topology top;
- int ePBC;
- t_trxframe fr;
- rvec *xtop;
- matrix box, box_pbc;
- t_trxstatus *status;
- int flags = TRX_READ_X;
- t_pbc pbc;
- t_atoms *atoms;
- int natoms;
- char *grpnm, *grpnmp;
- atom_id *index, *indexp;
- int i, nidx, nidxp;
- int v;
- int j, k;
- int ***bin = NULL;
- int nbin[3];
- FILE *flp;
- int x, y, z, minx, miny, minz, maxx, maxy, maxz;
- int numfr, numcu;
- int tot, maxval, minval;
- double norm;
- output_env_t oenv;
- gmx_rmpbc_t gpbc = NULL;
+ double MINBIN[3];
+ double MAXBIN[3];
+ t_topology top;
+ int ePBC;
+ t_trxframe fr;
+ rvec *xtop;
+ matrix box, box_pbc;
+ t_trxstatus *status;
+ int flags = TRX_READ_X;
+ t_pbc pbc;
+ t_atoms *atoms;
+ int natoms;
+ char *grpnm, *grpnmp;
+ atom_id *index, *indexp;
+ int i, nidx, nidxp;
+ int v;
+ int j, k;
+ int ***bin = NULL;
+ int nbin[3];
+ FILE *flp;
+ int x, y, z, minx, miny, minz, maxx, maxy, maxz;
+ int numfr, numcu;
+ int tot, maxval, minval;
+ double norm;
+ gmx_output_env_t *oenv;
+ gmx_rmpbc_t gpbc = NULL;
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTPS, NULL, NULL, ffREAD }, /* this is for the topology */
{ efTRX, "-f", NULL, ffREAD }, /* and this for the trajectory */
{ efNDX, NULL, NULL, ffOPTRD }
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
gmx_rmpbc_t gpbc = NULL;
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] analyzes dipoles around a solute; it is especially useful",
"for polarizable water. A group of reference atoms, or a center",
"of mass reference (option [TT]-com[tt]) and a group of solvent",
"to the midpoint between the second and the third atom."
};
- output_env_t oenv;
- static gmx_bool bCom = FALSE;
- static int srefat = 1;
- static real rmin = 0.0, rmax = 0.32, refdip = 0, bw = 0.01;
- t_pargs pa[] = {
+ gmx_output_env_t *oenv;
+ static gmx_bool bCom = FALSE;
+ static int srefat = 1;
+ static real rmin = 0.0, rmax = 0.32, refdip = 0, bw = 0.01;
+ t_pargs pa[] = {
{ "-com", FALSE, etBOOL, {&bCom},
"Use the center of mass as the reference postion" },
{ "-refat", FALSE, etINT, {&srefat},
{ "-bw", FALSE, etREAL, {&bw}, "The bin width" }
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, NULL, NULL, ffREAD },
{ efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
real rho, real wt, const char *fn_trans,
const char *fn_tca, const char *fn_tc,
const char *fn_tcf, const char *fn_cub,
- const char *fn_vk, const output_env_t oenv)
+ const char *fn_vk, const gmx_output_env_t *oenv)
{
FILE *fp, *fp_vk, *fp_cub = NULL;
int nk, ntc;
int gmx_tcaf(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] computes tranverse current autocorrelations.",
"These are used to estimate the shear viscosity, [GRK]eta[grk].",
"For details see: Palmer, Phys. Rev. E 49 (1994) pp 359-366.[PAR]",
"is very important for obtaining a good fit."
};
- static gmx_bool bMol = FALSE, bK34 = FALSE;
- static real wt = 5;
- t_pargs pa[] = {
+ static gmx_bool bMol = FALSE, bK34 = FALSE;
+ static real wt = 5;
+ t_pargs pa[] = {
{ "-mol", FALSE, etBOOL, {&bMol},
"Calculate TCAF of molecules" },
{ "-k34", FALSE, etBOOL, {&bK34},
"Exponential decay time for the TCAF fit weights" }
};
- t_topology top;
- int ePBC;
- t_trxframe fr;
- matrix box;
- gmx_bool bTop;
- int gnx;
- atom_id *index, *atndx = NULL, at;
- char *grpname;
- char title[256];
- real t0, t1, dt, m, mtot, sysmass, rho, sx, cx;
- t_trxstatus *status;
- int nframes, n_alloc, i, j, k, d;
- rvec mv_mol, cm_mol, kfac[NK];
- int nkc, nk, ntc;
- real **tc;
- output_env_t oenv;
+ t_topology top;
+ int ePBC;
+ t_trxframe fr;
+ matrix box;
+ gmx_bool bTop;
+ int gnx;
+ atom_id *index, *atndx = NULL, at;
+ char *grpname;
+ char title[256];
+ real t0, t1, dt, m, mtot, sysmass, rho, sx, cx;
+ t_trxstatus *status;
+ int nframes, n_alloc, i, j, k, d;
+ rvec mv_mol, cm_mol, kfac[NK];
+ int nkc, nk, ntc;
+ real **tc;
+ gmx_output_env_t *oenv;
#define NHISTO 360
static void make_legend(FILE *fp, int ngrps, int isize, atom_id index[],
char **name, gmx_bool bCom, gmx_bool bMol, gmx_bool bDim[],
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
char **leg;
const char *dimtxt[] = { " X", " Y", " Z", "" };
int isize, atom_id *index, int nfr_x, rvec *x,
int nfr_v, rvec *sum,
gmx_bool bDim[], real scale_factor,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
real max, len2, scale;
}
static void print_histo(const char *fn, int nhisto, int histo[], real binwidth,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
FILE *fp;
int i;
int gmx_traj(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] plots coordinates, velocities, forces and/or the box.",
"With [TT]-com[tt] the coordinates, velocities and forces are",
"calculated for the center of mass of each group.",
"norm of the vector is plotted. In addition in the same graph",
"the kinetic energy distribution is given."
};
- static gmx_bool bMol = FALSE, bCom = FALSE, bPBC = TRUE, bNoJump = FALSE;
- static gmx_bool bX = TRUE, bY = TRUE, bZ = TRUE, bNorm = FALSE, bFP = FALSE;
- static int ngroups = 1;
- static real ctime = -1, scale = 0, binwidth = 1;
- t_pargs pa[] = {
+ static gmx_bool bMol = FALSE, bCom = FALSE, bPBC = TRUE, bNoJump = FALSE;
+ static gmx_bool bX = TRUE, bY = TRUE, bZ = TRUE, bNorm = FALSE, bFP = FALSE;
+ static int ngroups = 1;
+ static real ctime = -1, scale = 0, binwidth = 1;
+ t_pargs pa[] = {
{ "-com", FALSE, etBOOL, {&bCom},
"Plot data for the com of each group" },
{ "-pbc", FALSE, etBOOL, {&bPBC},
{ "-scale", FALSE, etREAL, {&scale},
"Scale factor for [REF].pdb[ref] output, 0 is autoscale" }
};
- FILE *outx = NULL, *outv = NULL, *outf = NULL, *outb = NULL, *outt = NULL;
- FILE *outekt = NULL, *outekr = NULL;
- t_topology top;
- int ePBC;
- real *mass, time;
- const char *indexfn;
- t_trxframe fr, frout;
- int flags, nvhisto = 0, *vhisto = NULL;
- rvec *xtop, *xp = NULL;
- rvec *sumx = NULL, *sumv = NULL, *sumf = NULL;
- matrix topbox;
- t_trxstatus *status;
- t_trxstatus *status_out = NULL;
- gmx_rmpbc_t gpbc = NULL;
- int i, j;
- int nr_xfr, nr_vfr, nr_ffr;
- char **grpname;
- int *isize0, *isize;
- atom_id **index0, **index;
- atom_id *atndx;
- t_block *mols;
- gmx_bool bTop, bOX, bOXT, bOV, bOF, bOB, bOT, bEKT, bEKR, bCV, bCF;
- gmx_bool bDim[4], bDum[4], bVD;
- char sffmt[STRLEN], sffmt6[STRLEN];
- const char *box_leg[6] = { "XX", "YY", "ZZ", "YX", "ZX", "ZY" };
- output_env_t oenv;
-
- t_filenm fnm[] = {
+ FILE *outx = NULL, *outv = NULL, *outf = NULL, *outb = NULL, *outt = NULL;
+ FILE *outekt = NULL, *outekr = NULL;
+ t_topology top;
+ int ePBC;
+ real *mass, time;
+ const char *indexfn;
+ t_trxframe fr, frout;
+ int flags, nvhisto = 0, *vhisto = NULL;
+ rvec *xtop, *xp = NULL;
+ rvec *sumx = NULL, *sumv = NULL, *sumf = NULL;
+ matrix topbox;
+ t_trxstatus *status;
+ t_trxstatus *status_out = NULL;
+ gmx_rmpbc_t gpbc = NULL;
+ int i, j;
+ int nr_xfr, nr_vfr, nr_ffr;
+ char **grpname;
+ int *isize0, *isize;
+ atom_id **index0, **index;
+ atom_id *atndx;
+ t_block *mols;
+ gmx_bool bTop, bOX, bOXT, bOV, bOF, bOB, bOT, bEKT, bEKR, bCV, bCF;
+ gmx_bool bDim[4], bDum[4], bVD;
+ char sffmt[STRLEN], sffmt6[STRLEN];
+ const char *box_leg[6] = { "XX", "YY", "ZZ", "YX", "ZX", "ZY" };
+ gmx_output_env_t *oenv;
+
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
static void scan_trj_files(char **fnms, int nfiles, real *readtime,
real *timestep, atom_id imax,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
/* Check start time of all files */
int i, natoms = 0;
static void edit_files(char **fnms, int nfiles, real *readtime, real *timestep,
real *settime, int *cont_type, gmx_bool bSetTime,
- gmx_bool bSort, const output_env_t oenv)
+ gmx_bool bSort, const gmx_output_env_t *oenv)
{
int i;
gmx_bool ok;
static void do_demux(int nset, char *fnms[], char *fnms_out[], int nval,
real **value, real *time, real dt_remd, int isize,
- atom_id index[], real dt, const output_env_t oenv)
+ atom_id index[], real dt, const gmx_output_env_t *oenv)
{
int i, j, k, natoms, nnn;
t_trxstatus **fp_in, **fp_out;
{ &bCat }, "Do not discard double time frames" }
};
#define npargs asize(pa)
- int ftpin, i, frame, frame_out;
- t_trxstatus *status, *trxout = NULL;
- real t_corr;
- t_trxframe fr, frout;
- char **fnms, **fnms_out, *out_file;
- int n_append;
- gmx_bool bNewFile, bIndex, bWrite;
- int nfile_in, nfile_out, *cont_type;
- real *readtime, *timest, *settime;
- real first_time = 0, lasttime = NOTSET, last_ok_t = -1, timestep;
- real last_frame_time, searchtime;
- int isize = 0, j;
- atom_id *index = NULL, imax;
- char *grpname;
- real **val = NULL, *t = NULL, dt_remd;
- int n, nset, ftpout = -1, prevEndStep = 0, filetype;
- gmx_off_t fpos;
- output_env_t oenv;
- t_filenm fnm[] =
+ int ftpin, i, frame, frame_out;
+ t_trxstatus *status, *trxout = NULL;
+ real t_corr;
+ t_trxframe fr, frout;
+ char **fnms, **fnms_out, *out_file;
+ int n_append;
+ gmx_bool bNewFile, bIndex, bWrite;
+ int nfile_in, nfile_out, *cont_type;
+ real *readtime, *timest, *settime;
+ real first_time = 0, lasttime = NOTSET, last_ok_t = -1, timestep;
+ real last_frame_time, searchtime;
+ int isize = 0, j;
+ atom_id *index = NULL, imax;
+ char *grpname;
+ real **val = NULL, *t = NULL, dt_remd;
+ int n, nset, ftpout = -1, prevEndStep = 0, filetype;
+ gmx_off_t fpos;
+ gmx_output_env_t *oenv;
+ t_filenm fnm[] =
{
{ efTRX, "-f", NULL, ffRDMULT },
{ efTRO, "-o", NULL, ffWRMULT },
char *outf_base = NULL;
const char *outf_ext = NULL;
char top_title[256], title[256], filemode[5];
- output_env_t oenv;
+ gmx_output_env_t *oenv;
t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
int gmx_trjorder(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] orders molecules according to the smallest distance",
"to atoms in a reference group",
"or on z-coordinate (with option [TT]-z[tt]).",
"With option [TT]-nshell[tt] the number of molecules within a shell",
"of radius [TT]-r[tt] around the reference group are printed."
};
- static int na = 3, ref_a = 1;
- static real rcut = 0;
- static gmx_bool bCOM = FALSE, bZ = FALSE;
- t_pargs pa[] = {
+ static int na = 3, ref_a = 1;
+ static real rcut = 0;
+ static gmx_bool bCOM = FALSE, bZ = FALSE;
+ t_pargs pa[] = {
{ "-na", FALSE, etINT, {&na},
"Number of atoms in a molecule" },
{ "-da", FALSE, etINT, {&ref_a},
{ "-z", FALSE, etBOOL, {&bZ},
"Order molecules on z-coordinate" }
};
- FILE *fp;
- t_trxstatus *out;
- t_trxstatus *status;
- gmx_bool bNShell, bPDBout;
- t_topology top;
- int ePBC;
- rvec *x, *xsol, xcom, dx;
- matrix box;
- t_pbc pbc;
- gmx_rmpbc_t gpbc;
- real t, totmass, mass, rcut2 = 0, n2;
- int natoms, nwat, ncut;
- char **grpname;
- int i, j, d, *isize, isize_ref = 0, isize_sol;
- atom_id sa, sr, *swi, **index, *ind_ref = NULL, *ind_sol;
- output_env_t oenv;
- t_filenm fnm[] = {
+ FILE *fp;
+ t_trxstatus *out;
+ t_trxstatus *status;
+ gmx_bool bNShell, bPDBout;
+ t_topology top;
+ int ePBC;
+ rvec *x, *xsol, xcom, dx;
+ matrix box;
+ t_pbc pbc;
+ gmx_rmpbc_t gpbc;
+ real t, totmass, mass, rcut2 = 0, n2;
+ int natoms, nwat, ncut;
+ char **grpname;
+ int i, j, d, *isize, isize_ref = 0, isize_sol;
+ atom_id sa, sr, *swi, **index, *ind_ref = NULL, *ind_sol;
+ gmx_output_env_t *oenv;
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPS, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
const char *npmevalues_opt[] =
{ NULL, "auto", "all", "subset", NULL };
- gmx_bool bAppendFiles = TRUE;
- gmx_bool bKeepAndNumCPT = FALSE;
- gmx_bool bResetCountersHalfWay = FALSE;
- gmx_bool bBenchmark = TRUE;
- gmx_bool bCheck = TRUE;
+ gmx_bool bAppendFiles = TRUE;
+ gmx_bool bKeepAndNumCPT = FALSE;
+ gmx_bool bResetCountersHalfWay = FALSE;
+ gmx_bool bBenchmark = TRUE;
+ gmx_bool bCheck = TRUE;
- output_env_t oenv = NULL;
+ gmx_output_env_t *oenv = NULL;
- t_pargs pa[] = {
+ t_pargs pa[] = {
/***********************/
/* g_tune_pme options: */
/***********************/
};
#define NFILE asize(fnm)
- output_env_t oenv;
- const char *matfile, *otfile, *orfile;
- t_topology top;
- int ePBC;
- matrix boxtop, box, *sbox, avbox, corr;
- rvec *xtop, *x, **sx;
- int isize, nalloc, nallocn;
- t_trxstatus *status;
- atom_id *index;
- char *grpname;
- int nfr, f, ff, i, m, mat_nx = 0, nbin = 0, bin, mbin, fbin;
- real *time, t, invbin = 0, rmax2 = 0, rint2 = 0, d2;
- real invsbin = 0, matmax, normfac, dt, *tickx, *ticky;
- char buf[STRLEN], **legend;
- real **mat = NULL;
- int *pt = NULL, **pr = NULL, *mcount = NULL, *tcount = NULL, *rcount = NULL;
- FILE *fp;
- t_rgb rlo = {1, 1, 1}, rhi = {0, 0, 0};
+ gmx_output_env_t *oenv;
+ const char *matfile, *otfile, *orfile;
+ t_topology top;
+ int ePBC;
+ matrix boxtop, box, *sbox, avbox, corr;
+ rvec *xtop, *x, **sx;
+ int isize, nalloc, nallocn;
+ t_trxstatus *status;
+ atom_id *index;
+ char *grpname;
+ int nfr, f, ff, i, m, mat_nx = 0, nbin = 0, bin, mbin, fbin;
+ real *time, t, invbin = 0, rmax2 = 0, rint2 = 0, d2;
+ real invsbin = 0, matmax, normfac, dt, *tickx, *ticky;
+ char buf[STRLEN], **legend;
+ real **mat = NULL;
+ int *pt = NULL, **pr = NULL, *mcount = NULL, *tcount = NULL, *rcount = NULL;
+ FILE *fp;
+ t_rgb rlo = {1, 1, 1}, rhi = {0, 0, 0};
if (!parse_common_args(&argc, argv, PCA_CAN_VIEW | PCA_CAN_TIME,
NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
}
static void calc_spectrum(int n, real c[], real dt, const char *fn,
- output_env_t oenv, gmx_bool bRecip)
+ gmx_output_env_t *oenv, gmx_bool bRecip)
{
FILE *fp;
gmx_fft_t fft;
/* Array for the correlation function */
real **c1;
real *normm = NULL;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
#define NHISTO 360
/*! \brief after wham, set prof to zero at this z-position.
* When bootstrapping, set zProf0 to a "stable" reference position.
*/
- real zProf0;
- gmx_bool bProf0Set; //!< setting profile to 0 at zProf0?
+ real zProf0;
+ gmx_bool bProf0Set; //!< setting profile to 0 at zProf0?
- gmx_bool bBoundsOnly, bHistOnly; //!< determine min and max, or write histograms and exit
- gmx_bool bAuto; //!< determine min and max automatically but do not exit
+ gmx_bool bBoundsOnly, bHistOnly; //!< determine min and max, or write histograms and exit
+ gmx_bool bAuto; //!< determine min and max automatically but do not exit
- gmx_bool verbose; //!< more noisy wham mode
- int stepchange; //!< print maximum change in prof after how many interations
- output_env_t oenv; //!< xvgr options
+ gmx_bool verbose; //!< more noisy wham mode
+ int stepchange; //!< print maximum change in prof after how many interations
+ gmx_output_env_t *oenv; //!< xvgr options
/*!\}*/
/*!
* \name Autocorrelation stuff
int gmx_wheel(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] plots a helical wheel representation of your sequence.",
"The input sequence is in the [REF].dat[ref] file where the first line contains",
"the number of residues and each consecutive line contains a residue "
"name."
};
- output_env_t oenv;
- static real rot0 = 0;
- static gmx_bool bNum = TRUE;
- static char *title = NULL;
- static int r0 = 1;
- t_pargs pa [] = {
+ gmx_output_env_t *oenv;
+ static real rot0 = 0;
+ static gmx_bool bNum = TRUE;
+ static char *title = NULL;
+ static int r0 = 1;
+ t_pargs pa [] = {
{ "-r0", FALSE, etINT, {&r0},
"The first residue number in the sequence" },
{ "-rot0", FALSE, etREAL, {&rot0},
{ "-nn", FALSE, etBOOL, {&bNum},
"Toggle numbers" }
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efDAT, "-f", NULL, ffREAD },
{ efEPS, "-o", NULL, ffWRITE }
};
int gmx_xpm2ps(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] makes a beautiful color plot of an XPixelMap file.",
"Labels and axis can be displayed, when they are supplied",
"in the correct matrix format.",
"the [TT]-xpm[tt] option."
};
- output_env_t oenv;
- const char *fn, *epsfile = NULL, *xpmfile = NULL;
- int i, nmat, nmat2, etitle, elegend, ediag, erainbow, ecombine;
- t_matrix *mat = NULL, *mat2 = NULL;
- gmx_bool bTitle, bTitleOnce, bDiag, bFirstDiag, bGrad;
- static gmx_bool bFrame = TRUE, bZeroLine = FALSE, bYonce = FALSE;
- static real size = 400, boxx = 0, boxy = 0, cmin = 0, cmax = 0;
- static rvec grad = {0, 0, 0};
+ gmx_output_env_t *oenv;
+ const char *fn, *epsfile = NULL, *xpmfile = NULL;
+ int i, nmat, nmat2, etitle, elegend, ediag, erainbow, ecombine;
+ t_matrix *mat = NULL, *mat2 = NULL;
+ gmx_bool bTitle, bTitleOnce, bDiag, bFirstDiag, bGrad;
+ static gmx_bool bFrame = TRUE, bZeroLine = FALSE, bYonce = FALSE;
+ static real size = 400, boxx = 0, boxy = 0, cmin = 0, cmax = 0;
+ static rvec grad = {0, 0, 0};
enum {
etSel, etTop, etOnce, etYlabel, etNone, etNR
};
#define GMX_GMXANA_GSTAT_H
#include "gromacs/commandline/pargs.h"
-#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/types/oenv.h"
#include "gromacs/topology/index.h"
#ifdef __cplusplus
extern "C" {
#endif
+struct gmx_output_env_t;
struct gmx_residuetype_t;
/* must correspond with 'leg' g_chi.c:727 */
void ana_dih_trans(const char *fn_trans, const char *fn_histo,
real **dih, int nframes, int nangles,
const char *grpname, real *time, gmx_bool bRb,
- const output_env_t oenv);
+ const gmx_output_env_t *oenv);
/*
* Analyse dihedral transitions, by counting transitions per dihedral
* and per frame. The total number of transitions is printed to
real **dih, int nlist, t_dlist dlist[],
int nframes, int nangles, const char *grpname,
int multiplicity[], real *time, gmx_bool bRb,
- real core_frac, const output_env_t oenv);
+ real core_frac, const gmx_output_env_t *oenv);
/* as above but passes dlist so can copy occupancies into it, and multiplicity[]
* (1..nangles, corresp to dih[this][], so can have non-3 multiplicity of
* rotamers. Also production of xvg output files is conditional
real **trans_frac,
real **aver_angle,
real *dih[],
- const output_env_t oenv);
+ const gmx_output_env_t *oenv);
/*
* Read a trajectory and calculate angles and dihedrals.
*
real time[], int **lookup, int *multiplicity,
gmx_bool bRb, gmx_bool bNormalize,
real core_frac, gmx_bool bAll, const char *fnall,
- const output_env_t oenv);
+ const gmx_output_env_t *oenv);
-void print_one (const output_env_t oenv, const char *base,
+void print_one (const gmx_output_env_t *oenv, const char *base,
const char *name,
const char *title, const char *ylabel, int nf,
real time[], real data[]);
-t_topology *init_rama(const output_env_t oenv, const char *infile,
+t_topology *init_rama(gmx_output_env_t *oenv, const char *infile,
const char *topfile, t_xrama *xr, int mult)
{
t_topology *top;
#define GMX_GMXANA_NRAMA_H
#include "gromacs/fileio/trxio.h"
-#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/types/oenv.h"
+#include "gromacs/topology/topology.h"
+#include "gromacs/utility/real.h"
+
+struct gmx_output_env_t;
#ifdef __cplusplus
extern "C" {
} t_dih;
typedef struct {
- int ndih;
- t_dih *dih;
- int npp;
- t_phipsi *pp;
- t_trxstatus *traj;
- int natoms;
- int amin, amax;
- real t;
- rvec *x;
- matrix box;
- t_idef *idef;
- int ePBC;
- output_env_t oenv;
+ int ndih;
+ t_dih *dih;
+ int npp;
+ t_phipsi *pp;
+ t_trxstatus *traj;
+ int natoms;
+ int amin, amax;
+ real t;
+ rvec *x;
+ matrix box;
+ t_idef *idef;
+ int ePBC;
+ gmx_output_env_t *oenv;
} t_xrama;
-t_topology *init_rama(const output_env_t oenv, const char *infile,
+t_topology *init_rama(gmx_output_env_t *oenv, const char *infile,
const char *topfile, t_xrama *xr, int mult);
gmx_bool new_data(t_xrama *xr);
const char* fnXVG, const char *fnTRX,
const char* fnDAT,
real start_q, real end_q,
- real energy, int ng, const output_env_t oenv)
+ real energy, int ng, const gmx_output_env_t *oenv)
{
int i, *isize, flags = TRX_READ_X, **index_atp;
t_trxstatus *status;
extern void save_data (structure_factor_t *sft, const char *file, int ngrps,
- real start_q, real end_q, const output_env_t oenv)
+ real start_q, real end_q, const gmx_output_env_t *oenv)
{
FILE *fp;
#ifndef _sfactor_h
#define _sfactor_h
-#include "gromacs/legacyheaders/types/oenv.h"
#include "gromacs/legacyheaders/types/simple.h"
#include "gromacs/math/gmxcomplex.h"
extern "C" {
#endif
+struct gmx_output_env_t;
struct t_topology;
struct t_trxframe;
real lambda, int n_angles);
void save_data (structure_factor_t * sft, const char *file, int ngrps,
- real start_q, real end_q, const output_env_t oenv);
+ real start_q, real end_q, const gmx_output_env_t *oenv);
double CMSF (gmx_structurefactors_t *gsf, int type, int nh, double lambda, double sin_theta);
const char* fnXVG, const char *fnTRX,
const char* fnDAT,
real start_q, real end_q,
- real energy, int ng, const output_env_t oenv);
+ real energy, int ng, const gmx_output_env_t *oenv);
t_complex *** rc_tensor_allocation(int x, int y, int z);
int gmx_genconf(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] multiplies a given coordinate file by simply stacking them",
"on top of each other, like a small child playing with wooden blocks.",
"The program makes a grid of [IT]user-defined[it]",
"build the grid."
};
- const char *bugs[] = {
+ const char *bugs[] = {
"The program should allow for random displacement of lattice points."
};
- int vol;
- t_atoms *atoms; /* list with all atoms */
- rvec *x, *xx, *v; /* coordinates? */
- real t;
- vec4 *xrot, *vrot;
- int ePBC;
- matrix box, boxx; /* box length matrix */
- rvec shift;
- int natoms; /* number of atoms in one molecule */
- int nres; /* number of molecules? */
- int i, j, k, l, m, ndx, nrdx, nx, ny, nz;
- t_trxstatus *status;
- gmx_bool bTRX;
- output_env_t oenv;
- gmx_rng_t rng;
-
- t_filenm fnm[] = {
+ int vol;
+ t_atoms *atoms; /* list with all atoms */
+ rvec *x, *xx, *v; /* coordinates? */
+ real t;
+ vec4 *xrot, *vrot;
+ int ePBC;
+ matrix box, boxx; /* box length matrix */
+ rvec shift;
+ int natoms; /* number of atoms in one molecule */
+ int nres; /* number of molecules? */
+ int i, j, k, l, m, ndx, nrdx, nx, ny, nz;
+ t_trxstatus *status;
+ gmx_bool bTRX;
+ gmx_output_env_t *oenv;
+ gmx_rng_t rng;
+
+ t_filenm fnm[] = {
{ efSTX, "-f", "conf", ffREAD },
{ efSTO, "-o", "out", ffWRITE },
{ efTRX, "-trj", NULL, ffOPTRD }
};
#define NFILE asize(fnm)
- static rvec nrbox = {1, 1, 1};
- static int seed = 0; /* seed for random number generator */
- static int nmolat = 3;
- static int nblock = 1;
- static gmx_bool bShuffle = FALSE;
- static gmx_bool bSort = FALSE;
- static gmx_bool bRandom = FALSE; /* False: no random rotations */
- static gmx_bool bRenum = TRUE; /* renumber residues */
- static rvec dist = {0, 0, 0}; /* space added between molecules ? */
- static rvec max_rot = {180, 180, 180}; /* maximum rotation */
- t_pargs pa[] = {
+ static rvec nrbox = {1, 1, 1};
+ static int seed = 0; /* seed for random number generator */
+ static int nmolat = 3;
+ static int nblock = 1;
+ static gmx_bool bShuffle = FALSE;
+ static gmx_bool bSort = FALSE;
+ static gmx_bool bRandom = FALSE; /* False: no random rotations */
+ static gmx_bool bRenum = TRUE; /* renumber residues */
+ static rvec dist = {0, 0, 0}; /* space added between molecules ? */
+ static rvec max_rot = {180, 180, 180}; /* maximum rotation */
+ t_pargs pa[] = {
{ "-nbox", FALSE, etRVEC, {nrbox}, "Number of boxes" },
{ "-dist", FALSE, etRVEC, {dist}, "Distance between boxes" },
{ "-seed", FALSE, etINT, {&seed},
gmx_bool bNeedVel, gmx_bool bGenVel, real fr_time,
t_inputrec *ir, t_state *state,
gmx_mtop_t *sys,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
/* If fr_time == -1 read the last frame available which is complete */
{
gmx_bool bReadVel;
int ntype;
gmx_bool bNeedVel, bGenVel;
gmx_bool have_atomnumber;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
gmx_bool bVerbose = FALSE;
warninp_t wi;
char warn_buf[STRLEN];
real mHmult = 0;
t_hackblock *hb_chain;
t_restp *restp_chain;
- output_env_t oenv;
+ gmx_output_env_t *oenv;
const char *p_restype;
int rc;
int this_atomnum;
#include "gromacs/gmxpreprocess/grompp-impl.h"
#include "gromacs/legacyheaders/typedefs.h"
+struct gmx_output_env_t;
struct pull_params_t;
struct t_adress;
struct t_grpopts;
/* Process the pull coordinates after reading the pull groups */
void set_pull_init(t_inputrec *ir, gmx_mtop_t *mtop, rvec *x, matrix box, real lambda,
- const output_env_t oenv);
+ const gmx_output_env_t *oenv);
/* Prints the initial pull group distances in x.
* If requested, adds the current distance to the initial reference location.
*/
}
void set_pull_init(t_inputrec *ir, gmx_mtop_t *mtop, rvec *x, matrix box, real lambda,
- const output_env_t oenv)
+ const gmx_output_env_t *oenv)
{
pull_params_t *pull;
struct pull_t *pull_work;
};
#define NFILE asize(fnm)
- static real defaultDistance = 0.105, r_shell = 0, scaleFactor = 0.57;
- static rvec new_box = {0.0, 0.0, 0.0};
- static gmx_bool bReadV = FALSE;
- static int max_sol = 0;
- output_env_t oenv;
- t_pargs pa[] = {
+ static real defaultDistance = 0.105, r_shell = 0, scaleFactor = 0.57;
+ static rvec new_box = {0.0, 0.0, 0.0};
+ static gmx_bool bReadV = FALSE;
+ static int max_sol = 0;
+ gmx_output_env_t *oenv;
+ t_pargs pa[] = {
{ "-box", FALSE, etRVEC, {new_box},
"Box size (in nm)" },
{ "-radius", FALSE, etREAL, {&defaultDistance},
t_symtab symtab;
real qtot, mtot;
char n2t[STRLEN];
- output_env_t oenv;
+ gmx_output_env_t *oenv;
t_filenm fnm[] = {
{ efSTX, "-f", "conf", ffREAD },
*
* Call on master only.
*/
-static FILE *open_imd_out(
- const char *fn,
- t_gmx_IMD_setup *IMDsetup,
- int nat_total,
- output_env_t oenv,
- unsigned long Flags)
+static FILE *open_imd_out(const char *fn,
+ t_gmx_IMD_setup *IMDsetup,
+ int nat_total,
+ const gmx_output_env_t *oenv,
+ unsigned long Flags)
{
FILE *fp;
}
}
-void init_IMD(t_inputrec *ir,
- t_commrec *cr,
- gmx_mtop_t *top_global,
- FILE *fplog,
- int defnstimd,
- rvec x[],
- int nfile,
- const t_filenm fnm[],
- output_env_t oenv,
- int imdport,
- unsigned long Flags)
+void init_IMD(t_inputrec *ir,
+ t_commrec *cr,
+ gmx_mtop_t *top_global,
+ FILE *fplog,
+ int defnstimd,
+ rvec x[],
+ int nfile,
+ const t_filenm fnm[],
+ const gmx_output_env_t *oenv,
+ int imdport,
+ unsigned long Flags)
{
int i;
int nat_total;
struct gmx_domdec_t;
struct gmx_enerdata_t;
struct gmx_mtop_t;
+struct gmx_output_env_t;
struct t_gmx_IMD;
struct t_IMD;
*/
void init_IMD(t_inputrec *ir, t_commrec *cr, gmx_mtop_t *top_global,
FILE *fplog, int defnstimd, rvec x[],
- int nfile, const t_filenm fnm[], output_env_t oenv,
+ int nfile, const t_filenm fnm[], const gmx_output_env_t *oenv,
int imdport, unsigned long Flags);
/* DEPRECATED! value for signaling unitialized variables */
#define NOTSET -12345
-#include "gromacs/legacyheaders/types/oenv.h"
#include "gromacs/legacyheaders/types/simple.h"
#include "gromacs/legacyheaders/types/state.h"
#include "gromacs/topology/topology.h"
+++ /dev/null
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2013,2015, by the GROMACS development team, led by
- * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
- * and including many others, as listed in the AUTHORS file in the
- * top-level source directory and at http://www.gromacs.org.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-#ifndef GMX_TYPES_OENV_H
-#define GMX_TYPES_OENV_H
-
-/* output options opaque type, for functions in oenv.h */
-typedef struct gmx_output_env_t *output_env_t;
-
-#endif
#include "gromacs/legacyheaders/types/inputrec.h"
#include "gromacs/legacyheaders/types/mdatom.h"
#include "gromacs/legacyheaders/types/nrnb.h"
-#include "gromacs/legacyheaders/types/oenv.h"
#include "gromacs/legacyheaders/types/state.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/timing/wallcycle.h"
struct t_commrec;
struct gmx_mtop_t;
struct gmx_membed_t;
+struct gmx_output_env_t;
namespace gmx
{
*/
typedef double integrator_t (FILE *fplog, struct t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout,
/*! \brief Do conjugate gradients minimization
\copydoc integrator_t(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout,
*/
double do_cg(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ const gmx_output_env_t gmx_unused *oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int gmx_unused stepout,
/*! \brief Do L-BFGS conjugate gradients minimization
\copydoc integrator_t(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout,
*/
double do_lbfgs(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ const gmx_output_env_t gmx_unused *oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int gmx_unused stepout,
/*! \brief Do steepest descents minimization
\copydoc integrator_t(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout,
*/
double do_steep(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ const gmx_output_env_t gmx_unused *oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int gmx_unused stepout,
/*! \brief Do normal modes analysis
\copydoc integrator_t(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout,
*/
double do_nm(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ const gmx_output_env_t gmx_unused *oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int gmx_unused stepout,
void init_md(FILE *fplog,
- t_commrec *cr, t_inputrec *ir, const output_env_t oenv,
+ t_commrec *cr, t_inputrec *ir, const gmx_output_env_t *oenv,
double *t, double *t0,
real *lambda, int *fep_state, double *lam0,
t_nrnb *nrnb, gmx_mtop_t *mtop,
#include "gromacs/timing/walltime_accounting.h"
struct gmx_constr;
+struct gmx_output_env_t;
struct nonbonded_verlet_t;
struct t_graph;
struct t_mdatoms;
t_forcerec *fr, gmx_localtop_t *top);
void init_md(FILE *fplog,
- t_commrec *cr, t_inputrec *ir, const output_env_t oenv,
+ t_commrec *cr, t_inputrec *ir, const gmx_output_env_t *oenv,
double *t, double *t0,
real *lambda, int *fep_state, double *lam0,
t_nrnb *nrnb, gmx_mtop_t *mtop,
/*! \brief Do test particle insertion.
\copydoc integrator_t (FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout,
*/
double do_tpi(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
int gmx_unused nstglobalcomm,
gmx_vsite_t gmx_unused *vsite, gmx_constr_t gmx_unused constr,
int gmx_unused stepout,
}
}
-static FILE *open_pull_out(const char *fn, struct pull_t *pull, const output_env_t oenv,
+static FILE *open_pull_out(const char *fn, struct pull_t *pull,
+ const gmx_output_env_t *oenv,
gmx_bool bCoord, unsigned long Flags)
{
FILE *fp;
struct pull_t *
init_pull(FILE *fplog, const pull_params_t *pull_params, const t_inputrec *ir,
int nfile, const t_filenm fnm[],
- gmx_mtop_t *mtop, t_commrec *cr, const output_env_t oenv, real lambda,
+ gmx_mtop_t *mtop, t_commrec *cr,
+ const gmx_output_env_t *oenv, real lambda,
gmx_bool bOutFile, unsigned long Flags)
{
struct pull_t *pull;
extern "C" {
#endif
+struct gmx_output_env_t;
struct pull_params_t;
struct t_mdatoms;
struct t_pbc;
* \param Flags Flags passed over from main, used to determine
* whether or not we are appending.
*/
-struct pull_t *init_pull(FILE *fplog,
- const pull_params_t *pull_params,
- const t_inputrec *ir,
- int nfile,
- const t_filenm fnm[],
- gmx_mtop_t *mtop,
- t_commrec * cr,
- const output_env_t oenv,
- real lambda,
- gmx_bool bOutFile,
- unsigned long Flags);
+struct pull_t *init_pull(FILE *fplog,
+ const pull_params_t *pull_params,
+ const t_inputrec *ir,
+ int nfile,
+ const t_filenm fnm[],
+ gmx_mtop_t *mtop,
+ t_commrec * cr,
+ const gmx_output_env_t *oenv,
+ real lambda,
+ gmx_bool bOutFile,
+ unsigned long Flags);
/*! \brief Close the pull output files.
/* Open output file and print some general information about the rotation groups.
* Call on master only */
-static FILE *open_rot_out(const char *fn, t_rot *rot, const output_env_t oenv)
+static FILE *open_rot_out(const char *fn, t_rot *rot, const gmx_output_env_t *oenv)
{
FILE *fp;
int g, nsets;
extern void init_rot(FILE *fplog, t_inputrec *ir, int nfile, const t_filenm fnm[],
- t_commrec *cr, rvec *x, matrix box, gmx_mtop_t *mtop, const output_env_t oenv,
+ t_commrec *cr, rvec *x, matrix box, gmx_mtop_t *mtop, const gmx_output_env_t *oenv,
gmx_bool bVerbose, unsigned long Flags)
{
t_rot *rot;
#include "gromacs/timing/wallcycle.h"
struct gmx_domdec_t;
+struct gmx_output_env_t;
struct t_commrec;
struct t_rot;
* whether or not we are doing a rerun.
*/
extern void init_rot(FILE *fplog, t_inputrec *ir, int nfile, const t_filenm fnm[],
- struct t_commrec *cr, rvec *x, matrix box, gmx_mtop_t *mtop, const output_env_t oenv,
+ struct t_commrec *cr, rvec *x, matrix box, gmx_mtop_t *mtop, const gmx_output_env_t *oenv,
gmx_bool bVerbose, unsigned long Flags);
*
* Also print the initial ion counts
*/
-static void print_ionlist_legend(t_inputrec *ir, const output_env_t oenv)
+static void print_ionlist_legend(t_inputrec *ir,
+ const gmx_output_env_t *oenv)
{
const char **legend;
int ic, count, ii;
}
-extern void init_swapcoords(
- FILE *fplog,
- gmx_bool bVerbose,
- t_inputrec *ir,
- const char *fn,
- gmx_mtop_t *mtop,
- rvec x[],
- matrix box,
- swapstate_t *swapstate,
- t_commrec *cr,
- const output_env_t oenv,
- unsigned long Flags)
+void init_swapcoords(FILE *fplog,
+ gmx_bool bVerbose,
+ t_inputrec *ir,
+ const char *fn,
+ gmx_mtop_t *mtop,
+ rvec x[],
+ matrix box,
+ swapstate_t *swapstate,
+ t_commrec *cr,
+ const gmx_output_env_t *oenv,
+ unsigned long Flags)
{
int i, ic, ig, ii, j;
t_swapcoords *sc;
}
-extern void dd_make_local_swap_groups(gmx_domdec_t *dd, t_swapcoords *sc)
+void dd_make_local_swap_groups(gmx_domdec_t *dd, t_swapcoords *sc)
{
t_group *g;
int ig;
}
-extern gmx_bool do_swapcoords(
- t_commrec *cr,
- gmx_int64_t step,
- double t,
- t_inputrec *ir,
- gmx_wallcycle_t wcycle,
- rvec x[],
- matrix box,
- gmx_mtop_t *mtop,
- gmx_bool bVerbose,
- gmx_bool bRerun)
+gmx_bool do_swapcoords(t_commrec *cr,
+ gmx_int64_t step,
+ double t,
+ t_inputrec *ir,
+ gmx_wallcycle_t wcycle,
+ rvec x[],
+ matrix box,
+ gmx_mtop_t *mtop,
+ gmx_bool bVerbose,
+ gmx_bool bRerun)
{
t_swapcoords *sc;
t_swap *s;
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/timing/wallcycle.h"
+struct gmx_output_env_t;
struct t_swapcoords;
/*! \brief Initialize ion / water position swapping ("Computational Electrophysiology").
* whether we are doing a rerun, appending, etc.
*/
void init_swapcoords(
- FILE *fplog,
- gmx_bool bVerbose,
- t_inputrec *ir,
- const char *fn,
- gmx_mtop_t *mtop,
- rvec x[],
- matrix box,
- swapstate_t *swapstate,
- t_commrec *cr,
- const output_env_t oenv,
- unsigned long Flags);
+ FILE *fplog,
+ gmx_bool bVerbose,
+ t_inputrec *ir,
+ const char *fn,
+ gmx_mtop_t *mtop,
+ rvec x[],
+ matrix box,
+ swapstate_t *swapstate,
+ t_commrec *cr,
+ const gmx_output_env_t *oenv,
+ unsigned long Flags);
/*! \brief Make a selection of the home atoms for the swap groups. These are
}
}
-void chk_trj(const output_env_t oenv, const char *fn, const char *tpr, real tol)
+void chk_trj(const gmx_output_env_t *oenv, const char *fn, const char *tpr, real tol)
{
t_trxframe fr;
t_count count;
int gmx_check(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] reads a trajectory ([REF].tng[ref], [REF].trr[ref] or ",
"[REF].xtc[ref]), an energy file ([REF].edr[ref])",
"or an index file ([REF].ndx[ref])",
"In case the [TT]-m[tt] flag is given a LaTeX file will be written",
"consisting of a rough outline for a methods section for a paper."
};
- t_filenm fnm[] = {
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffOPTRD },
{ efTRX, "-f2", NULL, ffOPTRD },
{ efTPR, "-s1", "top1", ffOPTRD },
{ efTEX, "-m", NULL, ffOPTWR }
};
#define NFILE asize(fnm)
- const char *fn1 = NULL, *fn2 = NULL, *tex = NULL;
-
- output_env_t oenv;
- static real vdw_fac = 0.8;
- static real bon_lo = 0.4;
- static real bon_hi = 0.7;
- static gmx_bool bRMSD = FALSE;
- static real ftol = 0.001;
- static real abstol = 0.001;
- static gmx_bool bCompAB = FALSE;
- static char *lastener = NULL;
- static t_pargs pa[] = {
+ const char *fn1 = NULL, *fn2 = NULL, *tex = NULL;
+
+ gmx_output_env_t *oenv;
+ static real vdw_fac = 0.8;
+ static real bon_lo = 0.4;
+ static real bon_hi = 0.7;
+ static gmx_bool bRMSD = FALSE;
+ static real ftol = 0.001;
+ static real abstol = 0.001;
+ static gmx_bool bCompAB = FALSE;
+ static char *lastener = NULL;
+ static t_pargs pa[] = {
{ "-vdwfac", FALSE, etREAL, {&vdw_fac},
"Fraction of sum of VdW radii used as warning cutoff" },
{ "-bonlo", FALSE, etREAL, {&bon_lo},
}
}
-void comp_trx(const output_env_t oenv, const char *fn1, const char *fn2,
+void comp_trx(const gmx_output_env_t *oenv, const char *fn1, const char *fn2,
gmx_bool bRMSD, real ftol, real abstol)
{
int i;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#ifndef GMX_TOOLS_COMPARE_H
#define GMX_TOOLS_COMPARE_H
+struct gmx_output_env_t;
+
/* Routines for comparing data structures from non-trajectory binary
file formats (e.g. as used by gmx check). */
/* Compare two binary run input files */
void
-comp_trx(const output_env_t oenv, const char *fn1, const char *fn2,
+comp_trx(const gmx_output_env_t *oenv, const char *fn1, const char *fn2,
gmx_bool bRMSD, real ftol, real abstol);
/* Compare two binary trajectory files */
gmx_enxnm_t *enm = NULL;
t_enxframe *fr_ener = NULL;
char buf[200], buf2[200];
- output_env_t oenv;
+ gmx_output_env_t *oenv;
t_filenm fnm[] = {
{ efTPR, NULL, NULL, ffREAD },
{ efTRN, "-f", NULL, ffOPTRD },
};
#define NFILE asize(fnm)
- output_env_t oenv;
+ gmx_output_env_t *oenv;
/* Command line options */
- static gmx_bool bShowNumbers = TRUE;
- static gmx_bool bSysTop = FALSE;
- t_pargs pa[] = {
+ static gmx_bool bShowNumbers = TRUE;
+ static gmx_bool bSysTop = FALSE;
+ t_pargs pa[] = {
{ "-nr", FALSE, etBOOL, {&bShowNumbers}, "Show index numbers in output (leaving them out makes comparison easier, but creates a useless topology)" },
{ "-sys", FALSE, etBOOL, {&bSysTop}, "List the atoms and bonded interactions for the whole system instead of for each molecule type" }
};
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/legacyheaders/types/mdatom.h"
#include "gromacs/legacyheaders/types/nrnb.h"
-#include "gromacs/legacyheaders/types/oenv.h"
#include "gromacs/legacyheaders/types/state.h"
#include "gromacs/listed-forces/manage-threading.h"
#include "gromacs/math/utilities.h"
/*! \libinternal
\copydoc integrator_t (FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout,
gmx_walltime_accounting_t walltime_accounting)
*/
double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose, gmx_bool bCompact,
+ const gmx_output_env_t *oenv, gmx_bool bVerbose, gmx_bool bCompact,
int nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
int stepout, t_inputrec *ir,
const int NFILE = asize(fnm);
/* Command line options ! */
- gmx_bool bDDBondCheck = TRUE;
- gmx_bool bDDBondComm = TRUE;
- gmx_bool bTunePME = TRUE;
- gmx_bool bVerbose = FALSE;
- gmx_bool bCompact = TRUE;
- gmx_bool bRerunVSite = FALSE;
- gmx_bool bConfout = TRUE;
- gmx_bool bReproducible = FALSE;
- gmx_bool bIMDwait = FALSE;
- gmx_bool bIMDterm = FALSE;
- gmx_bool bIMDpull = FALSE;
+ gmx_bool bDDBondCheck = TRUE;
+ gmx_bool bDDBondComm = TRUE;
+ gmx_bool bTunePME = TRUE;
+ gmx_bool bVerbose = FALSE;
+ gmx_bool bCompact = TRUE;
+ gmx_bool bRerunVSite = FALSE;
+ gmx_bool bConfout = TRUE;
+ gmx_bool bReproducible = FALSE;
+ gmx_bool bIMDwait = FALSE;
+ gmx_bool bIMDterm = FALSE;
+ gmx_bool bIMDpull = FALSE;
- int npme = -1;
- int nstlist = 0;
- int nmultisim = 0;
- int nstglobalcomm = -1;
- int repl_ex_nst = 0;
- int repl_ex_seed = -1;
- int repl_ex_nex = 0;
- int nstepout = 100;
- int resetstep = -1;
- gmx_int64_t nsteps = -2; /* the value -2 means that the mdp option will be used */
- int imdport = 8888; /* can be almost anything, 8888 is easy to remember */
+ int npme = -1;
+ int nstlist = 0;
+ int nmultisim = 0;
+ int nstglobalcomm = -1;
+ int repl_ex_nst = 0;
+ int repl_ex_seed = -1;
+ int repl_ex_nex = 0;
+ int nstepout = 100;
+ int resetstep = -1;
+ gmx_int64_t nsteps = -2; /* the value -2 means that the mdp option will be used */
+ int imdport = 8888; /* can be almost anything, 8888 is easy to remember */
- rvec realddxyz = {0, 0, 0};
- const char *ddno_opt[ddnoNR+1] =
+ rvec realddxyz = {0, 0, 0};
+ const char *ddno_opt[ddnoNR+1] =
{ NULL, "interleave", "pp_pme", "cartesian", NULL };
- const char *dddlb_opt[] =
+ const char *dddlb_opt[] =
{ NULL, "auto", "no", "yes", NULL };
- const char *thread_aff_opt[threadaffNR+1] =
+ const char *thread_aff_opt[threadaffNR+1] =
{ NULL, "auto", "on", "off", NULL };
- const char *nbpu_opt[] =
+ const char *nbpu_opt[] =
{ NULL, "auto", "cpu", "gpu", "gpu_cpu", NULL };
- real rdd = 0.0, rconstr = 0.0, dlb_scale = 0.8, pforce = -1;
- char *ddcsx = NULL, *ddcsy = NULL, *ddcsz = NULL;
- real cpt_period = 15.0, max_hours = -1;
- gmx_bool bTryToAppendFiles = TRUE;
- gmx_bool bKeepAndNumCPT = FALSE;
- gmx_bool bResetCountersHalfWay = FALSE;
- output_env_t oenv = NULL;
+ real rdd = 0.0, rconstr = 0.0, dlb_scale = 0.8, pforce = -1;
+ char *ddcsx = NULL, *ddcsy = NULL, *ddcsz = NULL;
+ real cpt_period = 15.0, max_hours = -1;
+ gmx_bool bTryToAppendFiles = TRUE;
+ gmx_bool bKeepAndNumCPT = FALSE;
+ gmx_bool bResetCountersHalfWay = FALSE;
+ gmx_output_env_t *oenv = NULL;
/* Non transparent initialization of a complex gmx_hw_opt_t struct.
* But unfortunately we are not allowed to call a function here,
struct mdrunner_arglist
{
- gmx_hw_opt_t hw_opt;
- FILE *fplog;
- t_commrec *cr;
- int nfile;
- const t_filenm *fnm;
- output_env_t oenv;
- gmx_bool bVerbose;
- gmx_bool bCompact;
- int nstglobalcomm;
- ivec ddxyz;
- int dd_node_order;
- real rdd;
- real rconstr;
- const char *dddlb_opt;
- real dlb_scale;
- const char *ddcsx;
- const char *ddcsy;
- const char *ddcsz;
- const char *nbpu_opt;
- int nstlist_cmdline;
- gmx_int64_t nsteps_cmdline;
- int nstepout;
- int resetstep;
- int nmultisim;
- int repl_ex_nst;
- int repl_ex_nex;
- int repl_ex_seed;
- real pforce;
- real cpt_period;
- real max_hours;
- int imdport;
- unsigned long Flags;
+ gmx_hw_opt_t hw_opt;
+ FILE *fplog;
+ t_commrec *cr;
+ int nfile;
+ const t_filenm *fnm;
+ const gmx_output_env_t *oenv;
+ gmx_bool bVerbose;
+ gmx_bool bCompact;
+ int nstglobalcomm;
+ ivec ddxyz;
+ int dd_node_order;
+ real rdd;
+ real rconstr;
+ const char *dddlb_opt;
+ real dlb_scale;
+ const char *ddcsx;
+ const char *ddcsy;
+ const char *ddcsz;
+ const char *nbpu_opt;
+ int nstlist_cmdline;
+ gmx_int64_t nsteps_cmdline;
+ int nstepout;
+ int resetstep;
+ int nmultisim;
+ int repl_ex_nst;
+ int repl_ex_nex;
+ int repl_ex_seed;
+ real pforce;
+ real cpt_period;
+ real max_hours;
+ int imdport;
+ unsigned long Flags;
};
All options besides nthreads are the same as for mdrunner(). */
static t_commrec *mdrunner_start_threads(gmx_hw_opt_t *hw_opt,
FILE *fplog, t_commrec *cr, int nfile,
- const t_filenm fnm[], const output_env_t oenv, gmx_bool bVerbose,
+ const t_filenm fnm[], const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
ivec ddxyz, int dd_node_order, real rdd, real rconstr,
const char *dddlb_opt, real dlb_scale,
int mdrunner(gmx_hw_opt_t *hw_opt,
FILE *fplog, t_commrec *cr, int nfile,
- const t_filenm fnm[], const output_env_t oenv, gmx_bool bVerbose,
+ const t_filenm fnm[], const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm,
ivec ddxyz, int dd_node_order, real rdd, real rconstr,
const char *dddlb_opt, real dlb_scale,
#include "gromacs/fileio/filenm.h"
#include "gromacs/legacyheaders/types/hw_info.h"
-#include "gromacs/legacyheaders/types/oenv.h"
#include "gromacs/math/vec.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
+struct gmx_output_env_t;
struct t_commrec;
namespace gmx
*/
int mdrunner(gmx_hw_opt_t *hw_opt,
FILE *fplog, struct t_commrec *cr, int nfile,
- const t_filenm fnm[], const output_env_t oenv, gmx_bool bVerbose,
+ const t_filenm fnm[], const gmx_output_env_t *oenv, gmx_bool bVerbose,
gmx_bool bCompact, int nstglobalcomm, ivec ddxyz, int dd_node_order,
real rdd, real rconstr, const char *dddlb_opt, real dlb_scale,
const char *ddcsx, const char *ddcsy, const char *ddcsz,
int x, int y, int width, int height,
unsigned long fg, unsigned long bg,
int ePBC, matrix box,
- const output_env_t oenv)
+ gmx_output_env_t *oenv)
{
t_manager *man;
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "x11.h"
#include "xutil.h"
+struct gmx_output_env_t;
+
/* Some window sizes */
#define EWIDTH 200
#define EHEIGHT 0
*
*/
typedef struct {
- t_trxstatus *status;
- const char *trajfile;
- int natom; /* The number of atoms */
- t_topology top; /* topology */
- rvec box_size;
- real time; /* The actual time */
- rvec *x; /* The coordinates */
- iv2 *ix; /* The coordinates after projection */
- real *zz; /* Z-coords */
- matrix box; /* The box */
- int nobj; /* The number of objects */
- t_object *obj; /* The objects on screen */
- bool *bHydro; /* true for hydrogen atoms */
- bool *bLabel; /* Show a label on atom i? */
- char **szLab; /* Array of pointers to labels */
- unsigned long *col; /* The colour of the atoms */
- int *size; /* The size of the atoms */
- real *vdw; /* The VDWaals radius of the atoms */
- bool *bVis; /* visibility of atoms */
- bool bPbc; /* Remove Periodic boundary */
- bool bAnimate; /* Animation going on? */
- bool bEof; /* End of file reached? */
- bool bStop; /* Stopped by user? */
- bool bSort; /* Sort the coordinates */
- bool bPlus; /* Draw plus for single atom */
- int nSkip; /* Skip n steps after each frame */
- int nWait; /* Wait n ms after each frame */
- gmx_rmpbc_t gpbc; /* For removing peridiocity */
-
- t_windata wd; /* The manager subwindow */
- t_windata title; /* Title window */
- t_3dview *view; /* The 3d struct */
- t_molwin *molw; /* The molecule window */
- t_butbox *vbox; /* The video box */
- t_butbox *bbox; /* The button box */
- t_legendwin *legw; /* The legend window */
-
- output_env_t oenv; /* output env data */
+ t_trxstatus *status;
+ const char *trajfile;
+ int natom; /* The number of atoms */
+ t_topology top; /* topology */
+ rvec box_size;
+ real time; /* The actual time */
+ rvec *x; /* The coordinates */
+ iv2 *ix; /* The coordinates after projection */
+ real *zz; /* Z-coords */
+ matrix box; /* The box */
+ int nobj; /* The number of objects */
+ t_object *obj; /* The objects on screen */
+ bool *bHydro; /* true for hydrogen atoms */
+ bool *bLabel; /* Show a label on atom i? */
+ char **szLab; /* Array of pointers to labels */
+ unsigned long *col; /* The colour of the atoms */
+ int *size; /* The size of the atoms */
+ real *vdw; /* The VDWaals radius of the atoms */
+ bool *bVis; /* visibility of atoms */
+ bool bPbc; /* Remove Periodic boundary */
+ bool bAnimate; /* Animation going on? */
+ bool bEof; /* End of file reached? */
+ bool bStop; /* Stopped by user? */
+ bool bSort; /* Sort the coordinates */
+ bool bPlus; /* Draw plus for single atom */
+ int nSkip; /* Skip n steps after each frame */
+ int nWait; /* Wait n ms after each frame */
+ gmx_rmpbc_t gpbc; /* For removing peridiocity */
+
+ t_windata wd; /* The manager subwindow */
+ t_windata title; /* Title window */
+ t_3dview *view; /* The 3d struct */
+ t_molwin *molw; /* The molecule window */
+ t_butbox *vbox; /* The video box */
+ t_butbox *bbox; /* The button box */
+ t_legendwin *legw; /* The legend window */
+
+ gmx_output_env_t *oenv; /* output env data */
} t_manager;
extern t_manager *init_man(t_x11 *x11, Window Parent,
int x, int y, int width, int height,
unsigned long fg, unsigned long bg,
- int ePBC, matrix box, const output_env_t oenv);
+ int ePBC, matrix box, gmx_output_env_t *oenv);
/* Initiate the display manager */
extern void move_man(t_x11 *x11, t_manager *man, int width, int height);
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/confio.h"
+#include "gromacs/fileio/oenv.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/fileio/trx.h"
#include "gromacs/legacyheaders/copyrite.h"
};
static void init_gmx(t_x11 *x11, char *program, int nfile, t_filenm fnm[],
- const output_env_t oenv)
+ gmx_output_env_t *oenv)
{
Pixmap pm;
t_gmx *gmx;
int gmx_view(int argc, char *argv[])
{
- const char *desc[] = {
+ const char *desc[] = {
"[THISMODULE] is the GROMACS trajectory viewer. This program reads a",
"trajectory file, a run input file and an index file and plots a",
"3D structure of your molecule on your standard X Window",
"Some of the more common X command line options can be used: ",
"[TT]-bg[tt], [TT]-fg[tt] change colors, [TT]-font fontname[tt] changes the font."
};
- const char *bugs[] = {
+ const char *bugs[] = {
"Balls option does not work",
"Some times dumps core without a good reason"
};
- output_env_t oenv;
- t_filenm fnm[] = {
+ gmx_output_env_t *oenv;
+ t_filenm fnm[] = {
{ efTRX, "-f", NULL, ffREAD },
{ efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD }