Cleanup environment variables.
authorRossen Apostolov <rossen@kth.se>
Thu, 12 Jun 2014 16:27:30 +0000 (18:27 +0200)
committerRossen Apostolov <rossen@kth.se>
Thu, 12 Jun 2014 16:27:30 +0000 (18:27 +0200)
Renamed variables to more descriptive names and
removed unused ones.

Fixes #976.

Change-Id: I0c17443c93efe581bf728f783893181e5a7f8ed8

15 files changed:
manual/install.tex
scripts/GMXRC.csh.cmakein
src/contrib/do_shift.c
src/gromacs/fileio/futil.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_eneconv.c
src/gromacs/gmxana/gmx_energy.c
src/gromacs/gmxlib/gmx_fatal.c
src/gromacs/gmxlib/txtdump.c
src/gromacs/gmxlib/viewit.c
src/gromacs/gmxpreprocess/readir.c
src/gromacs/mdlib/qm_gaussian.c
src/gromacs/mdlib/qm_orca.c
src/programs/view/logo.cpp
src/programs/view/x11.cpp

index a91a1a81025340830bddadfa02e04dd66c95370f..24bcf9c79eaab3ef41c8e9313db8615a8d88e987 100644 (file)
@@ -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
index d4e58d3323ed7d49b513feeb8826774013a29030..f22607920b96cb3c2a2e5de659c1c41e8eadae8d 100644 (file)
@@ -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
index d99072f1b90102c6afb9d40e54c132b99b0124eb..5bea7c5fea22ac165ce693f6a8221f040f794897 100644 (file)
@@ -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);
index 6f272aa76aa81e7c3d0a0a54219bf8e3e40f2248..f81f4dcbdab70c45a04edd2037e2cbbfcddf7077 100644 (file)
@@ -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)
index 11c2328b6c884522b376f2175cd5b7f3b1f206b3..d2ff55801d0e586006721e0ebfdaca1033f3afb5 100644 (file)
@@ -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;
index b0ad9f342eadd5d9d0658cb580608afe36ae8f55..a521f90facd3c3133256b0e862b7587bbb7dc0fd 100644 (file)
@@ -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;
     }
index 8f199dbe7ebe86e9801324cc4f959607edc4cf15..884c45d7f5331866006890c2b07577fc97d5d9d4 100644 (file)
@@ -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;
     }
index 837abe06d7197d179cf1b782408e4ba9f800b9ec..002fb2d200af04246aa667eff1cef31eb54d1033 100644 (file)
@@ -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);
             }
index e031d39233fa7dd0f6ac92b91995a4a17c86275d..ff9966f70a0147839d2dab5d3e260680a5728f0c 100644 (file)
@@ -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;
     }
index feb6898642ea2889218f119ef73a0519b399b84e..0384bc921f0253c2a7305258879b27bcc5669f23 100644 (file)
@@ -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";
                         }
index 68a2a71d73129744caa8b6471698f4515461890a..b2d19cd75df263ecd553ef716a9dd7fa3cace9e4 100644 (file)
@@ -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);
index 8e96ec739ab7874a63550927b66485e8ec13c657..e7422941aed503572f6d2900777cb609aeaf63a3 100644 (file)
@@ -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);
index db48238ff0e49722e742b0722a1ebaee3a54ee09..7dbee944afdbf4dc7ee22bf097f5bb460a42f581 100644 (file)
@@ -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);
index 11ef88b9664d9632fb8110304b8fb994e45fbbba..8c56da42d3d41549f78500923a89983cc6886ef1 100644 (file)
@@ -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);
     }
index e30b6f1a8d8330a54798b55681e42090e53bcbd2..14ac665f03b647edb23585bbf05c0a6a8625d16d 100644 (file)
@@ -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);