Environment Variables
GROMACS programs may be influenced by the use of
environment variables. First of all, the variables set in
the GMXRC file are essential for running and
compiling GROMACS. Some other useful environment variables are
listed in the following sections. Most environment variables function
by being set in your shell to any non-NULL value. Specific
requirements are described below if other values need to be set. You
should consult the documentation for your shell for instructions on
how to set environment variables in the current shell, or in configuration
files for future shells. Note that requirements for exporting
environment variables to jobs run under batch control systems vary and
you should consult your local documentation for details.
Output Control
- GMX_CONSTRAINTVIR
- Print constraint virial and force virial energy terms.
- GMX_MAXBACKUP
- GROMACS automatically backs up old
copies of files when trying to write a new file of the same
name, and this variable controls the maximum number of
backups that will be made, default 99. If set to 0 it fails to
run if any output file already exists. And if set to -1 it
overwrites any output file without making a backup.
- GMX_NO_QUOTES
- if this is explicitly set, no cool quotes
will be printed at the end of a program.
- GMX_SUPPRESS_DUMP
- prevent dumping of step files during
(for example) blowing up during failure of constraint
algorithms.
- GMX_TPI_DUMP
- dump all configurations to a pdb
file that have an interaction energy less than the value set
in this environment variable.
- GMX_VIEW_XPM
- GMX_VIEW_XVG, GMX_VIEW_EPS and GMX_VIEW_PDB, commands used to
automatically view xvg, xpm, eps
and pdb file types, respectively; they default to xv, xmgrace,
ghostview and rasmol. Set to empty to disable
automatic viewing of a particular file type. The command will
be forked off and run in the background at the same priority
as the GROMACS tool (which might not be what you want).
Be careful not to use a command which blocks the terminal
(e.g. vi), since multiple instances might be run.
- GMX_VIRIAL_TEMPERATURE
- print virial temperature energy term
- 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.
- GMX_LOGO_COLOR
- set display color for logo in gmx view.
- GMX_PRINT_LONGFORMAT
- use long float format when printing
decimal values.
- GMX_COMPELDUMP
- Applies for computational electrophysiology setups
only (see reference manual). The initial structure gets dumped to
pdb file, which allows to check whether multimeric channels have
the correct PBC representation.
Debugging
- GMX_PRINT_DEBUG_LINES
- when set, print debugging info on line numbers.
- 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
0 (never), 1 (every DD phase) or a multiple of nstlist.
- GMX_DD_NST_DUMP_GRID
- number of steps that elapse between dumping
the current DD grid to a PDB file (default 0). This only takes effect
during domain decomposition, so it should typically be
0 (never), 1 (every DD phase) or a multiple of nstlist.
- GMX_DD_DEBUG
- general debugging trigger for every domain
decomposition (default 0, meaning off). Currently only checks
global-local atom index mapping for consistency.
- GMX_DD_NPULSE
- over-ride the number of DD pulses used
(default 0, meaning no over-ride). Normally 1 or 2.
There are a number of extra environment variables like these
that are used in debugging - check the code!
OpenCL management
Currently, several environment variables exist that help customize some aspects
of the OpenCL version of GROMACS. They are mostly related to the runtime
compilation of OpenCL kernels, but they are also used in device selection.
- GMX_OCL_NOGENCACHE
- If set, disable caching for OpenCL kernel builds. Caching is
normally useful so that future runs can re-use the compiled
kernels from previous runs. Currently, caching is always
disabled, until we solve concurrency issues.
- GMX_OCL_NOFASTGEN
- If set, generate and compile all algorithm flavors, otherwise
only the flavor required for the simulation is generated and
compiled.
- GMX_OCL_FASTMATH
- Adds the option cl-fast-relaxed-math to the compiler
options (in the CUDA version this is enabled by default, it is likely that
the same will happen with the OpenCL version soon)
- GMX_OCL_DUMP_LOG
If defined, the OpenCL build log is always written to file.
The file is saved in the current directory with the name
OpenCL_kernel_file_name.build_status where
OpenCL_kernel_file_name is the name of the file containing the
OpenCL source code (usually nbnxn_ocl_kernels.cl) and
build_status can be either SUCCEEDED or FAILED. If this
environment variable is not defined, the default behavior is
the following:
- Debug build: build log is always written to file
- Release build: build log is written to file only in case of errors.
- GMX_OCL_VERBOSE
- If defined, it enables verbose mode for OpenCL kernel build.
Currently available only for NVIDIA GPUs. See GMX_OCL_DUMP_LOG
for details about how to obtain the OpenCL build log.
GMX_OCL_DUMP_INTERM_FILES
If defined, intermediate language code corresponding to the
OpenCL build process is saved to file. Caching has to be
turned off in order for this option to take effect (see
GMX_OCL_NOGENCACHE).
- NVIDIA GPUs: PTX code is saved in the current directory
with the name device_name.ptx
- AMD GPUs: .IL/.ISA files will be created for each OpenCL
kernel built. For details about where these files are
created check AMD documentation for -save-temps compiler
option.
- GMX_OCL_DEBUG
- Use in conjunction with OCL_FORCE_CPU or with an AMD device.
It adds the debug flag to the compiler options (-g).
- GMX_OCL_NOOPT
- Disable optimisations. Adds the option cl-opt-disable to the
compiler options.
- GMX_OCL_FORCE_CPU
- Force the selection of a CPU device instead of a GPU. This
exists only for debugging purposes. Do not expect GROMACS to
function properly with this option on, it is solely for the
simplicity of stepping in a kernel and see what is happening.
- GMX_OCL_NB_ANA_EWALD
- Forces the use of analytical Ewald kernels. Equivalent of
CUDA environment variable GMX_CUDA_NB_ANA_EWALD
- GMX_OCL_NB_TAB_EWALD
- Forces the use of tabulated Ewald kernel. Equivalent
of CUDA environment variable GMX_OCL_NB_TAB_EWALD
- GMX_OCL_NB_EWALD_TWINCUT
- Forces the use of twin-range cutoff kernel. Equivalent of
CUDA environment variable GMX_CUDA_NB_EWALD_TWINCUT
- GMX_DISABLE_OCL_TIMING
- Disables timing for OpenCL operations
- GMX_OCL_FILE_PATH
- Use this parameter to force GROMACS to load the OpenCL
kernels from a custom location. Use it only if you want to
override GROMACS default behavior, or if you want to test
your own kernels.
Analysis and Core Functions
- GMX_QM_ACCURACY
- accuracy in Gaussian L510 (MC-SCF) component program.
- GMX_QM_ORCA_BASENAME
- prefix of tpr files, used in Orca calculations
for input and output file names.
- GMX_QM_CPMCSCF
- when set to a nonzero value, Gaussian QM calculations will
iteratively solve the CP-MCSCF equations.
- GMX_QM_MODIFIED_LINKS_DIR
- location of modified links in Gaussian.
- DSSP
- used by gmx do_dssp to point to the dssp
executable (not just its path).
- GMX_QM_GAUSS_DIR
- directory where Gaussian is installed.
- GMX_QM_GAUSS_EXE
- name of the Gaussian executable.
- GMX_DIPOLE_SPACING
- spacing used by gmx dipoles.
- GMX_MAXRESRENUM
- sets the maximum number of residues to be renumbered by
gmx grompp. A value of -1 indicates all residues should be renumbered.
- GMX_FFRTP_TER_RENAME
- Some force fields (like AMBER) use specific names for N- and C-
terminal residues (NXXX and CXXX) as rtp entries that are normally renamed. Setting
this environment variable disables this renaming.
- GMX_PATH_GZIP
- gunzip executable, used by gmx wham.
- GMX_FONT
- name of X11 font used by gmx view.
- GMXTIMEUNIT
- the time unit used in output files, can be
anything in fs, ps, ns, us, ms, s, m or h.
- GMX_QM_GAUSSIAN_MEMORY
- memory used for Gaussian QM calculation.
- MULTIPROT
- name of the multiprot executable, used by the
contributed program do_multiprot.
- NCPUS
- number of CPUs to be used for Gaussian QM calculation
- GMX_ORCA_PATH
- directory where Orca is installed.
- GMX_QM_SA_STEP
- simulated annealing step size for Gaussian QM calculation.
- GMX_QM_GROUND_STATE
- defines state for Gaussian surface hopping calculation.
- GMX_TOTAL
- name of the total executable used by the contributed
do_shift program.
- GMX_ENER_VERBOSE
- make gmx energy and gmx eneconv
loud and noisy.
- VMD_PLUGIN_PATH
- where to find VMD plug-ins. Needed to be
able to read file formats recognized only by a VMD plug-in.
- VMDDIR
- base path of VMD installation.
- GMX_USE_XMGR
- sets viewer to xmgr (deprecated) instead of xmgrace.