From: Rossen Apostolov Date: Thu, 12 Jun 2014 16:27:30 +0000 (+0200) Subject: Cleanup environment variables. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=da96f04b93b8c407c66f641afb7b2f79d5b2f811;p=alexxy%2Fgromacs.git Cleanup environment variables. Renamed variables to more descriptive names and removed unused ones. Fixes #976. Change-Id: I0c17443c93efe581bf728f783893181e5a7f8ed8 --- diff --git a/manual/install.tex b/manual/install.tex index a91a1a8102..24bcf9c79e 100644 --- a/manual/install.tex +++ b/manual/install.tex @@ -163,12 +163,12 @@ you should consult your local documentation for details. Be careful not to use a command which blocks the terminal ({\eg} {\tt vi}), since multiple instances might be run. \item {\tt GMX_VIRIAL_TEMPERATURE}: print virial temperature energy term -\item {\tt LOG_BUFS}: the size of the buffer for file I/O. When set +\item {\tt GMX_LOG_BUFFER}: the size of the buffer for file I/O. When set to 0, all file I/O will be unbuffered and therefore very slow. This can be handy for debugging purposes, because it ensures that all files are always totally up-to-date. -\item {\tt LOGO}: set display color for logo in {\tt \normindex{ngmx}}. -\item {\tt LONGFORMAT}: use long float format when printing +\item {\tt GMX_LOGO_COLOR}: set display color for logo in {\tt \normindex{ngmx}}. +\item {\tt GMX_PRINT_LONGFORMAT}: use long float format when printing decimal values. \item {\tt GMX_COMPELDUMP}: Applies for computational electrophysiology setups only (see section \ref{sec:compel}). The initial structure gets dumped to @@ -181,12 +181,7 @@ you should consult your local documentation for details. \begin{enumerate} -\item {\tt DUMPNL}: dump neighbor list. - If set to a positive number the {\em entire} - neighbor list is printed in the log file (may be many megabytes). - Mainly for debugging purposes, but may also be handy for - porting to other platforms. -\item {\tt WHERE}: when set, print debugging info on line numbers. +\item {\tt GMX_PRINT_DEBUG_LINES}: when set, print debugging info on line numbers. \item {\tt GMX_DD_NST_DUMP}: number of steps that elapse between dumping the current DD to a PDB file (default 0). This only takes effect during domain decomposition, so it should typically be @@ -210,9 +205,7 @@ you should consult your local documentation for details. \begin{enumerate} -\item {\tt DISTGCT}: couple distances between two atoms when doing general coupling - theory processes. The format is a string containing two integers, separated by a space. -\item {\tt GALACTIC_DYNAMICS}: planetary simulations are made possible (just for fun) by setting +\item {\tt GMX_DO_GALACTIC_DYNAMICS}: planetary simulations are made possible (just for fun) by setting this environment variable, which allows setting {\tt epsilon_r = -1} in the {\tt .mdp} file. Normally, {\tt epsilon_r} must be greater than zero to prevent a fatal error. See {\wwwpage} for example input files for a planetary simulation. @@ -350,45 +343,41 @@ you should consult your local documentation for details. \begin{enumerate} -\item {\tt ACC}: accuracy in Gaussian L510 (MC-SCF) component program. -\item {\tt BASENAME}: prefix of {\tt .tpr} files, used in Orca calculations +\item {\tt GMX_QM_ACCURACY}: accuracy in Gaussian L510 (MC-SCF) component program. +\item {\tt GMX_QM_ORCA_BASENAME}: prefix of {\tt .tpr} files, used in Orca calculations for input and output file names. -\item {\tt CPMCSCF}: when set to a nonzero value, Gaussian QM calculations will +\item {\tt GMX_QM_CPMCSCF}: when set to a nonzero value, Gaussian QM calculations will iteratively solve the CP-MCSCF equations. -\item {\tt DEVEL_DIR}: location of modified links in Gaussian. +\item {\tt GMX_QM_MODIFIED_LINKS_DIR}: location of modified links in Gaussian. \item {\tt DSSP}: used by {\tt \normindex{do_dssp}} to point to the {\tt dssp} executable (not just its path). -\item {\tt GAUSS_DIR}: directory where Gaussian is installed. -\item {\tt GAUSS_EXE}: name of the Gaussian executable. -\item {\tt GKRWIDTH}: spacing used by {\tt \normindex{g_dipoles}}. +\item {\tt GMX_QM_GAUSS_DIR}: directory where Gaussian is installed. +\item {\tt GMX_QM_GAUSS_EXE}: name of the Gaussian executable. +\item {\tt GMX_DIPOLE_SPACING}: spacing used by {\tt \normindex{g_dipoles}}. \item {\tt GMX_MAXRESRENUM}: sets the maximum number of residues to be renumbered by {\tt \normindex{grompp}}. A value of -1 indicates all residues should be renumbered. \item {\tt GMX_FFRTP_TER_RENAME}: Some force fields (like AMBER) use specific names for N- and C- terminal residues (NXXX and CXXX) as {\tt .rtp} entries that are normally renamed. Setting this environment variable disables this renaming. \item {\tt GMX_PATH_GZIP}: {\tt gunzip} executable, used by {\tt \normindex{g_wham}}. -\item {\tt GMXFONT}: name of X11 font used by {\tt \normindex{ngmx}}. +\item {\tt GMX_FONT}: name of X11 font used by {\tt \normindex{ngmx}}. \item {\tt GMXTIMEUNIT}: the time unit used in output files, can be anything in fs, ps, ns, us, ms, s, m or h. -\item {\tt MEM}: memory used for Gaussian QM calculation. +\item {\tt GMX_QM_GAUSSIAN_MEMORY}: memory used for Gaussian QM calculation. \item {\tt MULTIPROT}: name of the {\tt multiprot} executable, used by the contributed program {\tt \normindex{do_multiprot}}. \item {\tt NCPUS}: number of CPUs to be used for Gaussian QM calculation -\item {\tt OPENMM_PLUGIN_DIR}: the location of OpenMM plugins, needed for - {\tt \normindex{mdrun-gpu}}. -\item {\tt ORCA_PATH}: directory where Orca is installed. -\item {\tt SASTEP}: simulated annealing step size for Gaussian QM calculation. -\item {\tt STATE}: defines state for Gaussian surface hopping calculation. -\item {\tt TESTMC}: perform 1000 random swaps in Monte Carlo clustering method - within {\tt \normindex{g_cluster}}. -\item {\tt TOTAL}: name of the {\tt total} executable used by the contributed +\item {\tt GMX_ORCA_PATH}: directory where Orca is installed. +\item {\tt GMX_QM_SA_STEP}: simulated annealing step size for Gaussian QM calculation. +\item {\tt GMX_QM_GROUND_STATE}: defines state for Gaussian surface hopping calculation. +\item {\tt GMX_TOTAL}: name of the {\tt total} executable used by the contributed {\tt \normindex{do_shift}} program. -\item {\tt VERBOSE}: make {\tt \normindex{g_energy}} and {\tt \normindex{eneconv}} +\item {\tt GMX_ENER_VERBOSE}: make {\tt \normindex{g_energy}} and {\tt \normindex{eneconv}} loud and noisy. \item {\tt VMD_PLUGIN_PATH}: where to find VMD plug-ins. Needed to be able to read file formats recognized only by a VMD plug-in. \item {\tt VMDDIR}: base path of VMD installation. -\item {\tt XMGR}: sets viewer to {\tt xmgr} (deprecated) instead of {\tt xmgrace}. +\item {\tt GMX_USE_XMGR}: sets viewer to {\tt xmgr} (deprecated) instead of {\tt xmgrace}. \end{enumerate} @@ -471,5 +460,5 @@ Please check {\wwwpage} for up to date information on GPU usage. % LocalWords: MAXRESRENUM grompp FFRTP TER NXXX CXXX rtp GZIP gunzip % LocalWords: GMXFONT ns MEM MULTIPROT multiprot NCPUS CPUs OPENMM % LocalWords: PLUGIN OpenMM plugins SASTEP TESTMC eneconv VMD VMDDIR -% LocalWords: XMGR xmgr parallelization nt online Nvidia nb cpu +% LocalWords: GMX_USE_XMGR xmgr parallelization nt online Nvidia nb cpu % LocalWords: testverlet grommp diff --git a/scripts/GMXRC.csh.cmakein b/scripts/GMXRC.csh.cmakein index d4e58d3323..f22607920b 100644 --- a/scripts/GMXRC.csh.cmakein +++ b/scripts/GMXRC.csh.cmakein @@ -87,7 +87,7 @@ setenv PKG_CONFIG_PATH ${GMXLDLIB}/pkgconfig${PKG_CONFIG_PATH} #debian/ubuntu needs a : at the end setenv MANPATH ${GMXMAN}:${MANPATH} -setenv GMXFONT 10x20 +setenv GMX_FONT 10x20 # Read completions if we understand it (i.e. have tcsh) # Currently disabled, since the completions don't work with the new diff --git a/src/contrib/do_shift.c b/src/contrib/do_shift.c index d99072f1b9..5bea7c5fea 100644 --- a/src/contrib/do_shift.c +++ b/src/contrib/do_shift.c @@ -82,8 +82,8 @@ int main(int argc,char *argv[]) "calling the 'total' program. If you do not have the total program,", "get it. do_shift assumes that the total executable is in", "[TT]/home/mdgroup/total/total[tt]. If that is not the case, then you should", - "set an environment variable [BB]TOTAL[bb] as in: [PAR]", - "[TT]setenv TOTAL /usr/local/bin/total[tt][PAR]", + "set an environment variable [BB]GMX_TOTAL[bb] as in: [PAR]", + "[TT]setenv GMX_TOTAL /usr/local/bin/total[tt][PAR]", "where the right hand side should point to the total executable.[PAR]", "Output is printed in files [TT]shift.out[tt] where t is the time of the frame.[PAR]", "The program also needs an input file called [BB]random.dat[bb] which", @@ -143,7 +143,7 @@ int main(int argc,char *argv[]) gmx_tmpnam(tmpfile); fprintf(stderr,"pdbfile = %s\ntmpfile = %s\n",pdbfile,tmpfile); - if ((dptr=getenv("TOTAL")) == NULL) + if ((dptr=getenv("GMX_TOTAL")) == NULL) dptr="/home/mdgroup/total/total"; sprintf(total,"%s > /dev/null",dptr); fprintf(stderr,"total cmd='%s'\n",total); diff --git a/src/gromacs/fileio/futil.cpp b/src/gromacs/fileio/futil.cpp index 6f272aa76a..f81f4dcbda 100644 --- a/src/gromacs/fileio/futil.cpp +++ b/src/gromacs/fileio/futil.cpp @@ -495,7 +495,7 @@ FILE *gmx_ffopen(const char *file, const char *mode) /* Check whether we should be using buffering (default) or not * (for debugging) */ - if (bUnbuffered || ((bufsize = getenv("LOG_BUFS")) != NULL)) + if (bUnbuffered || ((bufsize = getenv("GMX_LOG_BUFFER")) != NULL)) { /* Check whether to use completely unbuffered */ if (bUnbuffered) diff --git a/src/gromacs/gmxana/gmx_dipoles.cpp b/src/gromacs/gmxana/gmx_dipoles.cpp index 11c2328b6c..d2ff55801d 100644 --- a/src/gromacs/gmxana/gmx_dipoles.cpp +++ b/src/gromacs/gmxana/gmx_dipoles.cpp @@ -92,7 +92,7 @@ static t_gkrbin *mk_gkrbin(real radius, real rcmax, gmx_bool bPhi, int ndegrees) snew(gb, 1); - if ((ptr = getenv("GKRWIDTH")) != NULL) + if ((ptr = getenv("GMX_DIPOLE_SPACING")) != NULL) { double bw = strtod(ptr, NULL); gb->spacing = bw; diff --git a/src/gromacs/gmxana/gmx_eneconv.c b/src/gromacs/gmxana/gmx_eneconv.c index b0ad9f342e..a521f90fac 100644 --- a/src/gromacs/gmxana/gmx_eneconv.c +++ b/src/gromacs/gmxana/gmx_eneconv.c @@ -66,7 +66,7 @@ static int *select_it(int nre, gmx_enxnm_t *nm, int *nset) int *set; gmx_bool bVerbose = TRUE; - if ((getenv("VERBOSE")) != NULL) + if ((getenv("GMX_ENER_VERBOSE")) != NULL) { bVerbose = FALSE; } diff --git a/src/gromacs/gmxana/gmx_energy.c b/src/gromacs/gmxana/gmx_energy.c index 8f199dbe7e..884c45d7f5 100644 --- a/src/gromacs/gmxana/gmx_energy.c +++ b/src/gromacs/gmxana/gmx_energy.c @@ -107,7 +107,7 @@ static int *select_it(int nre, char *nm[], int *nset) int *set; gmx_bool bVerbose = TRUE; - if ((getenv("VERBOSE")) != NULL) + if ((getenv("GMX_ENER_VERBOSE")) != NULL) { bVerbose = FALSE; } @@ -177,7 +177,7 @@ static int *select_by_name(int nre, gmx_enxnm_t *nm, int *nset) const char *fm2 = "%3d %-34s"; char **newnm = NULL; - if ((getenv("VERBOSE")) != NULL) + if ((getenv("GMX_ENER_VERBOSE")) != NULL) { bVerbose = FALSE; } diff --git a/src/gromacs/gmxlib/gmx_fatal.c b/src/gromacs/gmxlib/gmx_fatal.c index 837abe06d7..002fb2d200 100644 --- a/src/gromacs/gmxlib/gmx_fatal.c +++ b/src/gromacs/gmxlib/gmx_fatal.c @@ -98,7 +98,7 @@ void _where(const char *file, int line) if (bFirst) /* we repeat the check in the locked section because things might have changed */ { - if ((temp = getenv("WHERE")) != NULL) + if ((temp = getenv("GMX_PRINT_DEBUG_LINES")) != NULL) { nskip = strtol(temp, NULL, 10); } diff --git a/src/gromacs/gmxlib/txtdump.c b/src/gromacs/gmxlib/txtdump.c index e031d39233..ff9966f70a 100644 --- a/src/gromacs/gmxlib/txtdump.c +++ b/src/gromacs/gmxlib/txtdump.c @@ -269,7 +269,7 @@ void pr_rvecs(FILE *fp, int indent, const char *title, rvec vec[], int n) const char *format; int i, j; - if (getenv("LONGFORMAT") != NULL) + if (getenv("GMX_PRINT_LONGFORMAT") != NULL) { format = flong; } @@ -306,7 +306,7 @@ void pr_rvecs_of_dim(FILE *fp, int indent, const char *title, rvec vec[], int n, const char *format; int i, j; - if (getenv("LONGFORMAT") != NULL) + if (getenv("GMX_PRINT_LONGFORMAT") != NULL) { format = flong; } @@ -374,7 +374,7 @@ void pr_reals_of_dim(FILE *fp, int indent, const char *title, real *vec, int n, const char *flong = "%15.8e"; const char *format; - if (getenv("LONGFORMAT") != NULL) + if (getenv("GMX_PRINT_LONGFORMAT") != NULL) { format = flong; } diff --git a/src/gromacs/gmxlib/viewit.c b/src/gromacs/gmxlib/viewit.c index feb6898642..0384bc921f 100644 --- a/src/gromacs/gmxlib/viewit.c +++ b/src/gromacs/gmxlib/viewit.c @@ -95,7 +95,7 @@ void do_view(const output_env_t oenv, const char *fn, const char *opts) case efXVG: if (!(cmd = getenv(env)) ) { - if (getenv("XMGR") ) + if (getenv("GMX_USE_XMGR") ) { cmd = "xmgr"; } diff --git a/src/gromacs/gmxpreprocess/readir.c b/src/gromacs/gmxpreprocess/readir.c index 68a2a71d73..b2d19cd75d 100644 --- a/src/gromacs/gmxpreprocess/readir.c +++ b/src/gromacs/gmxpreprocess/readir.c @@ -1071,7 +1071,7 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts, ir->epsilon_r = 1.0; } - if (getenv("GALACTIC_DYNAMICS") == NULL) + if (getenv("GMX_DO_GALACTIC_DYNAMICS") == NULL) { sprintf(err_buf, "epsilon-r must be >= 0 instead of %g\n", ir->epsilon_r); CHECK(ir->epsilon_r < 0); diff --git a/src/gromacs/mdlib/qm_gaussian.c b/src/gromacs/mdlib/qm_gaussian.c index 8e96ec739a..e7422941ae 100644 --- a/src/gromacs/mdlib/qm_gaussian.c +++ b/src/gromacs/mdlib/qm_gaussian.c @@ -118,7 +118,7 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) /* we read the number of cpus and environment from the environment * if set. */ - buf = getenv("NCPUS"); + buf = getenv("GMX_QM_GAUSSIAN_NCPUS"); if (buf) { sscanf(buf, "%d", &qm->nQMcpus); @@ -128,7 +128,7 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) qm->nQMcpus = 1; } fprintf(stderr, "number of CPUs for gaussian = %d\n", qm->nQMcpus); - buf = getenv("MEM"); + buf = getenv("GMX_QM_GAUSSIAN_MEMORY"); if (buf) { sscanf(buf, "%d", &qm->QMmem); @@ -138,7 +138,7 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) qm->QMmem = 50000000; } fprintf(stderr, "memory for gaussian = %d\n", qm->QMmem); - buf = getenv("ACC"); + buf = getenv("GMX_QM_ACCURACY"); if (buf) { sscanf(buf, "%d", &qm->accuracy); @@ -149,7 +149,7 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) } fprintf(stderr, "accuracy in l510 = %d\n", qm->accuracy); - buf = getenv("CPMCSCF"); + buf = getenv("GMX_QM_CPMCSCF"); if (buf) { sscanf(buf, "%d", &i); @@ -167,7 +167,7 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) { fprintf(stderr, "NOT using cp-mcscf in l1003\n"); } - buf = getenv("SASTEP"); + buf = getenv("GMX_QM_SA_STEP"); if (buf) { sscanf(buf, "%d", &qm->SAstep); @@ -202,7 +202,7 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) fclose(out); } /* gaussian settings on the system */ - buf = getenv("GAUSS_DIR"); + buf = getenv("GMX_QM_GAUSS_DIR"); fprintf(stderr, "%s", buf); if (buf) @@ -211,26 +211,26 @@ void init_gaussian(t_commrec *cr, t_QMrec *qm, t_MMrec *mm) } else { - gmx_fatal(FARGS, "no $GAUSS_DIR, check gaussian manual\n"); + gmx_fatal(FARGS, "no $GMX_QM_GAUSS_DIR, check gaussian manual\n"); } - buf = getenv("GAUSS_EXE"); + buf = getenv("GMX_QM_GAUSS_EXE"); if (buf) { qm->gauss_exe = strdup(buf); } else { - gmx_fatal(FARGS, "no $GAUSS_EXE, check gaussian manual\n"); + gmx_fatal(FARGS, "no $GMX_QM_GAUSS_EXE set, check gaussian manual\n"); } - buf = getenv("DEVEL_DIR"); + buf = getenv("GMX_QM_MODIFIED_LINKS_DIR"); if (buf) { qm->devel_dir = strdup (buf); } else { - gmx_fatal(FARGS, "no $DEVEL_DIR, this is were the modified links reside.\n"); + gmx_fatal(FARGS, "no $GMX_QM_MODIFIED_LINKS_DIR, this is were the modified links reside.\n"); } /* if(fr->bRF){*/ @@ -1112,7 +1112,7 @@ real call_gaussian_SH(t_commrec *cr, t_forcerec *fr, t_QMrec *qm, t_MMrec *mm, if (!step) { snew(buf, 20); - buf = getenv("STATE"); + buf = getenv("GMX_QM_GROUND_STATE"); if (buf) { sscanf(buf, "%d", &state); diff --git a/src/gromacs/mdlib/qm_orca.c b/src/gromacs/mdlib/qm_orca.c index db48238ff0..7dbee944af 100644 --- a/src/gromacs/mdlib/qm_orca.c +++ b/src/gromacs/mdlib/qm_orca.c @@ -72,7 +72,7 @@ void init_orca(t_QMrec *qm) snew(buf, 200); /* ORCA settings on the system */ - buf = getenv("BASENAME"); + buf = getenv("GMX_QM_ORCA_BASENAME"); if (buf) { snew(qm->orca_basename, 200); @@ -80,12 +80,12 @@ void init_orca(t_QMrec *qm) } else { - gmx_fatal(FARGS, "$BASENAME not set\n"); + gmx_fatal(FARGS, "$GMX_QM_ORCA_BASENAME is not set\n"); } /* ORCA directory on the system */ snew(buf, 200); - buf = getenv("ORCA_PATH"); + buf = getenv("GMX_ORCA_PATH"); if (buf) { @@ -94,7 +94,7 @@ void init_orca(t_QMrec *qm) } else { - gmx_fatal(FARGS, "$ORCA_PATH not set, check manual\n"); + gmx_fatal(FARGS, "$GMX_ORCA_PATH not set, check manual\n"); } fprintf(stderr, "Setting ORCA path to: %s...\n", qm->orca_dir); diff --git a/src/programs/view/logo.cpp b/src/programs/view/logo.cpp index 11ef88b966..8c56da42d3 100644 --- a/src/programs/view/logo.cpp +++ b/src/programs/view/logo.cpp @@ -199,7 +199,7 @@ t_logo *init_logo(t_x11 *x11, Window parent, bool bQuitOnClick) logo->bQuitOnClick = bQuitOnClick; InitWin(&logo->wd, 0, 0, 360, 270, 1, "GROMACS"); bg = LIGHTGREY; - if ((newcol = getenv("LOGO")) != NULL) + if ((newcol = getenv("GMX_LOGO_COLOR")) != NULL) { GetNamedColor(x11, newcol, &bg); } diff --git a/src/programs/view/x11.cpp b/src/programs/view/x11.cpp index e30b6f1a8d..14ac665f03 100644 --- a/src/programs/view/x11.cpp +++ b/src/programs/view/x11.cpp @@ -322,7 +322,7 @@ t_x11 *GetX11(int *argc, char *argv[]) title = strdup(argv[0]); /* First check environment */ - fontname = getenv("GMXFONT"); + fontname = getenv("GMX_FONT"); display = getenv("DISPLAY"); snew(ARGV, *argc);