5cc9245aa8a33d617b7d9d0885ccf6ab05d71dd7
[alexxy/gromacs.git] / manual / install.tex
1 %
2 % This file is part of the GROMACS molecular simulation package.
3 %
4 % Copyright (c) 2013,2014, by the GROMACS development team, led by
5 % Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 % and including many others, as listed in the AUTHORS file in the
7 % top-level source directory and at http://www.gromacs.org.
8 %
9 % GROMACS is free software; you can redistribute it and/or
10 % modify it under the terms of the GNU Lesser General Public License
11 % as published by the Free Software Foundation; either version 2.1
12 % of the License, or (at your option) any later version.
13 %
14 % GROMACS is distributed in the hope that it will be useful,
15 % but WITHOUT ANY WARRANTY; without even the implied warranty of
16 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 % Lesser General Public License for more details.
18 %
19 % You should have received a copy of the GNU Lesser General Public
20 % License along with GROMACS; if not, see
21 % http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 % Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
23 %
24 % If you want to redistribute modifications to GROMACS, please
25 % consider that scientific software is very special. Version
26 % control is crucial - bugs must be traceable. We will be happy to
27 % consider code for inclusion in the official distribution, but
28 % derived work must not be called official GROMACS. Details are found
29 % in the README & COPYING files - if they are missing, get the
30 % official version at http://www.gromacs.org.
31 %
32 % To help us fund GROMACS development, we humbly ask that you cite
33 % the research papers on the package. Check out http://www.gromacs.org.
34
35 \chapter{Technical Details}
36 \label{ch:install}
37 \section{Installation}
38 The entire {\gromacs} package is Free Software, licensed under the GNU
39 Lesser General Public License; either version 2.1 of the License, or
40 (at your option) any later version.
41 The main distribution site is our WWW server at {\wwwpage}. 
42
43 The package is mainly distributed as source code, but others provide
44 packages for Linux and Mac. Check your Linux distribution tools
45 (search for gromacs). On Mac OS X the {\bf port} tool will allow you
46 to install a recent version.
47 On the home page you will find all the information you need to 
48 \normindex{install} the package, mailing lists with archives,
49 and several additional on-line resources like contributed topologies, etc.
50 %% The default installation action is simply to unpack the source code and
51 %% then issue:
52 %% \begin{verbatim}
53 %% ./configure
54 %% make
55 %% make install
56 %% \end{verbatim}
57 %% The configuration script should automatically determine the best options
58 %% for your platform, and it will tell you if anything is missing on
59 %% your system. You will also find detailed step-by-step installation
60 %% instructions on the website. There is a \normindex{cmake} based
61 %% installation route as well:
62 %% \begin{verbatim}
63 %% cmake
64 %% make
65 %% make install
66 %% \end{verbatim}
67 %% which is being tested in the wild since {\gromacs} version 4.5.
68
69 \section{Single or Double precision}
70 {\gromacs} can be compiled in either single\index{single
71 precision|see{precision, single}}\index{precision, single} or
72 \pawsindex{double}{precision}. It is very important to note here that
73 single precision is actually mixed precision. Using single precision
74 for all variables would lead to a significant reduction in accuracy.
75 Although in single precision all state vectors, i.e. particle coordinates,
76 velocities and forces, are stored in single precision, critical variables
77 are double precision. A typical example of the latter is the virial,
78 which is a sum over all forces in the system, which have varying signs.
79 In addition, in many parts of the code we managed to avoid double precision
80 for arithmetic, by paying attention to summation order or reorganization
81 of mathematical expressions. The default choice is single precision,
82 but it is easy to turn on double precision by adding the option
83 {\tt -DGMX_DOUBLE=on} to {\tt cmake}. Double precision
84 will be 20 to 100\% slower than single precision depending on the
85 architecture you are running on. Double precision will use somewhat
86 more memory and run input, energy and full-precision trajectory files
87 will be almost twice as large.  SIMD (single-instruction multiple-data)
88 intrinsics non-bonded force and/or energy kernels are available for x86
89 hardware in single and double precision in different SSE and AVX flavors;
90 the minimum requirement is SSE2.
91 IBM Blue Gene Q intrinsics will be available soon. Some other parts of
92 the code, especially PME, also employ x86 SIMD intrinsics. All other
93 hardware will use optimized C kernels. The Verlet non-bonded scheme
94 uses SIMD non-bonded kernels that are C pre-processor macro driven,
95 therefore it is straightforward to implement SIMD acceleration
96 for new architectures; a guide is provided on {\wwwpage}.
97
98 The energies in single precision are accurate up to the last decimal,
99 the last one or two decimals of the forces are non-significant.
100 The virial is less accurate than the forces, since the virial is only one
101 order of magnitude larger than the size of each element in the sum over
102 all atoms (\secref{virial}).
103 In most cases this is not really a problem, since the fluctuations in the
104 virial can be two orders of magnitude larger than the average.
105 Using cut-offs for the Coulomb interactions cause large errors
106 in the energies, forces, and virial.
107 Even when using a reaction-field or lattice-sum method, the errors
108 are larger than, or comparable to, the errors due to the single precision.
109 Since MD is chaotic, trajectories with very similar starting conditions will
110 diverge rapidly, the divergence is faster in single precision than in double
111 precision.
112
113 For most simulations single precision is accurate enough.
114 In some cases double precision is required to get reasonable results:
115 \begin{itemize}
116 \item normal mode analysis,
117 for the conjugate gradient or l-bfgs minimization and the calculation and
118 diagonalization of the Hessian
119 \item long-term energy conservation, especially for large systems
120 \end{itemize}
121
122 \section{Environment Variables}
123 {\gromacs} programs may be influenced by the use of
124 \normindex{environment variables}.  First of all, the variables set in
125 the {\tt \normindex{GMXRC}} file are essential for running and
126 compiling {\gromacs}. Some other useful environment variables are
127 listed in the following sections. Most environment variables function
128 by being set in your shell to any non-NULL value. Specific
129 requirements are described below if other values need to be set. You
130 should consult the documentation for your shell for instructions on
131 how to set environment variables in the current shell, or in config
132 files for future shells. Note that requirements for exporting
133 environment variables to jobs run under batch control systems vary and
134 you should consult your local documentation for details.
135
136 {\bf Output Control}
137
138 \begin{enumerate}
139
140 \item   {\tt GMX_CONSTRAINTVIR}: print constraint virial and force virial energy terms.
141 \item   {\tt GMX_MAXBACKUP}: {\gromacs} automatically backs up old
142         copies of files when trying to write a new file of the same
143         name, and this variable controls the maximum number of
144         backups that will be made, default 99. If set to 0 it fails to
145         run if any output file already exists. And if set to -1 it
146         overwrites any output file without making a backup.
147 \item   {\tt GMX_NO_QUOTES}: if this is explicitly set, no cool quotes
148         will be printed at the end of a program.
149 \item   {\tt GMX_SUPPRESS_DUMP}: prevent dumping of step files during
150         (for example) blowing up during failure of constraint
151         algorithms.
152 \item   {\tt GMX_TPI_DUMP}: dump all configurations to a {\tt .pdb}
153         file that have an interaction energy less than the value set
154         in this environment variable.
155 \item   {\tt GMX_VIEW_XPM}: {\tt GMX_VIEW_XVG}, {\tt
156         GMX_VIEW_EPS} and {\tt GMX_VIEW_PDB}, commands used to
157         automatically view \@ {\tt .xvg}, {\tt .xpm}, {\tt .eps}
158         and {\tt .pdb} file types, respectively; they default to {\tt xv}, {\tt xmgrace},
159         {\tt ghostview} and {\tt rasmol}. Set to empty to disable
160         automatic viewing of a particular file type. The command will
161         be forked off and run in the background at the same priority
162         as the {\gromacs} tool (which might not be what you want).
163         Be careful not to use a command which blocks the terminal
164         ({\eg} {\tt vi}), since multiple instances might be run.
165 \item   {\tt GMX_VIRIAL_TEMPERATURE}: print virial temperature energy term
166 \item   {\tt GMX_LOG_BUFFER}: the size of the buffer for file I/O. When set
167         to 0, all file I/O will be unbuffered and therefore very slow.
168         This can be handy for debugging purposes, because it ensures
169         that all files are always totally up-to-date.
170 \item   {\tt GMX_LOGO_COLOR}: set display color for logo in {\tt \normindex{ngmx}}.
171 \item   {\tt GMX_PRINT_LONGFORMAT}: use long float format when printing
172         decimal values.
173 \item   {\tt GMX_COMPELDUMP}: Applies for computational electrophysiology setups
174         only (see section \ref{sec:compel}). The initial structure gets dumped to 
175         {\tt .pdb} file, which allows to check whether multimeric channels have 
176         the correct PBC representation. 
177 \end{enumerate}
178
179
180 {\bf Debugging}
181
182 \begin{enumerate}
183
184 \item   {\tt GMX_PRINT_DEBUG_LINES}: when set, print debugging info on line numbers.
185 \item   {\tt GMX_DD_NST_DUMP}: number of steps that elapse between dumping
186         the current DD to a PDB file (default 0). This only takes effect
187         during domain decomposition, so it should typically be
188         0 (never), 1 (every DD phase) or a multiple of {\tt nstlist}.
189 \item   {\tt GMX_DD_NST_DUMP_GRID}: number of steps that elapse between dumping
190         the current DD grid to a PDB file (default 0). This only takes effect
191         during domain decomposition, so it should typically be
192         0 (never), 1 (every DD phase) or a multiple of {\tt nstlist}.
193 \item   {\tt GMX_DD_DEBUG}: general debugging trigger for every domain
194         decomposition (default 0, meaning off). Currently only checks
195         global-local atom index mapping for consistency.
196 \item   {\tt GMX_DD_NPULSE}: over-ride the number of DD pulses used
197         (default 0, meaning no over-ride). Normally 1 or 2.
198
199 %\item   There are a number of extra environment variables like these
200 %        that are used in debugging - check the code!
201
202 \end{enumerate}
203
204 {\bf Performance and Run Control}
205
206 \begin{enumerate}
207
208 \item   {\tt GMX_DO_GALACTIC_DYNAMICS}: planetary simulations are made possible (just for fun) by setting
209         this environment variable, which allows setting {\tt epsilon_r = -1} in the {\tt .mdp}
210         file. Normally, {\tt epsilon_r} must be greater than zero to prevent a fatal error.
211         See {\wwwpage} for example input files for a planetary simulation.
212 \item   {\tt GMX_ALLOW_CPT_MISMATCH}: when set, runs will not exit if the
213         ensemble set in the {\tt .tpr} file does not match that of the
214         {\tt .cpt} file.
215 \item   {\tt GMX_CUDA_NB_EWALD_TWINCUT}: force the use of twin-range cutoff kernel even if {\tt rvdw} =
216         {\tt rcoulomb} after PP-PME load balancing. The switch to twin-range kernels is automated,
217         so this variable should be used only for benchmarking.
218 \item   {\tt GMX_CUDA_NB_ANA_EWALD}: force the use of analytical Ewald kernels. Should be used only for benchmarking.
219 \item   {\tt GMX_CUDA_NB_TAB_EWALD}: force the use of tabulated Ewald kernels. Should be used only for benchmarking.
220 \item   {\tt GMX_CUDA_STREAMSYNC}: force the use of cudaStreamSynchronize on ECC-enabled GPUs, which leads
221         to performance loss due to a known CUDA driver bug present in API v5.0 NVIDIA drivers (pre-30x.xx).
222         Cannot be set simultaneously with {\tt GMX_NO_CUDA_STREAMSYNC}.
223 \item   {\tt GMX_CYCLE_ALL}: times all code during runs.  Incompatible with threads.
224 \item   {\tt GMX_CYCLE_BARRIER}: calls MPI_Barrier before each cycle start/stop call.
225 \item   {\tt GMX_DD_ORDER_ZYX}: build domain decomposition cells in the order
226         (z, y, x) rather than the default (x, y, z).
227 \item   {\tt GMX_DD_USE_SENDRECV2}: during constraint and vsite communication, use a pair
228         of {\tt MPI_SendRecv} calls instead of two simultaneous non-blocking calls
229         (default 0, meaning off). Might be faster on some MPI implementations.
230 \item   {\tt GMX_DLB_BASED_ON_FLOPS}: do domain-decomposition dynamic load balancing based on flop count rather than
231         measured time elapsed (default 0, meaning off).
232         This makes the load balancing reproducible, which can be useful for debugging purposes.
233         A value of 1 uses the flops; a value > 1 adds (value - 1)*5\% of noise to the flops to increase the imbalance and the scaling.
234 \item   {\tt GMX_DLB_MAX_BOX_SCALING}: maximum percentage box scaling permitted per domain-decomposition
235         load-balancing step (default 10)
236 \item   {\tt GMX_DD_RECORD_LOAD}: record DD load statistics for reporting at end of the run (default 1, meaning on)
237 \item   {\tt GMX_DD_NST_SORT_CHARGE_GROUPS}: number of steps that elapse between re-sorting of the charge
238         groups (default 1). This only takes effect during domain decomposition, so should typically
239         be 0 (never), 1 (to mean at every domain decomposition), or a multiple of {\tt nstlist}.
240 \item   {\tt GMX_DETAILED_PERF_STATS}: when set, print slightly more detailed performance information
241         to the {\tt .log} file. The resulting output is the way performance summary is reported in versions
242         4.5.x and thus may be useful for anyone using scripts to parse {\tt .log} files or standard output.
243 \item   {\tt GMX_DISABLE_SIMD_KERNELS}: disables architecture-specific SIMD-optimized (SSE2, SSE4.1, AVX, etc.)
244         non-bonded kernels thus forcing the use of plain C kernels.
245 \item   {\tt GMX_DISABLE_CUDA_TIMING}: timing of asynchronously executed GPU operations can have a
246         non-negligible overhead with short step times. Disabling timing can improve performance in these cases.
247 \item   {\tt GMX_DISABLE_GPU_DETECTION}: when set, disables GPU detection even if {\tt \normindex{mdrun}} was compiled
248         with GPU support.
249 \item   {\tt GMX_DISABLE_PINHT}: disable pinning of consecutive threads to physical cores when using
250         Intel hyperthreading. Controlled with {\tt \normindex{mdrun} -nopinht} and thus this environment
251         variable will likely be removed.
252 \item   {\tt GMX_DISRE_ENSEMBLE_SIZE}: the number of systems for distance restraint ensemble
253         averaging. Takes an integer value.
254 \item   {\tt GMX_EMULATE_GPU}: emulate GPU runs by using algorithmically equivalent CPU reference code instead of
255         GPU-accelerated functions. As the CPU code is slow, it is intended to be used only for debugging purposes.
256         The behavior is automatically triggered if non-bonded calculations are turned off using {\tt GMX_NO_NONBONDED}
257         case in which the non-bonded calculations will not be called, but the CPU-GPU transfer will also be skipped.
258 \item   {\tt GMX_ENX_NO_FATAL}: disable exiting upon encountering a corrupted frame in an {\tt .edr}
259         file, allowing the use of all frames up until the corruption.
260 \item   {\tt GMX_FORCE_UPDATE}: update forces when invoking {\tt \normindex{mdrun} -rerun}.
261 \item   {\tt GMX_GPU_ID}: set in the same way as the {\tt \normindex{mdrun}} option {\tt -gpu_id}, {\tt GMX_GPU_ID}
262         allows the user to specify different GPU id-s, which can be useful for selecting different
263         devices on different compute nodes in a cluster.  Cannot be used in conjunction with {\tt -gpu_id}.
264 \item   {\tt GMX_IGNORE_FSYNC_FAILURE_ENV}: allow {\tt \normindex{mdrun}} to continue even if
265         a file is missing.
266 \item   {\tt GMX_LJCOMB_TOL}: when set to a floating-point value, overrides the default tolerance of
267         1e-5 for force-field floating-point parameters.
268 \item   {\tt GMX_MAX_MPI_THREADS}: sets the maximum number of MPI-threads that {\tt \normindex{mdrun}}
269         can use.
270 \item   {\tt GMX_MAXCONSTRWARN}: if set to -1, {\tt \normindex{mdrun}} will
271         not exit if it produces too many LINCS warnings.
272 \item   {\tt GMX_NB_GENERIC}: use the generic C kernel.  Should be set if using
273         the group-based cutoff scheme and also sets {\tt GMX_NO_SOLV_OPT} to be true,
274         thus disabling solvent optimizations as well.
275 \item   {\tt GMX_NB_MIN_CI}: neighbor list balancing parameter used when running on GPU. Sets the
276         target minimum number pair-lists in order to improve multi-processor load-balance for better
277         performance with small simulation systems. Must be set to a positive integer, the default value
278         is optimized for NVIDIA Fermi and Kepler GPUs, therefore changing it is not necessary for
279         normal usage, but it can be useful on future architectures.
280 \item   {\tt GMX_NBLISTCG}: use neighbor list and kernels based on charge groups.
281 \item   {\tt GMX_NBNXN_CYCLE}: when set, print detailed neighbor search cycle counting.
282 \item   {\tt GMX_NBNXN_EWALD_ANALYTICAL}: force the use of analytical Ewald non-bonded kernels,
283         mutually exclusive of {\tt GMX_NBNXN_EWALD_TABLE}.
284 \item   {\tt GMX_NBNXN_EWALD_TABLE}: force the use of tabulated Ewald non-bonded kernels,
285         mutually exclusive of {\tt GMX_NBNXN_EWALD_ANALYTICAL}.
286 \item   {\tt GMX_NBNXN_SIMD_2XNN}: force the use of 2x(N+N) SIMD CPU non-bonded kernels,
287         mutually exclusive of {\tt GMX_NBNXN_SIMD_4XN}.
288 \item   {\tt GMX_NBNXN_SIMD_4XN}: force the use of 4xN SIMD CPU non-bonded kernels,
289         mutually exclusive of {\tt GMX_NBNXN_SIMD_2XNN}.
290 \item   {\tt GMX_NO_ALLVSALL}: disables optimized all-vs-all kernels.
291 \item   {\tt GMX_NO_CART_REORDER}: used in initializing domain decomposition communicators. Rank reordering
292         is default, but can be switched off with this environment variable.
293 \item   {\tt GMX_NO_CUDA_STREAMSYNC}: the opposite of {\tt GMX_CUDA_STREAMSYNC}. Disables the use of the
294         standard cudaStreamSynchronize-based GPU waiting to improve performance when using CUDA driver API
295         ealier than v5.0 with ECC-enabled GPUs.
296 \item   {\tt GMX_NO_INT}, {\tt GMX_NO_TERM}, {\tt GMX_NO_USR1}: disable signal handlers for SIGINT,
297         SIGTERM, and SIGUSR1, respectively.
298 \item   {\tt GMX_NO_NODECOMM}: do not use separate inter- and intra-node communicators.
299 \item   {\tt GMX_NO_NONBONDED}: skip non-bonded calculations; can be used to estimate the possible
300         performance gain from adding a GPU accelerator to the current hardware setup -- assuming that this is
301         fast enough to complete the non-bonded calculations while the CPU does bonded force and PME computation.
302 \item   {\tt GMX_NO_PULLVIR}: when set, do not add virial contribution to COM pull forces.
303 \item   {\tt GMX_NOCHARGEGROUPS}: disables multi-atom charge groups, {\ie} each atom 
304         in all non-solvent molecules is assigned its own charge group.
305 \item   {\tt GMX_NOPREDICT}: shell positions are not predicted.
306 \item   {\tt GMX_NO_SOLV_OPT}: turns off solvent optimizations; automatic if {\tt GMX_NB_GENERIC}
307         is enabled.
308 \item   {\tt GMX_NSCELL_NCG}: the ideal number of charge groups per neighbor searching grid cell is hard-coded
309         to a value of 10. Setting this environment variable to any other integer value overrides this hard-coded
310         value.
311 \item   {\tt GMX_PME_NTHREADS}: set the number of OpenMP or PME threads (overrides the number guessed by 
312         {\tt \normindex{mdrun}}.
313 \item   {\tt GMX_PME_P3M}: use P3M-optimized influence function instead of smooth PME B-spline interpolation.
314 \item   {\tt GMX_PME_THREAD_DIVISION}: PME thread division in the format ``x y z'' for all three dimensions. The
315         sum of the threads in each dimension must equal the total number of PME threads (set in 
316         {\tt GMX_PME_NTHREADS}).
317 \item   {\tt GMX_PMEONEDD}: if the number of domain decomposition cells is set to 1 for both x and y, 
318         decompose PME in one dimension.
319 \item   {\tt GMX_REQUIRE_SHELL_INIT}: require that shell positions are initiated.
320 \item   {\tt GMX_REQUIRE_TABLES}: require the use of tabulated Coulombic
321         and van der Waals interactions.
322 \item   {\tt GMX_SCSIGMA_MIN}: the minimum value for soft-core $\sigma$. {\bf Note} that this value is set
323         using the {\tt sc-sigma} keyword in the {\tt .mdp} file, but this environment variable can be used
324         to reproduce pre-4.5 behavior with respect to this parameter.
325 \item   {\tt GMX_TPIC_MASSES}: should contain multiple masses used for test particle insertion into a cavity.
326         The center of mass of the last atoms is used for insertion into the cavity.
327 \item   {\tt GMX_USE_GRAPH}: use graph for bonded interactions.
328 \item   {\tt GMX_VERLET_BUFFER_RES}: resolution of buffer size in Verlet cutoff scheme.  The default value is
329         0.001, but can be overridden with this environment variable.
330 \item   {\tt GMX_VERLET_SCHEME}: convert from group-based to Verlet cutoff scheme, even if the {\tt cutoff_scheme} is
331         not set to use Verlet in the {\tt .mdp} file. It is unnecessary since the {\tt -testverlet} option of
332         {\tt \normindex{mdrun}} has the same functionality, but it is maintained for backwards compatibility.
333 \item   {\tt MPIRUN}: the {\tt mpirun} command used by {\tt \normindex{g_tune_pme}}.
334 \item   {\tt MDRUN}: the {\tt \normindex{mdrun}} command used by {\tt \normindex{g_tune_pme}}.
335 \item   {\tt GMX_NSTLIST}: sets the default value for {\tt nstlist}, preventing it from being tuned during
336         {\tt \normindex{mdrun}} startup when using the Verlet cutoff scheme.
337 \item   {\tt GMX_USE_TREEREDUCE}: use tree reduction for nbnxn force reduction. Potentially faster for large number of 
338         OpenMP threads (if memory locality is important).
339
340 \end{enumerate}
341
342 {\bf Analysis and Core Functions}
343
344 \begin{enumerate}
345
346 \item   {\tt GMX_QM_ACCURACY}: accuracy in Gaussian L510 (MC-SCF) component program.
347 \item   {\tt GMX_QM_ORCA_BASENAME}: prefix of {\tt .tpr} files, used in Orca calculations
348         for input and output file names.
349 \item   {\tt GMX_QM_CPMCSCF}: when set to a nonzero value, Gaussian QM calculations will
350         iteratively solve the CP-MCSCF equations.
351 \item   {\tt GMX_QM_MODIFIED_LINKS_DIR}: location of modified links in Gaussian.
352 \item   {\tt DSSP}: used by {\tt \normindex{do_dssp}} to point to the {\tt dssp}
353         executable (not just its path).
354 \item   {\tt GMX_QM_GAUSS_DIR}: directory where Gaussian is installed.
355 \item   {\tt GMX_QM_GAUSS_EXE}: name of the Gaussian executable.
356 \item   {\tt GMX_DIPOLE_SPACING}: spacing used by {\tt \normindex{g_dipoles}}.
357 \item   {\tt GMX_MAXRESRENUM}: sets the maximum number of residues to be renumbered by
358         {\tt \normindex{grompp}}. A value of -1 indicates all residues should be renumbered.
359 \item   {\tt GMX_FFRTP_TER_RENAME}: Some force fields (like AMBER) use specific names for N- and C-
360         terminal residues (NXXX and CXXX) as {\tt .rtp} entries that are normally renamed. Setting
361         this environment variable disables this renaming.
362 \item   {\tt GMX_PATH_GZIP}: {\tt gunzip} executable, used by {\tt \normindex{g_wham}}.
363 \item   {\tt GMX_FONT}: name of X11 font used by {\tt \normindex{ngmx}}.
364 \item   {\tt GMXTIMEUNIT}: the time unit used in output files, can be
365         anything in fs, ps, ns, us, ms, s, m or h.
366 \item   {\tt GMX_QM_GAUSSIAN_MEMORY}: memory used for Gaussian QM calculation.
367 \item   {\tt MULTIPROT}: name of the {\tt multiprot} executable, used by the
368         contributed program {\tt \normindex{do_multiprot}}.
369 \item   {\tt NCPUS}: number of CPUs to be used for Gaussian QM calculation
370 \item   {\tt GMX_ORCA_PATH}: directory where Orca is installed.
371 \item   {\tt GMX_QM_SA_STEP}: simulated annealing step size for Gaussian QM calculation.
372 \item   {\tt GMX_QM_GROUND_STATE}: defines state for Gaussian surface hopping calculation.
373 \item   {\tt GMX_TOTAL}: name of the {\tt total} executable used by the contributed
374         {\tt \normindex{do_shift}} program.
375 \item   {\tt GMX_ENER_VERBOSE}: make {\tt \normindex{g_energy}} and {\tt \normindex{eneconv}}
376         loud and noisy.
377 \item   {\tt VMD_PLUGIN_PATH}: where to find VMD plug-ins. Needed to be
378         able to read file formats recognized only by a VMD plug-in.
379 \item   {\tt VMDDIR}: base path of VMD installation.
380 \item   {\tt GMX_USE_XMGR}: sets viewer to {\tt xmgr} (deprecated) instead of {\tt xmgrace}.
381
382 \end{enumerate}
383
384 \section{Running {\gromacs} in parallel}
385 By default {\gromacs} will be compiled with the built-in thread-MPI library.
386 This library handles communication between threads on a single
387 node more efficiently than using an external MPI library.
388 To run {\gromacs} in parallel over multiple nodes, e.g. on a cluster,
389 you need to configure and compile {\gromacs} with an external
390 MPI library. All supercomputers are shipped with MPI libraries optimized for 
391 that particular platform, and there are several good free MPI
392 implementations; OpenMPI is usually a good choice.
393 Note that MPI and thread-MPI support are mutually incompatible.
394
395 In addition to MPI parallelization, {\gromacs} supports also
396 thread-parallelization through \normindex{OpenMP}. MPI and OpenMP parallelization
397 can be combined, which results in, so called, hybrid parallelization. It can offer
398 better performance and scaling in some cases.
399
400 See {\wwwpage} for details on the use and performance of the different
401 parallelization schemes.
402
403 \section{Running {\gromacs} on \normindex{GPUs}}
404 As of version 4.6, {\gromacs} has native GPU support through CUDA.
405 Note that {\gromacs} only off-loads the most compute intensive parts
406 to the GPU, currently the non-bonded interactions, and does all other
407 parts of the MD calculation on the CPU. The requirements for the CUDA code
408 are an Nvidia GPU with compute capability $\geq 2.0$, i.e. at
409 least Fermi class.
410 In many cases {\tt cmake} can auto-detect GPUs and the support will be
411 configured automatically. To be sure GPU support is configured, pass
412 the {\tt -DGMX_GPU=on} option to {\tt cmake}. The actual use of GPUs
413 is decided at run time by {\tt mdrun}, depending on the availability
414 of (suitable) GPUs and on the run input settings. A binary compiled
415 with GPU support can also run CPU only simulations. Use {\tt mdrun -nb cpu}
416 to force a simulation to run on CPUs only. Only simulations with the Verlet
417 cut-off scheme will run on a GPU. To test performance of old tpr files
418 with GPUs, you can use the {\tt -testverlet} option of {\tt mdrun},
419 but as this doesn't do the full parameter consistency check of {\tt grommp},
420 you should not use this option for production simulations.
421 Getting good performance with {\gromacs} on GPUs is easy,
422 but getting best performance can be difficult.
423 Please check {\wwwpage} for up to date information on GPU usage.
424
425 % LocalWords:  Opteron Itanium PowerPC Altivec Athlon Fortran virial bfgs Nasm
426 % LocalWords:  diagonalization Cygwin MPI Multi GMXHOME extern gmx tx pid buf
427 % LocalWords:  bufsize txs rx rxs init nprocs fp msg GMXRC DUMPNL BUFS GMXNPRI
428 % LocalWords:  unbuffered SGI npri mdrun covar nmeig setenv XPM XVG EPS
429 % LocalWords:  PDB xvg xpm eps pdb xmgrace ghostview rasmol GMXTIMEUNIT fs dssp
430 % LocalWords:  mpi distclean ing mpirun goofus doofus fred topol np
431 % LocalWords:  internet gromacs DGMX cmake SIMD intrinsics AVX PME XN
432 % LocalWords:  Verlet pre config CONSTRAINTVIR MAXBACKUP TPI ngmx mdp
433 % LocalWords:  LONGFORMAT DISTGCT CPT tpr cpt CUDA EWALD TWINCUT rvdw
434 % LocalWords:  rcoulomb STREAMSYNC cudaStreamSynchronized ECC GPUs sc
435 % LocalWords:  ZYX PERF GPU PINHT hyperthreading DISRE NONBONDED ENX
436 % LocalWords:  edr ENER gpu FSYNC ENV LJCOMB TOL MAXCONSTRWARN LINCS
437 % LocalWords:  SOLV NBLISTCG NBNXN XNN ALLVSALL cudaStreamSynchronize
438 % LocalWords:  USR SIGINT SIGTERM SIGUSR NODECOMM intra PULLVIR multi
439 % LocalWords:  NOCHARGEGROUPS NOPREDICT NSCELL NCG NTHREADS OpenMP CP
440 % LocalWords:  PMEONEDD Coulombic der Waals SCSIGMA TPIC GMXNPRIALL
441 % LocalWords:  GOMP KMP pme NSTLIST ENVVAR nstlist startup OMP NUM ps
442 % LocalWords:  ACC SCF BASENAME Orca CPMCSCF MCSCF DEVEL EXE GKRWIDTH
443 % LocalWords:  MAXRESRENUM grompp FFRTP TER NXXX CXXX rtp GZIP gunzip
444 % LocalWords:  GMXFONT ns MEM MULTIPROT multiprot NCPUS CPUs OPENMM
445 % LocalWords:  PLUGIN OpenMM plugins SASTEP TESTMC eneconv VMD VMDDIR
446 % LocalWords:  GMX_USE_XMGR xmgr parallelization nt online Nvidia nb cpu
447 % LocalWords:  testverlet grommp