Merge release-4-5-patches into release-4-6
authorRoland Schulz <roland@utk.edu>
Fri, 16 Mar 2012 01:24:37 +0000 (21:24 -0400)
committerRoland Schulz <roland@utk.edu>
Fri, 16 Mar 2012 01:26:29 +0000 (21:26 -0400)
Change-Id: I5a7f695d49e3b7d1a5b4a0aeb099e5d3cc100faa

28 files changed:
1  2 
cmake/gmxCFlags.cmake
share/html/online/mdp_opt.html
src/gmxlib/checkpoint.c
src/gmxlib/gmxfio.c
src/gmxlib/wman.c
src/kernel/gmxcheck.c
src/kernel/md.c
src/kernel/md_openmm.c
src/kernel/mdrun.c
src/mdlib/domdec.c
src/tools/gmx_anaeig.c
src/tools/gmx_chi.c
src/tools/gmx_cluster.c
src/tools/gmx_current.c
src/tools/gmx_density.c
src/tools/gmx_editconf.c
src/tools/gmx_enemat.c
src/tools/gmx_genbox.c
src/tools/gmx_genpr.c
src/tools/gmx_h2order.c
src/tools/gmx_helix.c
src/tools/gmx_membed.c
src/tools/gmx_order.c
src/tools/gmx_potential.c
src/tools/gmx_spatial.c
src/tools/gmx_tcaf.c
src/tools/gmx_tune_pme.c
src/tools/mk_angndx.c

diff --combined cmake/gmxCFlags.cmake
index 3642f594e281f4832495016b54816ccd9a54dad1,1a57f3a810d610f3935cb5c4567c038b4e14a672..6449944af3e7c12bffa05aa12cc83ece4f6fd3b5
@@@ -30,12 -30,7 +30,12 @@@ MACRO(gmx_c_flags
  
      # gcc
      if(CMAKE_COMPILER_IS_GNUCC)
 +        #flags are added in reverse order and -Wno* need to appear after -Wall
 +        if(NOT GMX_OPENMP)
 +            GMX_TEST_CFLAG(CFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CFLAGS)
 +        endif()
          GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused" GMXC_CFLAGS)
 +        GMX_TEST_CFLAG(CFLAGS_WARN "-Wextra -Wno-missing-field-initializers -Wno-sign-compare" GMXC_CFLAGS)
          # new in gcc 4.5
          GMX_TEST_CFLAG(CFLAGS_EXCESS_PREC "-fexcess-precision=fast" GMXC_CFLAGS)
          GMX_TEST_CFLAG(CFLAGS_COPT "-fomit-frame-pointer -finline-functions -funroll-all-loops" 
      endif()
      # g++
      if(CMAKE_COMPILER_IS_GNUCXX)
 +        if(NOT GMX_OPENMP)
 +            GMX_TEST_CFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
 +        endif()
          GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall -Wno-unused" GMXC_CXXFLAGS)
 +        GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wextra -Wno-missing-field-initializers -Wno-sign-compare" GMXC_CXXFLAGS)
        # new in gcc 4.5
          GMX_TEST_CXXFLAG(CXXFLAGS_EXCESS_PREC "-fexcess-precision=fast" 
                            GMXC_CXXFLAGS)
@@@ -65,9 -56,6 +65,9 @@@
              GMX_TEST_CFLAG(CFLAGS_SSE2 "-msse2" GMXC_CFLAGS_RELEASE)
              GMX_TEST_CFLAG(CFLAGS_X86 "-mtune=core2" GMXC_CFLAGS_RELEASE)
              GMX_TEST_CFLAG(CFLAGS_IA64 "-mtune=itanium2" GMXC_CFLAGS_RELEASE)
 +            if(NOT GMX_OPENMP)
 +                GMX_TEST_CFLAG(CFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CFLAGS)
 +            endif()
          else()
              GMX_TEST_CFLAG(CFLAGS_SSE2 "/arch:SSE2" GMXC_CFLAGS_RELEASE)
              GMX_TEST_CFLAG(CFLAGS_X86 "/Qip" GMXC_CFLAGS_RELEASE)
@@@ -82,9 -70,6 +82,9 @@@
              GMX_TEST_CXXFLAG(CXXFLAGS_X86 "-mtune=core2" GMXC_CXXFLAGS_RELEASE)
              GMX_TEST_CXXFLAG(CXXFLAGS_IA64 "-mtune=itanium2" 
                                GMXC_CXXFLAGS_RELEASE)
 +            if(NOT GMX_OPENMP)
 +                GMX_TEST_CFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
 +            endif()
          else()
              GMX_TEST_CXXFLAG(CXXFLAGS_SSE2 "/arch:SSE2" GMXC_CXXFLAGS_RELEASE)
              GMX_TEST_CXXFLAG(CXXFLAGS_X86 "/Qip" GMXC_CXXFLAGS_RELEASE)
          GMX_TEST_CFLAG(CXXFLAGS_WARN "/wd4273" GMXC_CXXFLAGS)
      endif()
  
+     if (CMAKE_C_COMPILER_ID MATCHES "Clang")
+         if(NOT GMX_OPENMP)
+             GMX_TEST_CFLAG(CFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CFLAGS)
+         endif()
+         GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused" GMXC_CFLAGS)
+     endif()
+     if (CMAKE_C_COMPILER_ID MATCHES "Clang")
+         if(NOT GMX_OPENMP)
+             GMX_TEST_CFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
+         endif()
+         GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall -Wno-unused" GMXC_CXXFLAGS)
+     endif()
  
      # now actually set the flags:
      # C
index 533323351746310038e1bf18a8bb0b04167ec4e3,74863725fe33b31db0d7c037177fa1928b96f3a8..530e7f60f4d94852233384072e9737627a304046
@@@ -29,35 -29,34 +29,35 @@@ IF YOU'RE NOT SURE ABOUT WHAT YOU'RE DO
  <li><A HREF="#general"><b>General remarks</b></A>
  <p> </p>
  <li><A HREF="#pp"><b>preprocessing</b></A> (include, define)
 -<li><A HREF="#run"><b>run control</b></A> (integrator, tinit, dt, nsteps, init_step, comm_mode, nstcomm, comm_grps)
 -<li><A HREF="#ld"><b>langevin dynamics</b></A> (bd_fric, ld_seed)
 +<li><A HREF="#run"><b>run control</b></A> (integrator, tinit, dt, nsteps, init-step, comm-mode, nstcomm, comm-grps)
 +<li><A HREF="#ld"><b>langevin dynamics</b></A> (bd-fric, ld-seed)
  <li><A HREF="#em"><b>energy minimization</b></A> (emtol, emstep, nstcgsteep)
  <li><a HREF="#xmdrun"><b>shell molecular dynamics</b></a>(emtol,niter,fcstep)
  <li><a HREF="#tpi"><b>test particle insertion</b></a>(rtpi)
 -<li><A HREF="#out"><b>output control</b></A> (nstxout, nstvout, nstfout, nstlog, nstcalcenergy, nstenergy, nstxtcout, xtc_precision, xtc_grps, energygrps)
 -<li><A HREF="#nl"><b>neighbor searching</b></A> (nstlist, ns_type, pbc, periodic_molecules, rlist, rlistlong)
 -<li><A HREF="#el"><b>electrostatics</b></A> (coulombtype, rcoulomb_switch, rcoulomb, epsilon_r, epsilon_rf)
 -<li><A HREF="#vdw"><b>VdW</b></A> (vdwtype, rvdw_switch, rvdw, DispCorr)
 -<li><A HREF="#table"><b>tables</b></A> (table-extension, energygrp_table)
 -<li><A HREF="#ewald"><b>Ewald</b></A> (fourierspacing, fourier_nx, fourier_ny, fourier_nz, pme_order, ewald_rtol, ewald_geometry, epsilon_surface, optimize_fft)
 -<li><A HREF="#tc"><b>Temperature coupling</b></A> (tcoupl, nsttcouple, tc_grps, tau_t, ref_t)
 +<li><A HREF="#out"><b>output control</b></A> (nstxout, nstvout, nstfout, nstlog, nstcalcenergy, nstenergy, nstxtcout, xtc-precision, xtc-grps, energygrps)
 +<li><A HREF="#nl"><b>neighbor searching</b></A> (nstlist, ns-type, pbc, periodic-molecules, rlist, rlistlong)
 +<li><A HREF="#el"><b>electrostatics</b></A> (coulombtype, rcoulomb-switch, rcoulomb, epsilon-r, epsilon-rf)
 +<li><A HREF="#vdw"><b>VdW</b></A> (vdwtype, rvdw-switch, rvdw, DispCorr)
 +<li><A HREF="#table"><b>tables</b></A> (table-extension, energygrp-table)
 +<li><A HREF="#ewald"><b>Ewald</b></A> (fourierspacing, fourier-nx, fourier-ny, fourier-nz, pme-order, ewald-rtol, ewald-geometry, epsilon-surface, optimize-fft)
 +<li><A HREF="#tc"><b>Temperature coupling</b></A> (tcoupl, nsttcouple, tc-grps, tau-t, ref-t)
  <li><A HREF="#pc"><b>Pressure coupling</b></A> (pcoupl, pcoupltype,
 -  nstpcouple, tau_p, compressibility, ref_p, refcoord_scaling)
 -<li><A HREF="#sa"><b>simulated annealing</b></A> (annealing, annealing_npoints, annealing_time, annealing_temp)
 -<li><A HREF="#vel"><b>velocity generation</b></A> (gen_vel, gen_temp, gen_seed)
 -<li><A HREF="#bond"><b>bonds</b></A> (constraints, constraint_algorithm, continuation, shake_tol, lincs_order, lincs_iter, lincs_warnangle, morse)
 -<li><A HREF="#egexcl"><b>Energy group exclusions</b></A> (energygrp_excl)
 -<li><A HREF="#walls"><b>Walls</b></A> (nwall, wall_type, wall_r_linpot, wall_atomtype,
 -wall_density, wall_ewald_zfac)
 +  nstpcouple, tau-p, compressibility, ref-p, refcoord-scaling)
 +<li><A HREF="#sa"><b>simulated annealing</b></A> (annealing, annealing-npoints, annealing-time, annealing-temp)
 +<li><A HREF="#vel"><b>velocity generation</b></A> (gen-vel, gen-temp, gen-seed)
 +<li><A HREF="#bond"><b>bonds</b></A> (constraints, constraint-algorithm, continuation, shake-tol, lincs-order, lincs-iter, lincs-warnangle, morse)
 +<li><A HREF="#egexcl"><b>Energy group exclusions</b></A> (energygrp-excl)
 +<li><A HREF="#walls"><b>Walls</b></A> (nwall, wall-type, wall-r-linpot, wall-atomtype,
 +wall-density, wall-ewald-zfac)
  <li><A HREF="#pull"><b>COM pulling</b></A> (pull, ...)
 -<li><A HREF="#nmr"><b>NMR refinement</b></A> (disre, disre_weighting, disre_mixed, disre_fc, disre_tau, nstdisreout, orire, orire_fc, orire_tau, orire_fitgrp, nstorireout)
 -<li><A HREF="#free"><b>Free Energy calculations</b></A> (free_energy, init_lambda, delta_lambda, sc_alpha, sc_power, sc_sigma, couple-moltype, couple-lambda0, couple-lambda1, couple-intramol)
 -<li><A HREF="#neq"><b>Non-equilibrium MD</b></A> (acc_grps, accelerate, freezegrps, freezedim, cos_acceleration, deform)
 -<li><A HREF="#ef"><b>Electric fields</b></A> (E_x, E_xt, E_y, E_yt, E_z, E_zt )
 +<li><A HREF="#nmr"><b>NMR refinement</b></A> (disre, disre-weighting, disre-mixed, disre-fc, disre-tau, nstdisreout, orire, orire-fc, orire-tau, orire-fitgrp, nstorireout)
 +<li><A HREF="#free"><b>Free Energy calculations</b></A> (free-energy, init-lambda, delta-lambda, sc-alpha, sc-power, sc-sigma, couple-moltype, couple-lambda0, couple-lambda1, couple-intramol)
 +<li><A HREF="#neq"><b>Non-equilibrium MD</b></A> (acc-grps, accelerate, freezegrps, freezedim, cos-acceleration, deform)
 +<li><A HREF="#ef"><b>Electric fields</b></A> (E-x, E-xt, E-y, E-yt, E-z, E-zt )
  <li><A HREF="#qmmm"><b>Mixed quantum/classical dynamics</b></A> (QMMM, QMMM-grps, QMMMscheme, QMmethod, QMbasis, QMcharge, Qmmult, CASorbitals, CASelectrons, SH)
 -<li><A HREF="#gbsa"><b>Implicit solvent</b></A> (implicit_solvent, gb_algorithm, nstgbradii, rgbradii, gb_epsilon_solvent, gb_saltconc, gb_obc_alpha, gb_obc_beta, gb_obc_gamma, gb_dielectric_offset, sa_algorithm, sa_surface_tension)   
 -<li><A HREF="#user"><b>User defined thingies</b></A> (user1_grps, user2_grps, userint1, userint2, userint3, userint4, userreal1, userreal2, userreal3, userreal4)
 +<li><A HREF="#gbsa"><b>Implicit solvent</b></A> (implicit-solvent, gb-algorithm, nstgbradii, rgbradii, gb-epsilon-solvent, gb-saltconc, gb-obc-alpha, gb-obc-beta, gb-obc-gamma, gb-dielectric-offset, sa-algorithm, sa-surface-tension)   
 +<li><A HREF="#adress"><b>AdResS settings</b></A> (adress, adress_type, adress_const_wf, adress_ex_width, adress_hy_width, adress_ex_forcecap, adress_interface_correction, adress_site, adress_reference_coords, adress_tf_grp_names, adress_cg_grp_names)
 +<li><A HREF="#user"><b>User defined thingies</b></A> (user1-grps, user2-grps, userint1, userint2, userint3, userint4, userreal1, userreal2, userreal3, userreal4)
  <li><A HREF="#idx"><b>Index</b></A>
  </ul>
  </P>
@@@ -137,34 -136,35 +137,34 @@@ coordinates needs to be constrained twi
  Depending on the computational cost of the force calculation,
  this can take a significant part of the simulation time.
  The temperature for one or more groups of atoms
 -(<b><A HREF="#tc">tc_grps</A></b>)
 -is set with <b><A HREF="#tc">ref_t</A></b> [K],
 +(<b><A HREF="#tc">tc-grps</A></b>)
 +is set with <b><A HREF="#tc">ref-t</A></b> [K],
  the inverse friction constant for each group is set with
 -<b><A HREF="#tc">tau_t</A></b> [ps].
 +<b><A HREF="#tc">tau-t</A></b> [ps].
  The parameter <b><A HREF="#tc">tcoupl</A></b> is ignored.
 -The random generator is initialized with <b><A HREF="#ld">ld_seed</A></b>.
 -When used as a thermostat, an appropriate value for <b>tau_t</b> is 2 ps,
 +The random generator is initialized with <b><A HREF="#ld">ld-seed</A></b>.
 +When used as a thermostat, an appropriate value for <b>tau-t</b> is 2 ps,
  since this results in a friction that is lower than the internal friction
  of water, while it is high enough to remove excess heat
  (unless <b>cut-off</b> or <b>reaction-field</b> electrostatics is used).
  NOTE: temperature deviations decay twice as fast as with
 -a Berendsen thermostat with the same <b>tau_t</b>.</dd>
 +a Berendsen thermostat with the same <b>tau-t</b>.</dd>
  <dt><b>sd1</b></dt>
  <dd> An efficient leap-frog stochastic dynamics integrator.
  This integrator is equivalent to <b>sd</b>, except that it requires
 -only one Gaussian random number and one constraint step.
 -This integrator is less accurate.
 -For water the relative error in the temperature with this integrator
 -is 0.5 <b>delta_t</b>/<b>tau_t</b>, but for other systems it can be higher.
 -Use with care and check the temperature.</dd>
 +only one Gaussian random number and one constraint step and is therefore
 +significantly faster. Without constraints the accuracy is the same as <b>sd</b>.
 +With constraints the accuracy is significantly reduced, so then <b>sd</b>
 +will often be preferred.</dd>
  <dt><b>bd</b></dt>
  <dd>An Euler integrator for Brownian or position Langevin dynamics, the
  velocity is the force divided by a friction coefficient 
 -(<b><A HREF="#ld">bd_fric</A></b> [amu ps<sup>-1</sup>])
 -plus random thermal noise (<b><A HREF="#tc">ref_t</A></b>).
 -When <b><A HREF="#ld">bd_fric</A></b><tt>=0</tt>, the friction coefficient for each
 -particle is calculated as mass/<b><A HREF="#tc">tau_t</A></b>, as for the
 +(<b><A HREF="#ld">bd-fric</A></b> [amu ps<sup>-1</sup>])
 +plus random thermal noise (<b><A HREF="#tc">ref-t</A></b>).
 +When <b><A HREF="#ld">bd-fric</A></b><tt>=0</tt>, the friction coefficient for each
 +particle is calculated as mass/<b><A HREF="#tc">tau-t</A></b>, as for the
  integrator <tt>sd</tt>.
 -The random generator is initialized with <b><A HREF="#ld">ld_seed</A></b>.</dd>
 +The random generator is initialized with <b><A HREF="#ld">ld-seed</A></b>.</dd>
  
  <dt><b>steep</b></dt>
  <dd>A <!--Idx-->steepest descent<!--EIdx--> algorithm for energy
@@@ -203,9 -203,9 +203,9 @@@ around a the same random location usin
  which is only allowed for single-atom molecules).
  Since neighborlist construction is expensive, one can perform several
  extra insertions with the same list almost for free.
 -The random seed is set with <b><A HREF="#ld">ld_seed</A></b>.
 +The random seed is set with <b><A HREF="#ld">ld-seed</A></b>.
  The temperature for the Boltzmann weighting is set with
 -<b><A HREF="#tc">ref_t</A></b>, this should match the temperature
 +<b><A HREF="#tc">ref-t</A></b>, this should match the temperature
  of the simulation of the original trajectory.
  Dispersion correction is implemented correctly for tpi.
  All relevant quantities are written to the file specified with
@@@ -239,16 -239,16 +239,16 @@@ Parallel tpic gives identical results t
  <tt>sd</tt> and <tt>bd</tt>)</dd>
  <dt><b>nsteps: (0)</b></dt>
  <dd>maximum number of steps to integrate or minimize, -1 is no maximum</dd>
 -<dt><b>init_step: (0)</b></dt>
 +<dt><b>init-step: (0)</b></dt>
  <dd>The starting step.
 -The time at an step i in a run is calculated as: t = <tt>tinit</tt> + <tt>dt</tt>*(<tt>init_step</tt> + i).
 -The free-energy lambda is calculated as: lambda = <tt>init_lambda</tt> + <tt>delta_lambda</tt>*(<tt>init_step</tt> + i).
 +The time at an step i in a run is calculated as: t = <tt>tinit</tt> + <tt>dt</tt>*(<tt>init-step</tt> + i).
 +The free-energy lambda is calculated as: lambda = <tt>init-lambda</tt> + <tt>delta-lambda</tt>*(<tt>init-step</tt> + i).
  Also non-equilibrium MD parameters can depend on the step number.
  Thus for exact restarts or redoing part of a run it might be necessary to
 -set <tt>init_step</tt> to the step number of the restart frame.
 +set <tt>init-step</tt> to the step number of the restart frame.
  <tt>tpbconv</tt> does this automatically.
  </dd>
 -<dt><b>comm_mode:</b></dt>
 +<dt><b>comm-mode:</b></dt>
  <dd><dl compact>
  <dt><b>Linear</b></dt>
  <dd>Remove center of mass translation</dd>
  </dl></dd>
  <dt><b>nstcomm: (10) [steps]</b></dt>
  <dd>frequency for center of mass motion removal</dd>
 -<dt><b>comm_grps:</b></dt>
 +<dt><b>comm-grps:</b></dt>
  <dd>group(s) for center of mass motion removal, default is the whole system</dd>
  </dl>
  
  <h3><!--Idx-->Langevin dynamics<!--EIdx--></h3>
  
  <dl>
 -<dt><b>bd_fric: (0) [amu ps<sup>-1</sup>]</b></dt>
 +<dt><b>bd-fric: (0) [amu ps<sup>-1</sup>]</b></dt>
  <dd>Brownian dynamics friction coefficient.
 -When <b>bd_fric</b><tt>=0</tt>, the friction coefficient for each
 -particle is calculated as mass/<b><A HREF="#tc">tau_t</A></b>.</dd>
 -<dt><b>ld_seed: (1993) [integer]</b></dt>
 +When <b>bd-fric</b><tt>=0</tt>, the friction coefficient for each
 +particle is calculated as mass/<b><A HREF="#tc">tau-t</A></b>.</dd>
 +<dt><b>ld-seed: (1993) [integer]</b></dt>
  <dd>used to initialize random generator for thermal noise
  for stochastic and Brownian dynamics.
 -When <b>ld_seed</b> is set to -1, the seed is calculated from the process ID.
 +When <b>ld-seed</b> is set to -1, the seed is calculated from the process ID.
  When running BD or SD on multiple processors, each processor uses a seed equal
 -to <b>ld_seed</b> plus the processor number.</dd>
 +to <b>ld-seed</b> plus the processor number.</dd>
  </dl>
  
  <A NAME="em"><br>
@@@ -371,9 -371,9 +371,9 @@@ so <tt>g_energy</tt> can report exac
  energy averages and fluctuations also when <b>nstenergy</b><tt>&gt;1</tt></dd>
  <dt><b>nstxtcout: (0) [steps]</b></dt>
  <dd>frequency to write coordinates to xtc trajectory</dd>
 -<dt><b>xtc_precision: (1000) [real]</b></dt>
 +<dt><b>xtc-precision: (1000) [real]</b></dt>
  <dd>precision to write to xtc trajectory</dd>
 -<dt><b>xtc_grps:</b></dt>
 +<dt><b>xtc-grps:</b></dt>
  <dd>group(s) to write to xtc trajectory, default the whole system is written
  (if <b>nstxtcout</b> &gt; 0)</dd>
  <dt><b>energygrps:</b></dt>
@@@ -415,7 -415,7 +415,7 @@@ while 99.99% of the particles are fine
  </dd>
  </dl></dd>
  
 -<dt><b>ns_type:</b></dt>
 +<dt><b>ns-type:</b></dt>
  <dd><dl compact>
  <dt><b>grid</b></dt>
  <dd>Make a grid in the box and only check atoms in neighboring grid
@@@ -434,11 -434,11 +434,11 @@@ every <b>nstlist</b> steps.</dd
  <dd>Use no periodic boundary conditions, ignore the box.
  To simulate without cut-offs, set all cut-offs to 0 and <b>nstlist</b><tt>=0</tt>.
  For best performance without cut-offs, use <b>nstlist</b><tt>=0</tt>,
 -<b>ns_type</b><tt>=simple</tt>
 +<b>ns-type</b><tt>=simple</tt>
  and particle decomposition instead of domain decomposition.</dd>
  <dt><b>xy</b></dt>
  <dd>Use periodic boundary conditions in x and y directions only.
 -This works only with <b>ns_type</b><tt>=grid</tt> and can be used
 +This works only with <b>ns-type</b><tt>=grid</tt> and can be used
  in combination with <b><a href="#walls">walls</a></b>.
  Without walls or with only one wall the system size is infinite
  in the z direction. Therefore pressure coupling or Ewald summation
@@@ -446,7 -446,7 +446,7 @@@ methods can not be used
  These disadvantages do not apply when two walls are used.</dd>
  </dl></dd>
  
 -<dt><b>periodic_molecules:</b></dt>
 +<dt><b>periodic-molecules:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>molecules are finite, fast molecular PBC can be used</dd>
@@@ -486,7 -486,7 +486,7 @@@ The real-space cut-off <b>rcoulomb</b> 
  Use e.g. <b>rlist</b><tt>=0.9</tt>, <b>rcoulomb</b><tt>=0.9</tt>. The highest magnitude of
  wave vectors used in reciprocal space is controlled by <b>fourierspacing</b>.
  The relative accuracy of direct/reciprocal space
 -is controlled by <b>ewald_rtol</b>.
 +is controlled by <b>ewald-rtol</b>.
  <br>
  NOTE: Ewald scales as O(N<sup>3/2</sup>)
  and is thus extremely slow for large systems. It is included mainly for
@@@ -496,7 -496,7 +496,7 @@@ reference - in most cases PME will perf
  <dd>Fast Particle-Mesh Ewald electrostatics. Direct space is similar
  to the Ewald sum, while the reciprocal part is performed with
  FFTs. Grid dimensions are controlled with <b>fourierspacing</b> and the
 -interpolation order with <b>pme_order</b>. With a grid spacing of 0.1
 +interpolation order with <b>pme-order</b>. With a grid spacing of 0.1
  nm and cubic interpolation the electrostatic forces have an accuracy
  of 2-3*10<sup>-4</sup>. Since the error from the vdw-cutoff is larger than this you
  might try 0.15 nm. When running in parallel the interpolation
@@@ -517,23 -517,23 +517,23 @@@ PPPM through a small modification of th
  <dt><b><!--Idx-->Reaction-Field<!--EIdx--></b></dt>
  <dd>Reaction field with Coulomb cut-off <b>rcoulomb</b>,
  where <b>rcoulomb</b> &ge; <b>rlist</b>.
 -The dielectric constant beyond the cut-off is <b>epsilon_rf</b>.
 -The dielectric constant can be set to infinity by setting <b>epsilon_rf</b><tt>=0</tt>.</dd>
 +The dielectric constant beyond the cut-off is <b>epsilon-rf</b>.
 +The dielectric constant can be set to infinity by setting <b>epsilon-rf</b><tt>=0</tt>.</dd>
  
  <dt><b>Generalized-Reaction-Field</b></dt>
  <dd>Generalized reaction field with Coulomb cut-off <b>rcoulomb</b>,
  where <b>rcoulomb</b> &ge; <b>rlist</b>.
 -The dielectric constant beyond the cut-off is <b>epsilon_rf</b>.
 +The dielectric constant beyond the cut-off is <b>epsilon-rf</b>.
  The ionic strength is computed from the number of charged 
  (i.e. with non zero charge) <!--Idx-->charge group<!--EIdx-->s.
  The temperature for the GRF potential is set with 
 -<b><A HREF="#tc">ref_t</A></b> [K].</dd>
 +<b><A HREF="#tc">ref-t</A></b> [K].</dd>
  
  <dt><b>Reaction-Field-zero</b></dt>
  <dd>In GROMACS normal reaction-field electrostatics leads to bad
  energy conservation. <b>Reaction-Field-zero</b> solves this
  by making the potential zero beyond the cut-off. It can only
 -be used with an infinite dielectric constant (<b>epsilon_rf=0</b>),
 +be used with an infinite dielectric constant (<b>epsilon-rf=0</b>),
  because only for that value the force vanishes at the cut-off.
  <b>rlist</b> should be 0.1 to 0.3 nm larger than <b>rcoulomb</b>
  to accommodate for the size of charge groups and diffusion
@@@ -617,17 -617,17 +617,17 @@@ i.e. both to the user supplied functio
  </dl></dd>
  
  <A NAME="el2">
 -<dt><b>rcoulomb_switch: (0) [nm]</b></dt>
 +<dt><b>rcoulomb-switch: (0) [nm]</b></dt>
  <dd>where to start switching the Coulomb potential</dd>
  
  <dt><b>rcoulomb: (1) [nm]</b></dt>
  <dd>distance for the Coulomb <!--Idx-->cut-off<!--EIdx--></dd>
  
 -<dt><b>epsilon_r: (1)</b></dt>
 +<dt><b>epsilon-r: (1)</b></dt>
  <dd>The relative <!--Idx-->dielectric constant<!--EIdx-->.
  A value of 0 means infinity.</dd>
  
 -<dt><b>epsilon_rf: (1)</b></dt>
 +<dt><b>epsilon-rf: (0)</b></dt>
  <dd>The relative dielectric constant of the reaction field.
  This is only used with reaction-field electrostatics.
  A value of 0 means infinity.</dd>
@@@ -645,7 -645,7 +645,7 @@@ VdW cut-off <b>rvdw</b>
  where <b>rvdw</b> <tt>&ge;</tt> <b>rlist</b>.</dd>
  <dt><b>Shift</b></dt>
  <dd>The LJ (not Buckingham) potential is decreased over the whole
 -range and the forces decay smoothly to zero between <b>rvdw_switch</b>
 +range and the forces decay smoothly to zero between <b>rvdw-switch</b>
  and <b>rvdw</b>.  The neighbor search cut-off <b>rlist</b> should be
  0.1 to 0.3 nm larger than <b>rvdw</b> to accommodate for the size of
  charge groups and diffusion between neighbor list
@@@ -653,7 -653,7 +653,7 @@@ updates.</dd
  
  <dt><b>Switch</b></dt>
  <dd>The LJ (not Buckingham)
 -potential is normal out to <b>rvdw_switch</b>, after which it is switched
 +potential is normal out to <b>rvdw-switch</b>, after which it is switched
  off to reach zero at <b>rvdw</b>. Both the potential and force functions
  are continuously smooth, but be aware that all switch functions will give rise
  to a bulge (increase) in the force (since we are switching the potential).
@@@ -675,7 -675,7 +675,7 @@@ When <b>coulombtype</b> is not set to <
  for <tt>f</tt> and <tt>-f'</tt> are ignored.</dd>
  </dl></dd>
  
 -<dt><b>rvdw_switch: (0) [nm]</b></dt>
 +<dt><b>rvdw-switch: (0) [nm]</b></dt>
  <dd>where to start switching the LJ potential</dd>
  
  <dt><b>rvdw: (1) [nm]</b></dt>
@@@ -707,14 -707,14 +707,14 @@@ for the lookup tables for the 1-4 inter
  which are always tabulated irrespective of the use of
  tables for the non-bonded interactions. </dd>
  
 -<dt><b>energygrp_table:</b></dt>
 +<dt><b>energygrp-table:</b></dt>
  <dd>When user tables are used for electrostatics and/or VdW,
  here one can give pairs of energy groups for which seperate
  user tables should be used.
  The two energy groups will be appended to the table file name,
  in order of their definition in <b>energygrps</b>, seperated by underscores.
  For example, if <tt>energygrps = Na Cl Sol</tt>
 -and <tt>energygrp_table = Na Na Na Cl</tt>, <tt>mdrun</tt> will read
 +and <tt>energygrp-table = Na Na Na Cl</tt>, <tt>mdrun</tt> will read
  <tt>table_Na_Na.xvg</tt> and <tt>table_Na_Cl.xvg</tt> in addition
  to the normal <tt>table.xvg</tt> which will be used for all other
  energy group pairs.
  For ordinary Ewald the spacing times the box dimensions determines the
  highest magnitude to use in each direction. In all cases
  each direction can be overridden by entering a non-zero value for
 -<b>fourier_n[xyz]</b>.
 +<b>fourier-n[xyz]</b>.
  For optimizing the relative load of the particle-particle interactions
  and the mesh part of PME it is useful to know that
  the accuracy of the electrostatics remains nearly constant
  when the Coulomb cut-off and the PME grid spacing are scaled
  by the same factor.</dd>
  
 -<dt><b>fourier_nx (0) ; fourier_ny (0) ; fourier_nz: (0)</b></dt>
 +<dt><b>fourier-nx (0) ; fourier-ny (0) ; fourier-nz: (0)</b></dt>
  <dd>Highest magnitude of wave vectors in reciprocal space when using Ewald.</dd>
  <dd>Grid size when using PPPM or PME. These values override
  <b>fourierspacing</b> per direction. The best choice is powers of
  2, 3, 5 and 7. Avoid large primes.</dd>
  
 -<dt><b>pme_order (4)</b></dt>
 +<dt><b>pme-order (4)</b></dt>
  <dd>Interpolation order for PME. 4 equals cubic interpolation. You might try
  6/8/10 when running in parallel and simultaneously decrease grid dimension.</dd>
  
 -<dt><b>ewald_rtol (1e-5)</b></dt>
 +<dt><b>ewald-rtol (1e-5)</b></dt>
  <dd>The relative strength of the Ewald-shifted direct potential at
 -<b>rcoulomb</b> is given by <b>ewald_rtol</b>.
 +<b>rcoulomb</b> is given by <b>ewald-rtol</b>.
  Decreasing this will give a more accurate direct sum,
  but then you need more wave vectors for the reciprocal sum.</dd>
  
 -<dt><b>ewald_geometry: (3d)</b></dt>
 +<dt><b>ewald-geometry: (3d)</b></dt>
  <dd><dl compact>
  <dt><b>3d</b></dt>
  <dd>The Ewald sum is performed in all three dimensions.</dd>
@@@ -767,7 -767,7 +767,7 @@@ the slab height is usually ok
  and use this option.</dd>
  </dl></dd>
  
 -<dt><b>epsilon_surface: (0)</b></dt>
 +<dt><b>epsilon-surface: (0)</b></dt>
  <dd>This controls the dipole correction to the Ewald summation in 3D. The
  default value of zero means it is turned off. Turn it on by setting it to the value 
  of the relative permittivity of the imaginary surface around your infinite system. Be
@@@ -775,7 -775,7 +775,7 @@@ careful - you shouldn't use this if yo
  This value does not affect the slab 3DC variant of the long range corrections.</dd>
  
  
 -<dt><b>optimize_fft:</b></dt>
 +<dt><b>optimize-fft:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>Don't calculate the optimal FFT plan for the grid at startup.</dd>
@@@ -798,13 -798,13 +798,13 @@@ at start.</dd
  <dd>No temperature coupling.</dd>
  <dt><b>berendsen</b></dt>
  <dd>Temperature coupling with a Berendsen-thermostat to a bath with
 -temperature <b>ref_t</b> [K], with time constant <b>tau_t</b> [ps].
 +temperature <b>ref-t</b> [K], with time constant <b>tau-t</b> [ps].
  Several groups can be coupled separately, these are specified in the
 -<b>tc_grps</b> field separated by spaces.</dd>
 +<b>tc-grps</b> field separated by spaces.</dd>
  <dt><b>nose-hoover</b></dt>
  <dd>Temperature coupling using a Nose-Hoover extended
  ensemble. The reference temperature and coupling groups are selected
 -as above, but in this case <b>tau_t</b> [ps] controls the period
 +as above, but in this case <b>tau-t</b> [ps] controls the period
  of the temperature fluctuations at equilibrium, which is slightly
  different from a relaxation time.
  For NVT simulations the conserved energy quantity is written
@@@ -813,10 -813,10 +813,10 @@@ to energy and log file.</dd
  <dd>Temperature coupling using velocity rescaling with a stochastic term
  (JCP 126, 014101).
  This thermostat is similar to Berendsen coupling, with the same scaling
 -using <b>tau_t</b>, but the stochastic term ensures that a proper
 +using <b>tau-t</b>, but the stochastic term ensures that a proper
  canonical ensemble is generated. The random seed is set with
 -<b><A HREF="#ld">ld_seed</A></b>.
 -This thermostat works correctly even for <b>tau_t</b><tt>=0</tt>.
 +<b><A HREF="#ld">ld-seed</A></b>.
 +This thermostat works correctly even for <b>tau-t</b><tt>=0</tt>.
  For NVT simulations the conserved energy quantity is written
  to the energy and log file.</dd>
  </dl>
@@@ -828,13 -828,13 +828,13 @@@ For velocity Verlet integrators <b>nstt
  </dd>
  <dt><b>nh-chain-length (10)</b></dt>
  <dd>the number of chained Nose-Hoover thermostats for velocity Verlet integrators, the leap-frog <b>md</b> integrator only supports 1.  Data for the NH chain variables is not printed to the .edr, but can be using the <tt>GMX_NOSEHOOVER_CHAINS</tt> environment variable</dd>
 -<dt><b>tc_grps:</b></dt>
 +<dt><b>tc-grps:</b></dt>
  <dd>groups to couple separately to temperature bath</dd>
 -<dt><b>tau_t: [ps]</b></dt>
 -<dd>time constant for coupling (one for each group in <b>tc_grps</b>),
 +<dt><b>tau-t: [ps]</b></dt>
 +<dd>time constant for coupling (one for each group in <b>tc-grps</b>),
  -1 means no temperature coupling</dd>
 -<dt><b>ref_t: [K]</b></dt>
 -<dd>reference temperature for coupling (one for each group in <b>tc_grps</b>)</dd>
 +<dt><b>ref-t: [K]</b></dt>
 +<dd>reference temperature for coupling (one for each group in <b>tc-grps</b>)</dd>
  </dl>
  
  <A NAME="pc"><br>
  <dd>No pressure coupling. This means a fixed box size.</dd>
  <dt><b>berendsen</b></dt>
  <dd>Exponential relaxation pressure coupling with time constant
 -<b>tau_p</b> [ps]. The box is scaled every timestep. It has been
 +<b>tau-p</b> [ps]. The box is scaled every timestep. It has been
  argued that this does not yield a correct thermodynamic ensemble,
  but it is the most efficient way to scale a box at the beginning
  of a run.</dd>
  <dd>Extended-ensemble pressure coupling where the box vectors are
  subject to an equation of motion. The equation of motion for the atoms
  is coupled to this. No instantaneous scaling takes place.  As for
 -Nose-Hoover temperature coupling the time constant <b>tau_p</b> [ps]
 +Nose-Hoover temperature coupling the time constant <b>tau-p</b> [ps]
  is the period of pressure fluctuations at equilibrium. This is
  probably a better method when you want to apply pressure scaling
  during data collection, but beware that you can get very large
@@@ -869,7 -869,7 +869,7 @@@ steps of the GROMACS implementation fo
  <dt><b>MTTK</b></dt>
  <dd>Martyna-Tuckerman-Tobias-Klein implementation, only useable with <b>md-vv</b>
  or <b>md-vv-avek</b>, very similar to Parrinello-Rahman.  
 -As for Nose-Hoover temperature coupling the time constant <b>tau_p</b>
 +As for Nose-Hoover temperature coupling the time constant <b>tau-p</b>
  [ps] is the period of pressure fluctuations at equilibrium. This is
  probably a better method when you want to apply pressure scaling
  during data collection, but beware that you can get very large
@@@ -880,9 -880,9 +880,9 @@@ oscillations if you are starting from 
  <dt><b>pcoupltype:</b></dt>
  <dd><dl compact>
  <dt><b>isotropic</b></dt>
 -<dd>Isotropic pressure coupling with time constant <b>tau_p</b> [ps].
 +<dd>Isotropic pressure coupling with time constant <b>tau-p</b> [ps].
  The compressibility and reference pressure are set with
 -<b>compressibility</b> [bar<sup>-1</sup>] and <b>ref_p</b> [bar], one
 +<b>compressibility</b> [bar<sup>-1</sup>] and <b>ref-p</b> [bar], one
  value is needed.</dd>
  <dt><b>semiisotropic</b></dt>
  <dd>Pressure coupling which is isotropic in the <tt>x</tt> and <tt>y</tt> direction,
@@@ -900,7 -900,7 +900,7 @@@ of the simulation box.</dd
  <dd>Surface tension coupling for surfaces parallel to the xy-plane.
  Uses normal pressure coupling for the <tt>z</tt>-direction, while the surface tension
  is coupled to the <tt>x/y</tt> dimensions of the box.
 -The first <b>ref_p</b> value is the reference surface tension times
 +The first <b>ref-p</b> value is the reference surface tension times
  the number of surfaces [bar nm], 
  the second value is the reference <tt>z</tt>-pressure [bar].
  The two <b>compressibility</b> [bar<sup>-1</sup>] values are the compressibility
@@@ -917,14 -917,14 +917,14 @@@ unless <b>nstlist</b> &le;0, then a val
  For velocity Verlet integrators <b>nstpcouple</b> is set to 1.</dd>
  </dd>
  
 -<dt><b>tau_p: (1) [ps]</b></dt>
 +<dt><b>tau-p: (1) [ps]</b></dt>
  <dd>time constant for coupling</dd>
  <dt><b>compressibility: [bar<sup>-1</sup>]</b></dt>
  <dd>compressibility (NOTE: this is now really in bar<sup>-1</sup>)
  For water at 1 atm and 300 K the compressibility is 4.5e-5 [bar<sup>-1</sup>].</dd>
 -<dt><b>ref_p: [bar]</b></dt>
 +<dt><b>ref-p: [bar]</b></dt>
  <dd>reference pressure for coupling</dd>
 -<dt><b>refcoord_scaling:</b></dt>
 +<dt><b>refcoord-scaling:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>The reference coordinates for position restraints are not modified.
@@@ -956,17 -956,17 +956,17 @@@ Simulated annealing is controlled separ
  </dd>
  </dl>
  
 -<dt><b>annealing_npoints:</b></dt>
 +<dt><b>annealing-npoints:</b></dt>
  <dd>A list with the number of annealing reference/control points used for 
  each temperature group. Use 0 for groups that are not annealed. The number of entries should equal the number of temperature groups.</dd>
  
 -<dt><b>annealing_time:</b></dt>
 -<dd>List of times at the annealing reference/control points for each group. If you are using periodic annealing, the times will be used modulo the last value, i.e. if the values are 0, 5, 10, and 15, the coupling will restart at the 0ps value after 15ps, 30ps, 45ps, etc. The number of entries should equal the sum of the numbers given in <tt>annealing_npoints</tt>.</dd>
 +<dt><b>annealing-time:</b></dt>
 +<dd>List of times at the annealing reference/control points for each group. If you are using periodic annealing, the times will be used modulo the last value, i.e. if the values are 0, 5, 10, and 15, the coupling will restart at the 0ps value after 15ps, 30ps, 45ps, etc. The number of entries should equal the sum of the numbers given in <tt>annealing-npoints</tt>.</dd>
  
 -<dt><b>annealing_temp:</b></dt>
 -<dd>List of temperatures at the annealing reference/control points for each group. The number of entries should equal the sum of the numbers given in <tt>annealing_npoints</tt>.</dd>
 +<dt><b>annealing-temp:</b></dt>
 +<dd>List of temperatures at the annealing reference/control points for each group. The number of entries should equal the sum of the numbers given in <tt>annealing-npoints</tt>.</dd>
  <br>
 -Confused? OK, let's use an example. Assume you have two temperature groups, set the group selections to <tt>annealing = single periodic</tt>, the number of points of each group to <tt>annealing_npoints = 3 4</tt>, the times to <tt>annealing_time = 0 3 6 0 2 4 6</tt> and finally temperatures to <tt>annealing_temp = 298 280 270 298 320 320 298</tt>.
 +Confused? OK, let's use an example. Assume you have two temperature groups, set the group selections to <tt>annealing = single periodic</tt>, the number of points of each group to <tt>annealing-npoints = 3 4</tt>, the times to <tt>annealing-time = 0 3 6 0 2 4 6</tt> and finally temperatures to <tt>annealing-temp = 298 280 270 298 320 320 298</tt>.
  The first group will be coupled to 298K at 0ps, but the reference temperature will drop linearly to reach 280K at 3ps, and then linearly between 280K and 270K from 3ps to 6ps. After this is stays constant, at 270K. The second group is coupled to 298K at 0ps, it increases linearly to 320K at 2ps, where it stays constant until 4ps. Between 4ps and 6ps it decreases to 298K, and then it starts over with the same pattern again, i.e. rising linearly from 298K to 320K between 6ps and 8ps. Check the summary printed by <tt>grompp</tt> if you are unsure!
  </dl>
  
  <h3>Velocity generation</h3>
  
  <dl>
 -<dt><b>gen_vel:</b></dt>
 +<dt><b>gen-vel:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd> Do not generate velocities. The velocities are set to zero
  when there are no velocities in the input structure file.</dd>
  <dt><b>yes</b></dt>
  <dd>Generate velocities in <tt>grompp</tt> according to a Maxwell distribution at
 -temperature <b>gen_temp</b> [K], with random seed <b>gen_seed</b>. 
 +temperature <b>gen-temp</b> [K], with random seed <b>gen-seed</b>. 
  This is only meaningful with integrator <b><A HREF="#run">md</A></b>.</dd>
  </dl></dd>
 -<dt><b>gen_temp: (300) [K]</b></dt>
 +<dt><b>gen-temp: (300) [K]</b></dt>
  <dd>temperature for Maxwell distribution</dd>
 -<dt><b>gen_seed: (173529) [integer]</b></dt>
 +<dt><b>gen-seed: (173529) [integer]</b></dt>
  <dd>used to initialize random generator for random velocities,
 -when <b>gen_seed</b> is set to -1, the seed is calculated from
 +when <b>gen-seed</b> is set to -1, the seed is calculated from
  the process ID number.
  </dl>
  
@@@ -1016,27 -1016,27 +1016,27 @@@ to bond-constraints.</dd
  <dd>Convert all bonds and angles to bond-constraints.</dd>
  </dl>
  
 -<dt><b>constraint_algorithm:</b></dt>
 +<dt><b>constraint-algorithm:</b></dt>
  <dd><dl compact>
  <dt><b><!--Idx-->LINCS<!--EIdx--></b></dt>
  <dd>LINear Constraint Solver.
  With domain decomposition the parallel version P-LINCS is used.
  The accuracy in set with
 -<b>lincs_order</b>, which sets the number of matrices in the expansion
 +<b>lincs-order</b>, which sets the number of matrices in the expansion
  for the matrix inversion.
  After the matrix inversion correction the algorithm does
  an iterative correction to compensate for lengthening due to rotation.
  The number of such iterations can be controlled with
 -<b>lincs_iter</b>. The root mean square relative constraint deviation
 +<b>lincs-iter</b>. The root mean square relative constraint deviation
  is printed to the log file every <b>nstlog</b> steps.
 -If a bond rotates more than <b>lincs_warnangle</b> [degrees] in one step, 
 +If a bond rotates more than <b>lincs-warnangle</b> [degrees] in one step, 
  a warning will be printed both to the log file and to <TT>stderr</TT>. 
  LINCS should not be used with coupled angle constraints.
  </dd>
  <dt><b><!--Idx-->SHAKE<!--EIdx--></b></dt>
  <dd>SHAKE is slightly slower and less stable than LINCS, but does work with 
  angle constraints.
 -The relative tolerance is set with <b>shake_tol</b>, 0.0001 is a good value
 +The relative tolerance is set with <b>shake-tol</b>, 0.0001 is a good value
  for ``normal'' MD. SHAKE does not support constraints between atoms
  on different nodes, thus it can not be used with domain decompositon
  when inter charge-group constraints are present.
@@@ -1044,7 -1044,7 +1044,7 @@@ SHAKE can not be used with energy minim
  </dd>
  </dl></dd>
  <dt><b>continuation:</b></dt>
 -<dd>This option was formerly known as <tt>unconstrained_start</tt>.</dd>
 +<dd>This option was formerly known as <tt>unconstrained-start</tt>.</dd>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>apply constraints to the start configuration and reset shells</dd>
@@@ -1054,9 -1054,9 +1054,9 @@@ and do not reset shells, useful for exa
  </dl></dd>
  
  <A NAME="bond2">
 -<dt><b>shake_tol: (0.0001)</b></dt>
 +<dt><b>shake-tol: (0.0001)</b></dt>
  <dd>relative tolerance for SHAKE</dd>
 -<dt><b>lincs_order: (4)</b></dt>
 +<dt><b>lincs-order: (4)</b></dt>
  <dd>Highest order in the expansion of the constraint coupling matrix.
  When constraints form triangles, an additional expansion of the same
  order is applied on top of the normal expansion only for the couplings
@@@ -1065,16 -1065,16 +1065,16 @@@ For ``normal'' MD simulations an order 
  needed for large time-steps with virtual sites or BD.
  For accurate energy minimization an order of 8 or more might be required.
  With domain decomposition, the cell size is limited by the distance
 -spanned by <b>lincs_order</b>+1 constraints. When one wants to scale
 -further than this limit, one can decrease <b>lincs_order</b> and increase
 -<b>lincs_iter</b>, since the accuracy does not deteriorate
 -when (1+<b>lincs_iter</b>)*<b>lincs_order</b> remains constant.</dd>
 -<dt><b>lincs_iter: (1)</b></dt>
 +spanned by <b>lincs-order</b>+1 constraints. When one wants to scale
 +further than this limit, one can decrease <b>lincs-order</b> and increase
 +<b>lincs-iter</b>, since the accuracy does not deteriorate
 +when (1+<b>lincs-iter</b>)*<b>lincs-order</b> remains constant.</dd>
 +<dt><b>lincs-iter: (1)</b></dt>
  <dd>Number of iterations to correct for rotational lengthening in LINCS.
  For normal runs a single step is sufficient, but for NVE
  runs where you want to conserve energy accurately or for accurate
  energy minimization you might want to increase it to 2.
 -<dt><b>lincs_warnangle: </b>(30) [degrees]</dt>
 +<dt><b>lincs-warnangle: </b>(30) [degrees]</dt>
  <dd>maximum angle that a bond can rotate before LINCS will complain</dd>
  
  <dt><b>morse:</b></dt>
  <hr>
  <h3>Energy group <!--Idx-->exclusions<!--EIdx--></h3>
  <dl>
 -<dt><b>energygrp_excl: </b></dt>
 +<dt><b>energygrp-excl: </b></dt>
  <dd>Pairs of energy groups for which all non-bonded interactions are
  excluded. An example: if you have two energy groups <tt>Protein</tt>
  and <tt>SOL</tt>, specifying
  <br>
 -<tt>energygrp_excl&nbsp;=&nbsp;Protein&nbsp;Protein&nbsp;&nbsp;SOL&nbsp;SOL</tt>
 +<tt>energygrp-excl&nbsp;=&nbsp;Protein&nbsp;Protein&nbsp;&nbsp;SOL&nbsp;SOL</tt>
  <br>
  would give only the non-bonded interactions between the protein and the
  solvent. This is especially useful for speeding up energy calculations with
  <dl>
  <dt><b>nwall: 0</b></dt>
  <dd>When set to <b>1</b> there is a wall at <tt>z=0</tt>, when set to <b>2</b>
 -there is also a wall at <tt>z=z_box</tt>. Walls can only be used with <b>pbc=xy</b>.
 +there is also a wall at <tt>z=z-box</tt>. Walls can only be used with <b>pbc=xy</b>.
  When set to <b>2</b> pressure coupling and Ewald summation can be used
  (it is usually best to use semiisotropic pressure coupling with
  the <tt>x/y</tt> compressibility set to 0, as otherwise the surface area will change).
 -Walls interact wit the rest of the system through an optional <tt>wall_atomtype</tt>.
 +Walls interact wit the rest of the system through an optional <tt>wall-atomtype</tt>.
  Energy groups <tt>wall0</tt> and <tt>wall1</tt> (for <b>nwall=2</b>) are
  added automatically to monitor the interaction of energy groups
  with each wall.
  The <A HREF="#run">center of mass motion removal</A> will be turned
  off in the <tt>z</tt>-direction.</dd>
 -<dt><b>wall_atomtype:</b></dt>
 +<dt><b>wall-atomtype:</b></dt>
  <dd>the atom type name in the force field for each wall. 
  By (for example) defining a special wall atom type in the topology with its 
  own combination rules, this allows for independent tuning of the interaction 
  of each atomtype with the walls.</dd>
 -<dt><b>wall_type:</b></dt>
 +<dt><b>wall-type:</b></dt>
  <dd><dl compact>
  <dt><b>9-3</b></dt>
  <dd>LJ integrated over the volume behind the wall: 9-3 potential</dd>
  <dt><b>12-6</b></dt>
  <dd>direct LJ potential with the z distance from the wall</dd>
  <dt><b>table</b></dt><dd>user defined potentials indexed with the z distance from the wall, the tables are read analogously to
 -the <b><A HREF="#table">energygrp_table</A></b> option,
 +the <b><A HREF="#table">energygrp-table</A></b> option,
  where the first name is for a ``normal'' energy group and the second name
  is <tt>wall0</tt> or <tt>wall1</tt>,
  only the dispersion and repulsion columns are used</dd>
  </dl></dd>
 -<dt><b>wall_r_linpot: -1 (nm)</b></dt>
 +<dt><b>wall-r-linpot: -1 (nm)</b></dt>
  <dd>Below this distance from the wall the potential is continued
  linearly and thus the force is constant. Setting this option to
  a postive value is especially useful for equilibration when some atoms
  are beyond a wall.
 -When the value is &le;0 (&lt;0 for <b>wall_type=table</b>),
 +When the value is &le;0 (&lt;0 for <b>wall-type=table</b>),
  a fatal error is generated when atoms are beyond a wall.
  </dd>
 -<dt><b>wall_density: [nm<sup>-3</sup>/nm<sup>-2</sup>]</b></dt>
 +<dt><b>wall-density: [nm<sup>-3</sup>/nm<sup>-2</sup>]</b></dt>
  <dd>the number density of the atoms for each wall for wall types
  <b>9-3</b> and <b>10-4</b>
 -<dt><b>wall_ewald_zfac: 3</b></dt>
 +<dt><b>wall-ewald-zfac: 3</b></dt>
  <dd>The scaling factor for the third box vector for Ewald summation only,
  the minimum is 2.
  Ewald summation can only be used with <b>nwall=2</b>, where one
 -should use <b><A HREF="#ewald">ewald_geometry</A><tt>=3dc</tt></b>.
 +should use <b><A HREF="#ewald">ewald-geometry</A><tt>=3dc</tt></b>.
  The empty layer in the box serves to decrease the unphysical Coulomb
  interaction between periodic images.
  </dl>
@@@ -1175,20 -1175,20 +1175,20 @@@ between the reference group and one or 
  between the reference group and one or more groups.
  The setup is identical to the option <b>umbrella</b>, except for the fact
  that a rigid constraint is applied instead of a harmonic potential.</dd>
 -<dt><b>constant_force</b></dt>
 +<dt><b>constant-force</b></dt>
  <dd>Center of mass pulling using a linear potential and therefore
  a constant force. For this option there is no reference position
 -and therefore the parameters <b>pull_init</b> and <b>pull_rate</b>
 +and therefore the parameters <b>pull-init</b> and <b>pull-rate</b>
  are not used.</dd>
  </dl></dd>
 -<dt><b>pull_geometry:</b></dt>
 +<dt><b>pull-geometry:</b></dt>
  <dd><dl compact>
  <dt><b>distance</b></dt>
  <dd>Pull along the vector connecting the two groups.
 -Components can be selected with <b>pull_dim</b>.</dd>
 +Components can be selected with <b>pull-dim</b>.</dd>
  <dt><b>direction</b></dt>
 -<dd>Pull in the direction of <b>pull_vec</b>.</dd>
 -<dt><b>direction_periodic</b></dt>
 +<dd>Pull in the direction of <b>pull-vec</b>.</dd>
 +<dt><b>direction-periodic</b></dt>
  <dd>As <b>direction</b>, but allows the distance to be larger than
  half the box size. With this geometry the box should not be dynamic
  (e.g. no pressure scaling) in the pull dimensions and the pull force
@@@ -1196,42 -1196,42 +1196,42 @@@ is not added to virial.</dd
  <dt><b>cylinder</b></dt>
  <dd>Designed for pulling with respect to a layer where the reference COM
  is given by a local cylindrical part of the reference group.
 -The pulling is in the direction of <b>pull_vec</b>.
 +The pulling is in the direction of <b>pull-vec</b>.
  From the reference group a cylinder is selected around the axis going
 -through the pull group with direction <b>pull_vec</b> using two radii.
 -The radius <b>pull_r1</b> gives the radius within which all
 -the relative weights are one, between <b>pull_r1</b> and
 -<b>pull_r0</b> the weights are switched to zero. Mass weighting is also used.
 +through the pull group with direction <b>pull-vec</b> using two radii.
 +The radius <b>pull-r1</b> gives the radius within which all
 +the relative weights are one, between <b>pull-r1</b> and
 +<b>pull-r0</b> the weights are switched to zero. Mass weighting is also used.
  Note that the radii should be smaller than half the box size.
  For tilted cylinders they should be even smaller than half the box size
  since the distance of an atom in the reference group
  from the COM of the pull group has both a radial and an axial component.
  <dt><b>position</b></dt>
  <dd>Pull to the position of the reference group plus
 -<b>pull_init</b> + time*<b>pull_rate</b>*<b>pull_vec</b>.</dd>
 +<b>pull-init</b> + time*<b>pull-rate</b>*<b>pull-vec</b>.</dd>
  </dl></dd>
 -<dt><b>pull_dim: (Y Y Y)</b></dt>
 +<dt><b>pull-dim: (Y Y Y)</b></dt>
  <dd>the distance components to be used with geometry <b>distance</b>
  and <b>position</b>, and also sets which components are printed
  to the output files</dd>
 -<dt><b>pull_r1: (1) [nm]</b></dt>
 +<dt><b>pull-r1: (1) [nm]</b></dt>
  <dd>the inner radius of the cylinder for geometry <b>cylinder</b></dd>
 -<dt><b>pull_r0: (1) [nm]</b></dt>
 +<dt><b>pull-r0: (1) [nm]</b></dt>
  <dd>the outer radius of the cylinder for geometry <b>cylinder</b></dd>
 -<dt><b>pull_constr_tol: (1e-6)</b></dt>
 +<dt><b>pull-constr-tol: (1e-6)</b></dt>
  <dd>the relative constraint tolerance for constraint pulling</dd>
 -<dt><b>pull_start:</b></dt>
 +<dt><b>pull-start:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
 -<dd>do not modify <b>pull_init</b>
 +<dd>do not modify <b>pull-init</b>
  <dt><b>yes</b></dt>
 -<dd>add the COM distance of the starting conformation to <b>pull_init</b></dd>
 +<dd>add the COM distance of the starting conformation to <b>pull-init</b></dd>
  </dl>
 -<dt><b>pull_nstxout: (10)</b></dt>
 +<dt><b>pull-nstxout: (10)</b></dt>
  <dd>frequency for writing out the COMs of all the pull group</dd>
 -<dt><b>pull_nstfout: (1)</b></dt>
 +<dt><b>pull-nstfout: (1)</b></dt>
  <dd>frequency for writing out the force of all the pulled group</dd>
 -<dt><b>pull_ngroups: (1)</b></dt>
 +<dt><b>pull-ngroups: (1)</b></dt>
  <dd>The number of pull groups, not including the reference group.
  If there is only one group, there is no difference in treatment
  of the reference and pulled group (except with the cylinder geometry).
@@@ -1239,50 -1239,50 +1239,50 @@@ Below only the pull options for the ref
  and the first group (ending on 1) are given,
  further groups work analogously, but with the number 1 replaced
  by the group number.</dd>
 -<dt><b>pull_group0: </b></dt>
 +<dt><b>pull-group0: </b></dt>
  <dd>The name of the reference group. When this is empty an absolute reference
  of (0,0,0) is used. With an absolute reference the system is no longer
  translation invariant and one should think about what to do with
  the <A HREF="#run">center of mass motion</A>.</dd>
 -<dt><b>pull_weights0: </b></dt>
 -<dd>see <b>pull_weights1</b></dd>
 -<dt><b>pull_pbcatom0: (0)</b></dt>
 -<dd>see <b>pull_pbcatom1</b></dd>
 -<dt><b>pull_group1: </b></dt>
 +<dt><b>pull-weights0: </b></dt>
 +<dd>see <b>pull-weights1</b></dd>
 +<dt><b>pull-pbcatom0: (0)</b></dt>
 +<dd>see <b>pull-pbcatom1</b></dd>
 +<dt><b>pull-group1: </b></dt>
  <dd>The name of the pull group.</dd>
 -<dt><b>pull_weights1: </b></dt>
 +<dt><b>pull-weights1: </b></dt>
  <dd>Optional relative weights which are multiplied with the masses of the atoms
  to give the total weight for the COM. The number should be 0, meaning all 1,
  or the number of atoms in the pull group.</dd>
 -<dt><b>pull_pbcatom1: (0)</b></dt>
 +<dt><b>pull-pbcatom1: (0)</b></dt>
  <dd>The reference atom for the treatment of periodic boundary conditions
  inside the group
  (this has no effect on the treatment of the pbc between groups).
  This option is only important when the diameter of the pull group
  is larger than half the shortest box vector.
  For determining the COM, all atoms in the group are put at their periodic image
 -which is closest to <b>pull_pbcatom1</b>.
 +which is closest to <b>pull-pbcatom1</b>.
  A value of 0 means that the middle atom (number wise) is used.
  This parameter is not used with geometry <b>cylinder</b>.
  A value of -1 turns on cosine weighting, which is useful for a group
  of molecules in a periodic system, e.g. a water slab (see Engin et al.
  J. Chem. Phys. B 2010).</dd>
 -<dt><b>pull_vec1: (0.0 0.0 0.0)</b></dt>
 +<dt><b>pull-vec1: (0.0 0.0 0.0)</b></dt>
  <dd>The pull direction. <tt>grompp</tt> normalizes the vector.</dd>
 -<dt><b>pull_init1: (0.0) / (0.0 0.0 0.0) [nm]</b></dt>
 +<dt><b>pull-init1: (0.0) / (0.0 0.0 0.0) [nm]</b></dt>
  <dd>The reference distance at t=0. This is a single value,
  except for geometry <b>position</b> which uses a vector.</dd>
 -<dt><b>pull_rate1: (0) [nm/ps]</b></dt>
 +<dt><b>pull-rate1: (0) [nm/ps]</b></dt>
  <dd>The rate of change of the reference position.</dd>
 -<dt><b>pull_k1: (0) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
 +<dt><b>pull-k1: (0) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
  <dd>The force constant. For umbrella pulling this is the harmonic force
  constant in [kJ mol<sup>-1</sup> nm<sup>-2</sup>]. For constant force pulling
  this is the force constant of the linear potential, and thus minus (!)
  the constant force in [kJ mol<sup>-1</sup> nm<sup>-1</sup>].</dd>
 -<dt><b>pull_kB1: (pull_k1) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
 -<dd>As <b>pull_k1</b>, but for state B. This is only used when
 -<A HREF="#free"><b>free_energy</b></A> is turned on.
 -The force constant is then (1 - lambda)*<b>pull_k1</b> + lambda*<b>pull_kB1</b>.
 +<dt><b>pull-kB1: (pull-k1) [kJ mol<sup>-1</sup> nm<sup>-2</sup>] / [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
 +<dd>As <b>pull-k1</b>, but for state B. This is only used when
 +<A HREF="#free"><b>free-energy</b></A> is turned on.
 +The force constant is then (1 - lambda)*<b>pull-k1</b> + lambda*<b>pull-kB1</b>.
  </dl>
  
  <A NAME="nmr"><br>
@@@ -1304,7 -1304,7 +1304,7 @@@ of systems within each ensemble (usuall
  should only be used for special cases, such as dimers
  (this option is not fuctional in the current version of GROMACS)</dd>
  </dl></dd>
 -<dt><b>disre_weighting:</b></dt>
 +<dt><b>disre-weighting:</b></dt>
  <dd><dl compact>
  <dt><b>conservative</b></dt>
  <dd>the forces are the derivative of the restraint potential,
@@@ -1312,7 -1312,7 +1312,7 @@@ this results in an r<sup>-7</sup> weigh
  <dt><b>equal</b></dt>
  <dd>divide the restraint force equally over all atom pairs in the restraint</dd>
  </dl></dd>
 -<dt><b>disre_mixed:</b></dt>
 +<dt><b>disre-mixed:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>the violation used in the calculation of the restraint force is the
@@@ -1322,11 -1322,11 +1322,11 @@@ time averaged violation </dd
  square root of the time averaged violation times the instantaneous violation </dd>
  </dl></dd>
  
 -<dt><b>disre_fc: (1000) [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
 +<dt><b>disre-fc: (1000) [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
  <dd>force constant for distance restraints, which is multiplied by a
  (possibly) different factor for each restraint</dd>
  
 -<dt><b>disre_tau: (0) [ps]</b></dt>
 +<dt><b>disre-tau: (0) [ps]</b></dt>
  <dd>time constant for distance restraints running average</dd>
  
  <dt><b>nstdisreout: (100) [steps]</b></dt>
@@@ -1344,13 -1344,13 +1344,13 @@@ restraint information in topology file)
  <dd>use orientation restraints, ensemble averaging can be performed
  with <tt>mdrun -multi</tt></dd>
  </dl>
 -<dt><b>orire_fc: (0) [kJ mol]</b></dt>
 +<dt><b>orire-fc: (0) [kJ mol]</b></dt>
  <dd>force constant for orientation restraints, which is multiplied by a
  (possibly) different factor for each restraint, can be set to zero to
  obtain the orientations from a free simulation</dd>
 -<dt><b>orire_tau: (0) [ps]</b></dt>
 +<dt><b>orire-tau: (0) [ps]</b></dt>
  <dd>time constant for orientation restraints running average</dd>
 -<dt><b>orire_fitgrp: </b></dt>
 +<dt><b>orire-fitgrp: </b></dt>
  <dd>fit group for orientation restraining, for a protein backbone is a good
  choice</dd>
  <dt><b>nstorireout: (100) [steps]</b></dt>
@@@ -1364,45 -1364,45 +1364,45 @@@ for all restraints and the molecular or
  <h3><!--Idx-->Free energy calculations<!--EIdx--></h3>
  
  <dl>
 -<dt><b>free_energy:</b></dt>
 +<dt><b>free-energy:</b></dt>
  <dd><dl compact>
  <dt><b>no</b></dt>
  <dd>Only use topology A.</dd>
  <dt><b>yes</b></dt>
  <dd>Interpolate between topology A (lambda=0) to topology B (lambda=1)
 -and write the derivative of the Hamiltonian with respect to lambda (as specified with <b>dhdl_derivatives</b>), or the Hamiltonian differences with respect to other lambda values (as specified with <b>foreign_lambda</b>) to
 +and write the derivative of the Hamiltonian with respect to lambda (as specified with <b>dhdl-derivatives</b>), or the Hamiltonian differences with respect to other lambda values (as specified with <b>foreign-lambda</b>) to
  the energy file and/or to <tt>dhdl.xvg</tt>, where they can be processed by, for example <tt>g_bar</tt>.
  The potentials, bond-lengths and angles are interpolated linearly as
 -described in the manual. When <b>sc_alpha</b> is larger than zero, soft-core
 +described in the manual. When <b>sc-alpha</b> is larger than zero, soft-core
  potentials are used for the LJ and Coulomb interactions.</dd>
  </dl></dd>
 -<dt><b>init_lambda: (0)</b></dt>
 +<dt><b>init-lambda: (0)</b></dt>
  <dd>starting value for lambda</dd>
 -<dt><b>delta_lambda: (0)</b></dt>
 +<dt><b>delta-lambda: (0)</b></dt>
  <dd>increment per time step for lambda</dd>
 -<dt><b>foreign_lambda: ()</b></dt>
 +<dt><b>foreign-lambda: ()</b></dt>
  <dd>Zero, one or more lambda values for which Delta H values will
  be determined and written to dhdl.xvg every <b>nstdhdl</b> steps.
  Free energy differences between different lambda values can then
  be determined with <tt>g_bar</tt>.</dd>
 -<dt><b>dhdl_derivatives: (yes)</b></dt>
 +<dt><b>dhdl-derivatives: (yes)</b></dt>
  <dd>If yes (the default), the derivatives of the Hamiltonian with respect to lambda at each <b>nstdhdl</b> step are written out. These values are needed for interpolation of linear energy differences with <tt>g_bar</tt> (although the same can also be achieved with the right <b>foreign lambda</b> setting, that may not be as flexible), or with thermodynamic integration</dd>
 -<dt><b>sc_alpha: (0)</b></dt>
 +<dt><b>sc-alpha: (0)</b></dt>
  <dd>the soft-core parameter, a value of 0 results in linear interpolation of
  the LJ and Coulomb interactions</dd>
 -<dt><b>sc_power: (0)</b></dt>
 +<dt><b>sc-power: (0)</b></dt>
  <dd>the power for lambda in the soft-core function,
  only the values 1 and 2 are supported</dd>
 -<dt><b>sc_sigma: (0.3) [nm]</b></dt>
 +<dt><b>sc-sigma: (0.3) [nm]</b></dt>
  <dd>the soft-core sigma for particles which have a C6 or C12 parameter equal
 -to zero or a sigma smaller than <b>sc_sigma</b></dd>
 +to zero or a sigma smaller than <b>sc-sigma</b></dd>
  <dt><b>couple-moltype:</b></dt>
  <dd>Here one can supply a molecule type (as defined in the topology)
  for calculating solvation or coupling free energies.
  There is a special option <b>system</b> that couples all molecule types
  in the system. This can be useful for equilibrating a system
  starting from (nearly) random coordinates.
 -<b>free_energy</b> has to be turned on.
 +<b>free-energy</b> has to be turned on.
  The Van der Waals interactions and/or charges in this molecule type can be
  turned on or off between lambda=0 and lambda=1, depending on the settings
  of <b>couple-lambda0</b> and <b>couple-lambda1</b>. If you want to decouple
@@@ -1431,17 -1431,17 +1431,17 @@@ the molecule definition in the topology
  <dt><b>nstdhdl: (10)</b></dt>
  <dd>the frequency for writing dH/dlambda and possibly Delta H to dhdl.xvg,
  0 means no ouput, should be a multiple of <b>nstcalcenergy</b></dd>
 -<dt><b>separate_dhdl_file: (yes)</b></dt>
 +<dt><b>separate-dhdl-file: (yes)</b></dt>
  <dd><dl compact>
  <dt><b>yes</b></dt>
 -<dd>the free energy values that are calculated (as specified with the <b>foreign-lambda</b> and <b>dhdl_derivatives</b> settings) are written out to a separate file, with the default name <tt>dhdl.xvg</tt>. This file can be used directly with <tt>g_bar</tt>.</dd>
 +<dd>the free energy values that are calculated (as specified with the <b>foreign-lambda</b> and <b>dhdl-derivatives</b> settings) are written out to a separate file, with the default name <tt>dhdl.xvg</tt>. This file can be used directly with <tt>g_bar</tt>.</dd>
  <dt><b>no</b></dt>
  <dd>The free energy values are written out to the energy output file (<tt>ener.edr</tt>, in accumulated blocks at every <b>nstenergy</b> steps), where they can be extracted with <tt>g_energy</tt> or used directly with <tt>g_bar</tt>.</dd>
  </dl>
 -<dt><b>dh_hist_size: (0)</b></dt>
 -<dd>If nonzero, specifies the size of the histogram into which the Delta H values (specified with <b>foreign_lambda</b>) and the derivative dH/dl values are binned, and written to ener.edr. This can be used to save disk space while calculating free energy differences. One histogram gets written for each <b>foreign lambda</b> and two for the dH/dl, at every <b>nstenergy</b> step. Be aware that incorrect histogram settings (too small size or too wide bins) can introduce errors. Do not use histograms unless you're certain you need it.</dd>
 -<dt><b>dh_hist_spacing (0.1)</b></dt>
 -<dd>Specifies the bin width of the histograms, in energy units. Used in conjunction with <b>dh_hist_size</b>. This size limits the accuracy with which free energies can be calculated.  Do not use histograms unless you're certain you need it.</dd>
 +<dt><b>dh-hist-size: (0)</b></dt>
 +<dd>If nonzero, specifies the size of the histogram into which the Delta H values (specified with <b>foreign-lambda</b>) and the derivative dH/dl values are binned, and written to ener.edr. This can be used to save disk space while calculating free energy differences. One histogram gets written for each <b>foreign lambda</b> and two for the dH/dl, at every <b>nstenergy</b> step. Be aware that incorrect histogram settings (too small size or too wide bins) can introduce errors. Do not use histograms unless you're certain you need it.</dd>
 +<dt><b>dh-hist-spacing (0.1)</b></dt>
 +<dd>Specifies the bin width of the histograms, in energy units. Used in conjunction with <b>dh-hist-size</b>. This size limits the accuracy with which free energies can be calculated.  Do not use histograms unless you're certain you need it.</dd>
  </dl>
  
  
  <h3><!--Idx-->Non-equilibrium MD<!--EIdx--></h3>
  
  <dl>
 -<dt><b>acc_grps: </b></dt>
 +<dt><b>acc-grps: </b></dt>
  <dd>groups for constant acceleration (e.g.: <tt>Protein Sol</tt>)
  all atoms in groups Protein and Sol will experience constant acceleration
  as specified in the <b>accelerate</b> line</dd>
  <dt><b>accelerate: (0) [nm ps<sup>-2</sup>]</b></dt>
 -<dd>acceleration for <b>acc_grps</b>; x, y and z for each group
 +<dd>acceleration for <b>acc-grps</b>; x, y and z for each group
  (e.g. <tt>0.1 0.0 0.0 -0.1 0.0 0.0</tt> means that first group has constant 
  acceleration of 0.1 nm ps<sup>-2</sup> in X direction, second group the 
  opposite).</dd>
@@@ -1466,18 -1466,19 +1466,19 @@@ which dimension the freezing applies
  To avoid spurious contibrutions to the virial and pressure due to large
  forces between completely frozen atoms you need to use
  <A HREF="#egexcl">energy group exclusions</A>, this also saves computing time.
- Note that frozen coordinates are not subject to pressure scaling.</dd>
+ Note that coordinates of frozen atoms are not scaled by pressure-coupling
+ algorithms.</dd>
  <dt><b>freezedim: </b></dt>
  <dd>dimensions for which groups in <b>freezegrps</b> should be frozen, 
  specify <tt>Y</tt> or <tt>N</tt> for X, Y and Z and for each group
  (e.g. <tt>Y Y N N N N</tt> means that particles in the first group 
  can move only in Z direction. The particles in the second group can 
  move in any direction).</dd>
 -<dt><b>cos_acceleration: (0) [nm ps<sup>-2</sup>]</b></dt>
 +<dt><b>cos-acceleration: (0) [nm ps<sup>-2</sup>]</b></dt>
  <dd>the amplitude of the acceleration profile for calculating the
  <!--Idx-->viscosity<!--EIdx-->.
  The acceleration is in the X-direction and the magnitude is 
 -<b>cos_acceleration</b> cos(2 pi z/boxheight).
 +<b>cos-acceleration</b> cos(2 pi z/boxheight).
  Two terms are added to the energy file:
  the amplitude of the velocity profile and 1/viscosity.</dd>
  <dt><b><!--Idx-->deform<!--EIdx-->: (0 0 0 0 0 0) [nm ps<sup>-1</sup>]</b></dt>
@@@ -1501,15 -1502,15 +1502,15 @@@ or a liquid.</dd
  <h3><!--Idx-->Electric field<!--EIdx-->s</h3>
  
  <dl>
 -<dt><b>E_x ; E_y ; E_z:</b></dt>
 +<dt><b>E-x ; E-y ; E-z:</b></dt>
  <dd>If you want to use an electric field in a direction, enter 3 numbers
 -after the appropriate <b>E_*</b>, the first number: the number of cosines,
 +after the appropriate <b>E-*</b>, the first number: the number of cosines,
  only 1 is implemented (with frequency 0) so enter 1,
  the second number: the strength of the electric field in
  <b>V nm<sup>-1</sup></b>,
  the third number: the phase of the cosine, you can enter any number here
  since a cosine of frequency zero has no phase.</dd>
 -<dt><b>E_xt;  E_yt;  E_zt: </b></dt>
 +<dt><b>E-xt;  E-yt;  E-zt: </b></dt>
  <dd>not implemented yet</dd>
  </dl>
  <br>
@@@ -1600,18 -1601,18 +1601,18 @@@ method.</dd
  <h3>Implicit solvent</h3>
  
  <dl>
 -<dt><b>implicit_solvent:</b></dt>
 +<dt><b>implicit-solvent:</b></dt>
  <dd><dl compact="compact">
  <dt><b>no</b></dt>
  <dd>No implicit solvent</dd>
  <dt><b>GBSA</b></dt>
  <dd>Do a simulation with implicit solvent using the Generalized Born formalism. 
  Three different methods for calculating the Born radii are available, Still, HCT and
 -OBC. These are specified with the <b>gb_algorithm</b> field. The non-polar solvation
 -is specified with the <b>sa_algorithm</b> field.</dd>
 +OBC. These are specified with the <b>gb-algorithm</b> field. The non-polar solvation
 +is specified with the <b>sa-algorithm</b> field.</dd>
  </dl>
  
 -<dt><b>gb_algorithm:</b></dt>
 +<dt><b>gb-algorithm:</b></dt>
  <dd><dl compact="compact">
  <dt><b>Still</b></dt>
  <dd>Use the Still method to calculate the Born radii</dd>
@@@ -1629,22 -1630,22 +1630,22 @@@ unstable trajectories.</dd
  <dt><b>rgbradii: (1.0) [nm]</b></dt>
  <dd>Cut-off for the calculation of the Born radii. Currently must be equal to rlist</dd>
  
 -<dt><b>gb_epsilon_solvent: (80)</b></dt>
 +<dt><b>gb-epsilon-solvent: (80)</b></dt>
  <dd>Dielectric constant for the implicit solvent</dd>
  
 -<dt><b>gb_saltconc: (0) [M]</b></dt>
 +<dt><b>gb-saltconc: (0) [M]</b></dt>
  <dd>Salt concentration for implicit solvent models, currently not used</dd>
  
 -<dt><b>gb_obc_alpha (1); gb_obc_beta (0.8); gb_obc_gamma (4.85);</b></dt>
 +<dt><b>gb-obc-alpha (1); gb-obc-beta (0.8); gb-obc-gamma (4.85);</b></dt>
  <dd>Scale factors for the OBC model. Default values are OBC(II).
  Values for OBC(I) are 0.8, 0 and 2.91 respectively</dd>
  
 -<dt><b>gb_dielectric_offset: (0.009) [nm]</b></dt>
 +<dt><b>gb-dielectric-offset: (0.009) [nm]</b></dt>
  <dd>Distance for the di-electric offset when calculating the Born radii. This is
  the offset between the center of each atom the center of the polarization energy 
  for the corresponding atom</dd>
  
 -<dt><b>sa_algorithm</b></dt>
 +<dt><b>sa-algorithm</b></dt>
  <dd><dl compact="compact">
  <dt><b>Ace-approximation</b></dt>
  <dd>Use an Ace-type approximation (default)</dd>
  calculated</dd>
  </dl>
  
 -<dt><b>sa_surface_tension: [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
 +<dt><b>sa-surface-tension: [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
  <dd>Default value for surface tension with SA algorithms. The default value is -1; 
  Note that if this default value is not changed
  it will be overridden by <tt>grompp</tt> using values that are specific for the choice
  of radii algorithm (0.0049 kcal/mol/Angstrom<sup>2</sup> for Still, 0.0054 kcal/mol/Angstrom<sup>2</sup> 
  for HCT/OBC)
  
 -Setting it to 0 will while using an sa_algorithm other than None means 
 +Setting it to 0 will while using an sa-algorithm other than None means 
  no non-polar calculations are done.
  </dd>
  </dl>   
  
 +<A NAME="adress"><br>
 +<hr>
 +<h3>Adaptive Resolution Simulation</h3>
 +
 +<dl>
 +<dt><b>adress: (no)</b></dt>
 +<dd>Decide whether the AdResS feature is turned on.</dd>
 +<dt><b>adress-type: (Off)</b></dt>
 +<dd><dl compact>
 +<dt><b>Off</b></dt>
 +<dd>Do an AdResS simulation with weight equal 1, which is equivalent to an explicit (normal) MD simulation. The difference to disabled AdResS is that the AdResS variables are still read-in and hence are defined.</dd>
 +<dt><b>Constant</b></dt>
 +<dd>Do an AdResS simulation with a constant weight, <b>adress-const-wf</b> defines the value of the weight</dd>
 +<dt><b>XSplit</b></dt>
 +<dd>Do an AdResS simulation with simulation box split in x-direction, so basically the weight is only a function of the x coordinate and all distances are measured using the x coordinate only.</dd>
 +<dt><b>Sphere</b></dt>
 +<dd>Do an AdResS simulation with spherical explicit zone.</dd>
 +</dl></dd>
 +<dt><b>adress-const-wf: (1)</b></dt>
 +<dd>Provides the weight for a constant weight simulation (<b>adress-type</b>=Constant)</dd>
 +<dt><b>adress-ex-width: (0)</b></dt>
 +<dd>Width of the explicit zone,  measured from <b>adress-reference-coords</b>.</dd>
 +<dt><b>adress-hy-width: (0)</b></dt>
 +<dd>Width of the hybrid zone.</dd>
 +<dt><b>adress-reference-coords: (0,0,0)</b></dt>
 +<dd>Position of the center of the explicit zone. Periodic boundary conditions apply for measuring the distance from it.</dd>
 +<dt><b>adress-cg-grp-names</b></dt>
 +<dd>The names of the coarse-grained energy groups. All other energy groups are considered explicit and their interactions will be automatically excluded with the coarse-grained groups.</dd>
 +<dt><b>adress-site: (COM)</b>The mapping point from which the weight is calculated.</dt>
 +<dd><dl compact>
 +<dt><b>COM</b></dt>
 +<dd>The weight is calculated from the center of mass of each charge group.</dd>
 +<dt><b>COG</b></dt>
 +<dd>The weight is calculated from the center of geometry of each charge group.</dd>
 +<dt><b>Atom</b></dt>
 +<dd>The weight is calculated from the position of 1st atom of each charge group.</dd>
 +<dt><b>AtomPerAtom</b></dt>
 +<dd>The weight is calculated from the position of each individual atom.</dd>
 +</dl></dd>
 +<dt><b>adress-interface-correction: (Off)</b></dt>
 +<dd><dl compact>
 +<dt><b>Off</b></dt>
 +<dd>Do not a apply any interface correction.</dd>
 +<dt><b>thermoforce</b></dt>
 +<dd>Apply thermodynamic force interface correction. The table can be specified using the <tt>-tabletf</tt> option of <tt>mdrun</tt>. The table should contain the potential and force (acting on molecules) as function of the distance from <b>adress-reference-coords</b>.</dd>
 +</dl></dd>
 +<dt><b>adress-tf-grp-names</b></dt>
 +<dd>The names of the energy groups to which the <b>thermoforce</b> is applied if enabled in <b>adress-interface-correction</b>. If no group is given the default table is applied.</dd>
 +<dt><b>adress-ex-forcecap: (0)</b></dt>
 +<dd>Cap the force in the hybrid region, useful for big molecules. 0 disables force capping.</dd>
 +</dl>
 +
  <A NAME="user"><br>
  <hr>
  <h3>User defined thingies</h3>
  
  <dl>
 -<dt><b>user1_grps; user2_grps: </b></dt>
 +<dt><b>user1-grps; user2-grps: </b></dt>
  <dt><b>userint1 (0); userint2 (0); userint3 (0); userint4 (0)</b></dt>
  <dt><b>userreal1 (0); userreal2 (0); userreal3 (0); userreal4 (0)</b></dt>
  <dd>These you can use if you modify code. You can pass integers and
@@@ -1738,20 -1687,20 +1739,20 @@@ reals to your subroutine. Check the inp
  <P>
  
  <multicol cols=4> 
 -<A HREF="#neq">acc_grps</A><br>
 +<A HREF="#neq">acc-grps</A><br>
  <A HREF="#neq">accelerate</A><br>
  <A HREF="#sa">annealing</A><br>
 -<A HREF="#sa">annealing_npoints</A><br>
 -<A HREF="#sa">annealing_time</A><br>
 -<A HREF="#sa">annealing_temp</A><br>
 -<A HREF="#ld">bd_fric</A><br>
 +<A HREF="#sa">annealing-npoints</A><br>
 +<A HREF="#sa">annealing-time</A><br>
 +<A HREF="#sa">annealing-temp</A><br>
 +<A HREF="#ld">bd-fric</A><br>
  <A HREF="#vdw">bDispCorr</A><br>
 -<A HREF="#run">comm_mode</A><br>
 -<A HREF="#run">comm_grps</A><br>
 +<A HREF="#run">comm-mode</A><br>
 +<A HREF="#run">comm-grps</A><br>
  <A HREF="#pc">compressibility</A><br>
 -<A HREF="#bond">constraint_algorithm</A><br>
 +<A HREF="#bond">constraint-algorithm</A><br>
  <A HREF="#bond">constraints</A><br>
 -<A HREF="#neq">cos_acceleration</A><br>
 +<A HREF="#neq">cos-acceleration</A><br>
  <A HREF="#el">coulombtype</A><br>
  <A HREF="#free">couple-intramol</A><br>
  <A HREF="#free">couple-lambda0</A><br>
  <A HREF="#free">couple-moltype</A><br>
  <A HREF="#pp">define</A><br>
  <A HREF="#neq">deform</A><br>
 -<A HREF="#free">delta_lambda</A><br>
 +<A HREF="#free">delta-lambda</A><br>
  <A HREF="#nmr">disre</A><br>
 -<A HREF="#nmr">disre_weighting</A><br>
 -<A HREF="#nmr">disre_mixed</A><br>
 -<A HREF="#nmr">disre_fc</A><br>
 -<A HREF="#nmr">disre_tau</A><br>
 +<A HREF="#nmr">disre-weighting</A><br>
 +<A HREF="#nmr">disre-mixed</A><br>
 +<A HREF="#nmr">disre-fc</A><br>
 +<A HREF="#nmr">disre-tau</A><br>
  <A HREF="#run">dt</A><br>
  <A HREF="#em">emstep</A><br>
  <A HREF="#em">emtol</A><br>
 -<A HREF="#egexcl">energygrp_excl</A><br>
 -<A HREF="#table">energygrp_table</A><br>
 +<A HREF="#egexcl">energygrp-excl</A><br>
 +<A HREF="#table">energygrp-table</A><br>
  <A HREF="#out">energygrps</A><br>
 -<A HREF="#el2">epsilon_r</A><br>
 -<A HREF="#el2">epsilon_rf</A><br>
 -<A HREF="#ewald">ewald_rtol</A><br>
 -<A HREF="#ewald">ewald_geometry</A><br>
 -<A HREF="#ewald">epsilon_surface</A><br>
 -<A HREF="#ef">E_x</A><br>
 -<A HREF="#ef">E_xt</A><br>
 -<A HREF="#ef">E_y</A><br>
 -<A HREF="#ef">E_yt</A><br>
 -<A HREF="#ef">E_z</A><br>
 -<A HREF="#ef">E_zt </A><br>
 +<A HREF="#el2">epsilon-r</A><br>
 +<A HREF="#el2">epsilon-rf</A><br>
 +<A HREF="#ewald">ewald-rtol</A><br>
 +<A HREF="#ewald">ewald-geometry</A><br>
 +<A HREF="#ewald">epsilon-surface</A><br>
 +<A HREF="#ef">E-x</A><br>
 +<A HREF="#ef">E-xt</A><br>
 +<A HREF="#ef">E-y</A><br>
 +<A HREF="#ef">E-yt</A><br>
 +<A HREF="#ef">E-z</A><br>
 +<A HREF="#ef">E-zt </A><br>
  <A HREF="#xmdrun">fcstep</A><br>
 -<A HREF="#ewald">fourier_nx</A><br>
 -<A HREF="#ewald">fourier_ny</A><br>
 -<A HREF="#ewald">fourier_nz</A><br>
 +<A HREF="#ewald">fourier-nx</A><br>
 +<A HREF="#ewald">fourier-ny</A><br>
 +<A HREF="#ewald">fourier-nz</A><br>
  <A HREF="#ewald">fourierspacing</A><br>
 -<A HREF="#free">free_energy</A><br>
 +<A HREF="#free">free-energy</A><br>
  <A HREF="#neq">freezedim </A><br>
  <A HREF="#neq">freezegrps</A><br>
 -<A HREF="#vel">gen_seed</A><br>
 -<A HREF="#vel">gen_temp</A><br>
 -<A HREF="#vel">gen_vel</A><br>
 +<A HREF="#vel">gen-seed</A><br>
 +<A HREF="#vel">gen-temp</A><br>
 +<A HREF="#vel">gen-vel</A><br>
  <A HREF="#pp">include</A><br>
 -<A HREF="#free">init_lambda</A><br>
 -<A HREF="#run">init_step</A><br>
 +<A HREF="#free">init-lambda</A><br>
 +<A HREF="#run">init-step</A><br>
  <A HREF="#run">integrator</A><br>
 -<A HREF="#ld">ld_seed</A><br>
 -<A HREF="#bond2">lincs_iter</A><br>
 -<A HREF="#bond2">lincs_order</A><br>
 -<A HREF="#bond2">lincs_warnangle</A><br>
 +<A HREF="#ld">ld-seed</A><br>
 +<A HREF="#bond2">lincs-iter</A><br>
 +<A HREF="#bond2">lincs-order</A><br>
 +<A HREF="#bond2">lincs-warnangle</A><br>
  <A HREF="#bond2">morse</A><br>
  <A HREF="#em">nbfgscorr</A><br>
  <A HREF="#xmdrun">niter</A><br>
  <A HREF="#out">nstvout</A><br>
  <A HREF="#out">nstxout</A><br>
  <A HREF="#out">nstxtcout</A><br>
 -<A HREF="#nl">ns_type</A><br>
 +<A HREF="#nl">ns-type</A><br>
  <A HREF="#wall">nwall</A><br>
 -<A HREF="#ewald">optimize_fft</A><br>
 +<A HREF="#ewald">optimize-fft</A><br>
  <A HREF="#nmr2">orire</A><br>
 -<A HREF="#nmr2">orire_fc</A><br>
 -<A HREF="#nmr2">orire_tau</A><br>
 -<A HREF="#nmr2">orire_fitgrp</A><br>
 +<A HREF="#nmr2">orire-fc</A><br>
 +<A HREF="#nmr2">orire-tau</A><br>
 +<A HREF="#nmr2">orire-fitgrp</A><br>
  <A HREF="#nmr2">nstorireout</A><br>
  <A HREF="#nl">pbc</A><br>
  <A HREF="#pc">pcoupl</A><br>
  <A HREF="#pc">pcoupltype</A><br>
 -<A HREF="#nl">periodic_molecules</A><br>
 -<A HREF="#ewald">pme_order</A><br>
 +<A HREF="#nl">periodic-molecules</A><br>
 +<A HREF="#ewald">pme-order</A><br>
  <A HREF="#pull">pull</A><br>
 -<A HREF="#pc">refcoord_scaling</A><br>
 -<A HREF="#pc">ref_p</A><br>
 -<A HREF="#tc">ref_t</A><br>
 -<A HREF="#el2">rcoulomb_switch</A><br>
 +<A HREF="#pc">refcoord-scaling</A><br>
 +<A HREF="#pc">ref-p</A><br>
 +<A HREF="#tc">ref-t</A><br>
 +<A HREF="#el2">rcoulomb-switch</A><br>
  <A HREF="#el2">rcoulomb</A><br>
  <A HREF="#nl">rlist</A><br>
  <A HREF="#nl">rlistlong</A><br>
  <A HREF="#tpi">rtpi</A><br>
 -<A HREF="#vdw">rvdw_switch</A><br>
 +<A HREF="#vdw">rvdw-switch</A><br>
  <A HREF="#vdw">rvdw</A><br>
 -<A HREF="#free">sc_alpha</A><br>
 -<A HREF="#free">sc_power</A><br>
 -<A HREF="#free">sc_sigma</A><br>
 -<A HREF="#bond2">shake_tol</A><br>
 +<A HREF="#free">sc-alpha</A><br>
 +<A HREF="#free">sc-power</A><br>
 +<A HREF="#free">sc-sigma</A><br>
 +<A HREF="#bond2">shake-tol</A><br>
  <A HREF="#table">table-extension</A><br>
 -<A HREF="#pc">tau_p</A><br>
 -<A HREF="#tc">tau_t</A><br>
 -<A HREF="#tc">tc_grps</A><br>
 +<A HREF="#pc">tau-p</A><br>
 +<A HREF="#tc">tau-t</A><br>
 +<A HREF="#tc">tc-grps</A><br>
  <A HREF="#tc">tcoupl</A><br>
  <A HREF="#run">tinit</A><br>
  <A HREF="#bond">continuation</A><br>
 -<A HREF="#user">user1_grps</A><br>
 -<A HREF="#user">user2_grps</A><br>
 +<A HREF="#user">user1-grps</A><br>
 +<A HREF="#user">user2-grps</A><br>
  <A HREF="#user">userint1</A><br>
  <A HREF="#user">userint2</A><br>
  <A HREF="#user">userint3</A><br>
  <A HREF="#user">userreal3</A><br>
  <A HREF="#user">userreal4</A><br>
  <A HREF="#el">vdwtype</A><br>
 -<A HREF="#out">xtc_grps</A><br>
 -<A HREF="#out">xtc_precision</A><br>
 -<A HREF="#sa">zero_temp_time</A><br>
 -<A HREF="#walls">wall_atomtype</A><br>
 -<A HREF="#walls">wall_density</A><br>
 -<A HREF="#walls">wall_ewald_zfac</A><br>
 -<A HREF="#walls">wall_r_linpot</A><br>
 -<A HREF="#walls">wall_type</A><br>
 +<A HREF="#out">xtc-grps</A><br>
 +<A HREF="#out">xtc-precision</A><br>
 +<A HREF="#sa">zero-temp-time</A><br>
 +<A HREF="#walls">wall-atomtype</A><br>
 +<A HREF="#walls">wall-density</A><br>
 +<A HREF="#walls">wall-ewald-zfac</A><br>
 +<A HREF="#walls">wall-r-linpot</A><br>
 +<A HREF="#walls">wall-type</A><br>
  </multicol>
  
  <hr>
diff --combined src/gmxlib/checkpoint.c
index 41a6a517531ceba57f036ddbfaba2c45b0794464,0fd4973d7bdb38c4023235d4a04fe4eb9255c561..cc6fdd327241b45998365a9e8e42074dbb67c0fa
@@@ -164,7 -164,7 +164,7 @@@ static void cp_warning(FILE *fp
  
  static void cp_error()
  {
-     gmx_fatal(FARGS,"Checkpoint file corrupted/truncated, or maybe you are out of quota?");
+     gmx_fatal(FARGS,"Checkpoint file corrupted/truncated, or maybe you are out of disk space?");
  }
  
  static void do_cpt_string_err(XDR *xd,gmx_bool bRead,const char *desc,char **s,FILE *list)
@@@ -711,7 -711,7 +711,7 @@@ static void do_cpt_header(XDR *xd,gmx_b
      res = xdr_int(xd,&magic);
      if (res == 0)
      {
-         gmx_fatal(FARGS,"The checkpoint file is empty/corrupted, or maybe you are out of quota?");
+         gmx_fatal(FARGS,"The checkpoint file is empty/corrupted, or maybe you are out of disk space?");
      }
      if (magic != CPT_MAGIC1)
      {
@@@ -1264,7 -1264,7 +1264,7 @@@ void write_checkpoint(const char *fn,gm
         (do_cpt_files(gmx_fio_getxdr(fp),FALSE,&outputfiles,&noutputfiles,NULL,
                       file_version) < 0))
      {
-         gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of quota?");
+         gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of disk space?");
      }
  
      do_cpt_footer(gmx_fio_getxdr(fp),FALSE,file_version);
      {
          char buf[STRLEN];
          sprintf(buf,
-                 "Cannot fsync '%s'; maybe you are out of disk space or quota?",
+                 "Cannot fsync '%s'; maybe you are out of disk space?",
                  gmx_fio_getname(ret));
  
          if (getenv(GMX_IGNORE_FSYNC_FAILURE_ENV)==NULL)
  
      if( gmx_fio_close(fp) != 0)
      {
-         gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of quota?");
+         gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of disk space?");
      }
  
      /* we don't move the checkpoint if the user specified they didn't want it,
          }
          if (gmx_file_rename(fntemp, fn) != 0)
          {
-             gmx_file("Cannot rename checkpoint file; maybe you are out of quota?");
+             gmx_file("Cannot rename checkpoint file; maybe you are out of disk space?");
          }
      }
  
@@@ -1666,7 -1666,7 +1666,7 @@@ static void read_checkpoint(const char 
          cp_error();
      }
      *bReadEkin = ((flags_eks & (1<<eeksEKINH)) || (flags_eks & (1<<eeksEKINF)) || (flags_eks & (1<<eeksEKINO)) ||
 -                  (flags_eks & (1<<eeksEKINSCALEF)) | (flags_eks & (1<<eeksEKINSCALEH)) | (flags_eks & (1<<eeksVSCALE)));
 +                  ((flags_eks & (1<<eeksEKINSCALEF)) | (flags_eks & (1<<eeksEKINSCALEH)) | (flags_eks & (1<<eeksVSCALE))));
      
      ret = do_cpt_enerhist(gmx_fio_getxdr(fp),TRUE,
                            flags_enh,&state->enerhist,NULL);
      }
      if( gmx_fio_close(fp) != 0)
        {
-               gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of quota?");
+         gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of disk space?");
        }
      
      sfree(fprog);
@@@ -1940,7 -1940,7 +1940,7 @@@ read_checkpoint_state(const char *fn,in
      read_checkpoint_data(fp,simulation_part,step,t,state,FALSE,NULL,NULL);
      if( gmx_fio_close(fp) != 0)
        {
-               gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of quota?");
+         gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of disk space?");
        }
  }
  
@@@ -2041,7 -2041,7 +2041,7 @@@ void list_checkpoint(const char *fn,FIL
      }
      if( gmx_fio_close(fp) != 0)
        {
-               gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of quota?");
+         gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of disk space?");
        }
      
      done_state(&state);
@@@ -2097,7 -2097,7 +2097,7 @@@ gmx_bool read_checkpoint_simulation_par
                                   &nfiles,&outputfiles);
              if( gmx_fio_close(fp) != 0)
              {
-                 gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of quota?");
+                 gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of disk space?");
              }
              done_state(&state);
  
diff --combined src/gmxlib/gmxfio.c
index 4fc20cc416f1c9b7e93cf1fceca45b6777e4507c,8487067b445749849c2b160874904b46e8a38505..3efa33b010369b975f5c6201f4ed8a78d87364fb
@@@ -53,7 -53,7 +53,7 @@@
  #include "gmxfio.h"
  #include "md5.h"
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  #include "thread_mpi.h"
  #endif
  
@@@ -68,7 -68,7 +68,7 @@@
  static t_fileio *open_files = NULL;
  
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  /* this mutex locks the open_files structure so that no two threads can 
     modify it.        
  
@@@ -248,14 -248,14 +248,14 @@@ static void gmx_fio_set_iotype(t_filei
     type of access to the fio's elements. */
  void gmx_fio_lock(t_fileio *fio)
  {
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      tMPI_Lock_lock(&(fio->mtx));
  #endif
  }
  /* unlock the mutex associated with this fio.  */
  void gmx_fio_unlock(t_fileio *fio)
  {
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      tMPI_Lock_unlock(&(fio->mtx));
  #endif
  }
@@@ -270,7 -270,7 +270,7 @@@ static void gmx_fio_make_dummy(void
          open_files->fn=NULL;
          open_files->next=open_files;
          open_files->prev=open_files;
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
          tMPI_Lock_init(&(open_files->mtx));
  #endif
      }
  static void gmx_fio_insert(t_fileio *fio)
  {
      t_fileio *prev;
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      /* first lock the big open_files mutex. */
      tMPI_Thread_mutex_lock(&open_file_mutex);
  #endif
      gmx_fio_unlock(open_files);
      gmx_fio_unlock(fio);
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      /* now unlock the big open_files mutex.  */
      tMPI_Thread_mutex_unlock(&open_file_mutex);
  #endif
@@@ -362,7 -362,7 +362,7 @@@ static t_fileio *gmx_fio_get_first(void
      t_fileio *ret;
      /* first lock the big open_files mutex and the dummy's mutex */
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      /* first lock the big open_files mutex. */
      tMPI_Thread_mutex_lock(&open_file_mutex);
  #endif
@@@ -399,7 -399,7 +399,7 @@@ static t_fileio *gmx_fio_get_next(t_fil
      if (fio->next==open_files)
      {
          ret=NULL;
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
          tMPI_Thread_mutex_unlock(&open_file_mutex);
  #endif
      }
  static void gmx_fio_stop_getting_next(t_fileio *fio)
  {
      gmx_fio_unlock(fio);
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      tMPI_Thread_mutex_unlock(&open_file_mutex);
  #endif
  }
@@@ -485,7 -485,7 +485,7 @@@ t_fileio *gmx_fio_open(const char *fn, 
      }
  
      snew(fio, 1);
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      tMPI_Lock_init(&(fio->mtx));
  #endif
      bRead = (newmode[0]=='r' && newmode[1]!='+');
@@@ -599,7 -599,7 +599,7 @@@ int gmx_fio_close(t_fileio *fio
  {
      int rc = 0;
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      /* first lock the big open_files mutex. */
      /* We don't want two processes operating on the list at the same time */
      tMPI_Thread_mutex_lock(&open_file_mutex);
  
      sfree(fio);
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      tMPI_Thread_mutex_unlock(&open_file_mutex);
  #endif
  
@@@ -788,7 -788,7 +788,7 @@@ static int gmx_fio_int_get_file_positio
          char buf[STRLEN];
          sprintf(
              buf,
-             "Cannot write file '%s'; maybe you are out of disk space or quota?",
+             "Cannot write file '%s'; maybe you are out of disk space?",
              fio->fn);
          gmx_file(buf);
      }
diff --combined src/gmxlib/wman.c
index da4b42aa7bedaa9a69b7dee75f8791f360e53f98,13e77c559071f64d5661fc0529d0fa242bab12e3..5960617519c2ae0dcea9138c8ab80deb5ddb1f9f
@@@ -46,7 -46,7 +46,7 @@@
  #include "statutil.h"
  #include "copyrite.h"
  #include "strdb.h"
 -#include "time.h"
 +#include <time.h>
  #include "readinp.h"
  
  /* The source code in this file should be thread-safe. 
@@@ -61,6 -61,11 +61,11 @@@ typedef struct 
    char *search,*replace;
  } t_sandr;
  
+ /* The order of these arrays is significant. Text search and replace
+  * for each element occurs in order, so earlier changes can induce
+  * subsequent changes even though the original text might not appear
+  * to invoke the latter changes. */
  const t_sandr_const sandrTeX[] = {
    { "[TT]", "{\\tt " },
    { "[tt]", "}"      },
    { "&",    "\\&"    },
    /* The next couple of lines allow true Greek symbols to be written to the 
       manual, which makes it look pretty */
-   { "[GRK]", "$\\"   },
-   { "[grk]", "$"     },
-   /* The next two lines used to substitute "|" and "||" to "or", but only
-    * g_angle used that functionality, so that was changed to a textual
-    * "or" there, so that other places could use those symbols to indicate
-    * magnitudes. */
-   { "||",    "\\textbar{}\\textbar"    },
-   { "|",     "\\textbar{}"    }
+   { "[GRK]", "\\ensuremath{\\" },
+   { "[grk]", "}" },
+   { "[MATH]","\\ensuremath{" },
+   { "[math]","}" },
+   { "[CHEVRON]", "\\ensuremath{<}" },
+   { "[chevron]", "\\ensuremath{>}" },
+   { "[MAG]", "\\ensuremath{|}" },
+   { "[mag]", "\\ensuremath{|}" },
+   { "[INT]","\\ensuremath{\\int" },
+   { "[FROM]","_" },
+   { "[from]","" },
+   { "[TO]", "^" },
+   { "[to]", "" },
+   { "[int]","}" },
+   { "[SUM]","\\ensuremath{\\sum" },
+   { "[sum]","}" },
+   { "[SUB]","\\ensuremath{_{" },
+   { "[sub]","}}" },
+   { "[SQRT]","\\ensuremath{\\sqrt{" },
+   { "[sqrt]","}}" },
+   { "[EXP]","\\ensuremath{\\exp{(" },
+   { "[exp]",")}}" },
+   { "[LN]","\\ensuremath{\\ln{(" },
+   { "[ln]",")}}" },
+   { "[LOG]","\\ensuremath{\\log{(" },
+   { "[log]",")}}" },
+   { "[COS]","\\ensuremath{\\cos{(" },
+   { "[cos]",")}}" },
+   { "[SIN]","\\ensuremath{\\sin{(" },
+   { "[sin]",")}}" },
+   { "[TAN]","\\ensuremath{\\tan{(" },
+   { "[tan]",")}}" },
+   { "[COSH]","\\ensuremath{\\cosh{(" },
+   { "[cosh]",")}}" },
+   { "[SINH]","\\ensuremath{\\sinh{(" },
+   { "[sinh]",")}}" },
+   { "[TANH]","\\ensuremath{\\tanh{(" },
+   { "[tanh]",")}}" }
  };
  #define NSRTEX asize(sandrTeX)
  
@@@ -110,6 -145,42 +145,42 @@@ const t_sandr_const sandrTty[] = 
    { "[bb]", "" },
    { "[IT]", "" },
    { "[it]", "" },
+   { "[MATH]","" },
+   { "[math]","" },
+   { "[CHEVRON]","<" },
+   { "[chevron]",">" },
+   { "[MAG]", "|" },
+   { "[mag]", "|" },
+   { "[INT]","integral" },
+   { "[FROM]"," from " },
+   { "[from]","" },
+   { "[TO]", " to " },
+   { "[to]", " of" },
+   { "[int]","" },
+   { "[SUM]","sum" },
+   { "[sum]","" },
+   { "[SUB]","_" },
+   { "[sub]","" },
+   { "[SQRT]","sqrt(" },
+   { "[sqrt]",")" },
+   { "[EXP]","exp(" },
+   { "[exp]",")" },
+   { "[LN]","ln(" },
+   { "[ln]",")" },
+   { "[LOG]","log(" },
+   { "[log]",")" },
+   { "[COS]","cos(" },
+   { "[cos]",")" },
+   { "[SIN]","sin(" },
+   { "[sin]",")" },
+   { "[TAN]","tan(" },
+   { "[tan]",")" },
+   { "[COSH]","cosh(" },
+   { "[cosh]",")" },
+   { "[SINH]","sinh(" },
+   { "[sinh]",")" },
+   { "[TANH]","tanh(" },
+   { "[tanh]",")" },
    { "[PAR]","\n\n" },
    { "[BR]", "\n"},
    { "[GRK]", "" },
@@@ -127,6 -198,42 +198,42 @@@ const t_sandr_const sandrWiki[] = 
    { "[bb]", "'''" },
    { "[IT]", "''" },
    { "[it]", "''" },
+   { "[MATH]","" },
+   { "[math]","" },
+   { "[CHEVRON]","<" },
+   { "[chevron]",">" },
+   { "[MAG]", "|" },
+   { "[mag]", "|" },
+   { "[INT]","integral" },
+   { "[FROM]"," from " },
+   { "[from]","" },
+   { "[TO]", " to " },
+   { "[to]", " of" },
+   { "[int]","" },
+   { "[SUM]","sum" },
+   { "[sum]","" },
+   { "[SUB]","_" },
+   { "[sub]","" },
+   { "[SQRT]","sqrt(" },
+   { "[sqrt]",")", },
+   { "[EXP]","exp(" },
+   { "[exp]",")" },
+   { "[LN]","ln(" },
+   { "[ln]",")" },
+   { "[LOG]","log(" },
+   { "[log]",")" },
+   { "[COS]","cos(" },
+   { "[cos]",")" },
+   { "[SIN]","sin(" },
+   { "[sin]",")" },
+   { "[TAN]","tan(" },
+   { "[tan]",")" },
+   { "[COSH]","cosh(" },
+   { "[cosh]",")" },
+   { "[SINH]","sinh(" },
+   { "[sinh]",")" },
+   { "[TANH]","tanh(" },
+   { "[tanh]",")" },
    { "[PAR]","\n\n" },
    { "[BR]", "\n" },
    { "[GRK]", "&" },
@@@ -141,6 -248,42 +248,42 @@@ const t_sandr_const sandrNROFF[] = 
    { "[bb]", "\\fR" },
    { "[IT]", "\\fI " },
    { "[it]", "\\fR" },
+   { "[MATH]","" },
+   { "[math]","" },
+   { "[CHEVRON]","<" },
+   { "[chevron]",">" },
+   { "[MAG]", "|" },
+   { "[mag]", "|" },
+   { "[INT]","integral" },
+   { "[FROM]"," from " },
+   { "[from]","" },
+   { "[TO]", " to " },
+   { "[to]", " of" },
+   { "[int]","" },
+   { "[SUM]","sum" },
+   { "[sum]","" },
+   { "[SUB]","_" },
+   { "[sub]","" },
+   { "[SQRT]","sqrt(" },
+   { "[sqrt]",")", },
+   { "[EXP]","exp(" },
+   { "[exp]",")" },
+   { "[LN]","ln(" },
+   { "[ln]",")" },
+   { "[LOG]","log(" },
+   { "[log]",")" },
+   { "[COS]","cos(" },
+   { "[cos]",")" },
+   { "[SIN]","sin(" },
+   { "[sin]",")" },
+   { "[TAN]","tan(" },
+   { "[tan]",")" },
+   { "[COSH]","cosh(" },
+   { "[cosh]",")" },
+   { "[SINH]","sinh(" },
+   { "[sinh]",")" },
+   { "[TANH]","tanh(" },
+   { "[tanh]",")" },
    { "[PAR]","\n\n" },
    { "\n ",    "\n" },
    { "<",    "" },
@@@ -163,6 -306,42 +306,42 @@@ const t_sandr_const sandrHTML[] = 
    { "[bb]", "</b>" },
    { "[IT]", "<it>" },
    { "[it]", "</it>" },
+   { "[MATH]","" },
+   { "[math]","" },
+   { "[CHEVRON]","<" },
+   { "[chevron]",">" },
+   { "[MAG]", "|" },
+   { "[mag]", "|" },
+   { "[INT]","integral" },
+   { "[FROM]"," from " },
+   { "[from]","" },
+   { "[TO]", " to " },
+   { "[to]", " of" },
+   { "[int]","" },
+   { "[SUM]","sum" },
+   { "[sum]","" },
+   { "[SUB]","_" },
+   { "[sub]","" },
+   { "[SQRT]","sqrt(" },
+   { "[sqrt]",")", },
+   { "[EXP]","exp(" },
+   { "[exp]",")" },
+   { "[LN]","ln(" },
+   { "[ln]",")" },
+   { "[LOG]","log(" },
+   { "[log]",")" },
+   { "[COS]","cos(" },
+   { "[cos]",")" },
+   { "[SIN]","sin(" },
+   { "[sin]",")" },
+   { "[TAN]","tan(" },
+   { "[tan]",")" },
+   { "[COSH]","cosh(" },
+   { "[cosh]",")" },
+   { "[SINH]","sinh(" },
+   { "[sinh]",")" },
+   { "[TANH]","tanh(" },
+   { "[tanh]",")" },
    { "[PAR]","<p>" },
    { "[BR]", "<br>" },
    { "[GRK]", "&"  },
@@@ -179,6 -358,42 +358,42 @@@ const t_sandr_const sandrXML[] = 
    { "[bb]", "</emp>" },
    { "[IT]", "<it>" },
    { "[it]", "</it>" },
+   { "[MATH]","" },
+   { "[math]","" },
+   { "[CHEVRON]","<" },
+   { "[chevron]",">" },
+   { "[MAG]", "|" },
+   { "[mag]", "|" },
+   { "[INT]","integral" },
+   { "[FROM]"," from " },
+   { "[from]","" },
+   { "[TO]", " to " },
+   { "[to]", " of" },
+   { "[int]","" },
+   { "[SUM]","sum" },
+   { "[sum]","" },
+   { "[SUB]","_" },
+   { "[sub]","" },
+   { "[SQRT]","sqrt(" },
+   { "[sqrt]",")", },
+   { "[EXP]","exp(" },
+   { "[exp]",")" },
+   { "[LN]","ln(" },
+   { "[ln]",")" },
+   { "[LOG]","log(" },
+   { "[log]",")" },
+   { "[COS]","cos(" },
+   { "[cos]",")" },
+   { "[SIN]","sin(" },
+   { "[sin]",")" },
+   { "[TAN]","tan(" },
+   { "[tan]",")" },
+   { "[COSH]","cosh(" },
+   { "[cosh]",")" },
+   { "[SINH]","sinh(" },
+   { "[sinh]",")" },
+   { "[TANH]","tanh(" },
+   { "[tanh]",")" },
    { "[PAR]","</par>\n<par>" },
    { "[BR]", "<br />" },
    { "[GRK]", "" },
@@@ -1025,7 -1240,6 +1240,7 @@@ static void write_py(FILE *out,const ch
        for(j=2; (pa[i].u.c[j] != NULL); j++)
        fprintf(out,",'%s'",pa[i].u.c[j]);
        fprintf(out,"],%d))\n",is_hidden(&(pa[i])));
 +      break;
      default:
        break;
      }
diff --combined src/kernel/gmxcheck.c
index 8dc415a6ef1c07670056e497fe80d68a7dd282d3,141a7f3e55d8503e43c6d844523b72f6c966b1ac..da0086e0d22d8b905433812e53e764d6dfcdc65d
@@@ -41,7 -41,7 +41,7 @@@
  #include <ctype.h>
  #include "main.h"
  #include "macros.h"
 -#include "math.h"
 +#include <math.h>
  #include "futil.h"
  #include "statutil.h"
  #include "copyrite.h"
@@@ -519,7 -519,7 +519,7 @@@ void chk_tps(const char *fn, real vdw_f
  void chk_ndx(const char *fn)
  {
    t_blocka *grps;
 -  char **grpname=NULL;
 +  char **grpname;
    int  i,j;
    
    grps = init_index(fn,&grpname);
@@@ -654,7 -654,7 +654,7 @@@ int main(int argc,char *argv[]
      { "-rmsd",   FALSE, etBOOL, {&bRMSD},
        "Print RMSD for x, v and f" },
      { "-tol",    FALSE, etREAL, {&ftol},
-       "Relative tolerance for comparing real values defined as 2*(a-b)/(|a|+|b|)" },
+       "Relative tolerance for comparing real values defined as [MATH]2*(a-b)/([MAG]a[mag]+[MAG]b[mag])[math]" },
      { "-abstol",    FALSE, etREAL, {&abstol},
        "Absolute tolerance, useful when sums are close to zero." },
      { "-ab",     FALSE, etBOOL, {&bCompAB},
diff --combined src/kernel/md.c
index fb379d55905c52d381e3ea0feeb1e17483b2efcf,67e51a7a0d415f0f09d363c67e57dc1ebebf68bf..1d22db707dbf82ac6cc28926643506b30ecfcd37
@@@ -91,7 -91,7 +91,7 @@@
  #ifdef GMX_LIB_MPI
  #include <mpi.h>
  #endif
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  #include "tmpi.h"
  #endif
  
@@@ -298,13 -298,13 +298,13 @@@ double do_md(FILE *fplog,t_commrec *cr,
  
      if (DEFORM(*ir))
      {
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
          tMPI_Thread_mutex_lock(&deform_init_box_mutex);
  #endif
          set_deform_reference_box(upd,
                                   deform_init_init_step_tpx,
                                   deform_init_box_tpx);
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
          tMPI_Thread_mutex_unlock(&deform_init_box_mutex);
  #endif
      }
  
          /* Check whether everything is still allright */    
          if (((int)gmx_get_stop_condition() > handled_stop_condition)
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
              && MASTER(cr)
  #endif
              )
              {
                  if(fflush(fplog) != 0)
                  {
-                     gmx_fatal(FARGS,"Cannot flush logfile - maybe you are out of quota?");
+                     gmx_fatal(FARGS,"Cannot flush logfile - maybe you are out of disk space?");
                  }
              }
          }
diff --combined src/kernel/md_openmm.c
index a4c2f2ee54b15dd1fa2bcb2fcca17cb8e6a2f095,564d5138eceda8480c5b8a9552288cc911146130..ab92ce101568f2530d475ce4bb18ea68645d23d0
@@@ -91,7 -91,7 +91,7 @@@
  #include "string2.h"
  #include "copyrite.h"
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  #include "tmpi.h"
  #endif
  
@@@ -131,7 -131,7 +131,7 @@@ double do_md_openmm(FILE *fplog,t_commr
      t_vcm      *vcm;
      int        nchkpt=1;
      gmx_localtop_t *top;
 -    t_mdebin *mdebin=NULL;
 +    t_mdebin *mdebin;
      t_state    *state=NULL;
      rvec       *f_global=NULL;
      int        n_xtc=-1;
      if (MASTER(cr))
      {
          char tbuf[20];
-         fprintf(fplog,"Initial temperature: %g K\n",enerd->term[F_TEMP]);
          fprintf(stderr,"starting mdrun '%s'\n",
                  *(top_global->name));
          if (ir->nsteps >= 0)
  
          /* Check whether everything is still allright */
          if (((int)gmx_get_stop_condition() > handled_stop_condition)
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
              && MASTER(cr)
  #endif
              )
          {
              if (fflush(fplog) != 0)
              {
-                 gmx_fatal(FARGS,"Cannot flush logfile - maybe you are out of quota?");
+                 gmx_fatal(FARGS,"Cannot flush logfile - maybe you are out of disk space?");
              }
          }
  
diff --combined src/kernel/mdrun.c
index e4446767b7ba4148ffeb553a419caebf8f6aea53,085e35020fb3d2e86e5878ed770def40bea88a13..012a330c92d6932f9bfa8f52ed32286c15c62f47
@@@ -49,7 -49,7 +49,7 @@@
  #include "mdrun.h"
  #include "xmdrun.h"
  #include "checkpoint.h"
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  #include "thread_mpi.h"
  #endif
  
@@@ -362,7 -362,6 +362,7 @@@ int main(int argc,char *argv[]
      { efXVG, "-dhdl",   "dhdl",     ffOPTWR },
      { efXVG, "-field",  "field",    ffOPTWR },
      { efXVG, "-table",  "table",    ffOPTRD },
 +    { efXVG, "-tabletf", "tabletf",    ffOPTRD },
      { efXVG, "-tablep", "tablep",   ffOPTRD },
      { efXVG, "-tableb", "table",    ffOPTRD },
      { efTRX, "-rerun",  "rerun",    ffOPTRD },
      { efXVG, "-runav",  "runaver",  ffOPTWR },
      { efXVG, "-px",     "pullx",    ffOPTWR },
      { efXVG, "-pf",     "pullf",    ffOPTWR },
 +    { efXVG, "-ro",     "rotation", ffOPTWR },
 +    { efLOG, "-ra",     "rotangles",ffOPTWR },
 +    { efLOG, "-rs",     "rotslabs", ffOPTWR },
 +    { efLOG, "-rt",     "rottorque",ffOPTWR },
      { efMTX, "-mtx",    "nm",       ffOPTWR },
      { efNDX, "-dn",     "dipole",   ffOPTWR },
      { efRND, "-multidir",NULL,      ffOPTRDMULT}
        "Use particle decompostion" },
      { "-dd",      FALSE, etRVEC,{&realddxyz},
        "Domain decomposition grid, 0 is optimize" },
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
      { "-nt",      FALSE, etINT, {&nthreads},
        "Number of threads to start (0 is guess)" },
  #endif
      { "-multi",   FALSE, etINT,{&nmultisim}, 
        "Do multiple simulations in parallel" },
      { "-replex",  FALSE, etINT, {&repl_ex_nst}, 
-       "Attempt replica exchange every # steps" },
+       "Attempt replica exchange periodically with this period (steps)" },
      { "-reseed",  FALSE, etINT, {&repl_ex_seed}, 
        "Seed for replica exchange, -1 is generate a seed" },
      { "-rerunvsite", FALSE, etBOOL, {&bRerunVSite},
    dd_node_order = nenum(ddno_opt);
    cr->npmenodes = npme;
  
 -#ifndef GMX_THREADS
 +#ifndef GMX_THREAD_MPI
    nthreads=1;
  #endif
  
        gmx_fatal(FARGS,"Need at least two replicas for replica exchange (option -multi)");
  
    if (nmultisim > 1) {
 -#ifndef GMX_THREADS
 +#ifndef GMX_THREAD_MPI
      gmx_bool bParFn = (multidir == NULL);
      init_multisystem(cr, nmultisim, multidir, NFILE, fnm, bParFn);
  #else
diff --combined src/mdlib/domdec.c
index cb2afde9b4c9dc53f43419535471e167fcc141fa,3cf36b09c8db16dfb5a94aa063e65e42ebdfc4e8..f26a124b856396bbdd62bcf543164be205a632e6
@@@ -41,7 -41,6 +41,7 @@@
  #include "force.h"
  #include "pme.h"
  #include "pull.h"
 +#include "pull_rotation.h"
  #include "gmx_wallcycle.h"
  #include "mdrun.h"
  #include "nsgrid.h"
@@@ -54,7 -53,7 +54,7 @@@
  #ifdef GMX_LIB_MPI
  #include <mpi.h>
  #endif
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  #include "tmpi.h"
  #endif
  
@@@ -1482,7 -1481,7 +1482,7 @@@ void dd_collect_state(gmx_domdec_t *dd
      }
      for(est=0; est<estNR; est++)
      {
 -        if (EST_DISTR(est) && state_local->flags & (1<<est))
 +        if (EST_DISTR(est) && (state_local->flags & (1<<est)))
          {
              switch (est) {
              case estX:
@@@ -1564,7 -1563,7 +1564,7 @@@ static void dd_realloc_state(t_state *s
      
      for(est=0; est<estNR; est++)
      {
 -        if (EST_DISTR(est) && state->flags & (1<<est))
 +        if (EST_DISTR(est) && (state->flags & (1<<est)))
          {
              switch(est) {
              case estX:
@@@ -1757,7 -1756,7 +1757,7 @@@ static void dd_distribute_state(gmx_dom
      }
      for(i=0; i<estNR; i++)
      {
 -        if (EST_DISTR(i) && state_local->flags & (1<<i))
 +        if (EST_DISTR(i) && (state_local->flags & (1<<i)))
          {
              switch (i) {
              case estX:
@@@ -1858,7 -1857,7 +1858,7 @@@ static void write_dd_grid_pdb(const cha
                  }
                  else
                  {
 -                    if (dd->nc[d] > 1 && d < ddbox->npbcdim)
 +                    if (d < ddbox->npbcdim && dd->nc[d] > 1)
                      {
                          tric[d][i] = box[i][d]/box[i][i];
                      }
@@@ -4133,7 -4132,7 +4133,7 @@@ static void rotate_state_atom(t_state *
  
      for(est=0; est<estNR; est++)
      {
 -        if (EST_DISTR(est) && state->flags & (1<<est)) {
 +        if (EST_DISTR(est) && (state->flags & (1<<est))) {
              switch (est) {
              case estX:
                  /* Rotate the complete state; for a rectangular box only */
@@@ -5202,12 -5201,11 +5202,12 @@@ static void dd_print_load_verbose(gmx_d
  static void make_load_communicator(gmx_domdec_t *dd,MPI_Group g_all,
                                     int dim_ind,ivec loc)
  {
 -    MPI_Group g_row;
 +    MPI_Group g_row = MPI_GROUP_EMPTY;
      MPI_Comm  c_row;
      int  dim,i,*rank;
      ivec loc_c;
      gmx_domdec_root_t *root;
 +    gmx_bool bPartOfGroup = FALSE;
      
      dim = dd->dim[dim_ind];
      copy_ivec(loc,loc_c);
      {
          loc_c[dim] = i;
          rank[i] = dd_index(dd->nc,loc_c);
 +        if (rank[i] == dd->rank)
 +        {
 +            /* This process is part of the group */
 +            bPartOfGroup = TRUE;
 +        }
 +    }
 +    if (bPartOfGroup)
 +    {
 +        MPI_Group_incl(g_all,dd->nc[dim],rank,&g_row);
      }
 -    /* Here we create a new group, that does not necessarily
 -     * include our process. But MPI_Comm_create needs to be
 -     * called by all the processes in the original communicator.
 -     * Calling MPI_Group_free afterwards gives errors, so I assume
 -     * also the group is needed by all processes. (B. Hess)
 -     */
 -    MPI_Group_incl(g_all,dd->nc[dim],rank,&g_row);
      MPI_Comm_create(dd->mpi_comm_all,g_row,&c_row);
 -    if (c_row != MPI_COMM_NULL)
 +    if (bPartOfGroup)
      {
 -        /* This process is part of the group */
          dd->comm->mpi_comm_load[dim_ind] = c_row;
          if (dd->comm->eDLB != edlbNO)
          {
@@@ -6316,7 -6313,7 +6316,7 @@@ gmx_domdec_t *init_domain_decomposition
          else if (ir->bPeriodicMols)
          {
              /* Can not easily determine the required cut-off */
-             dd_warning(cr,fplog,"NOTE: Periodic molecules: can not easily determine the required minimum bonded cut-off, using half the non-bonded cut-off\n");
+             dd_warning(cr,fplog,"NOTE: Periodic molecules are present in this system. Because of this, the domain decomposition algorithm cannot easily determine the minimum cell size that it requires for treating bonded interactions. Instead, domain decomposition will assume that half the non-bonded cut-off will be a suitable lower bound.\n");
              comm->cutoff_mbody = comm->cutoff/2;
              r_bonded_limit = comm->cutoff_mbody;
          }
@@@ -7994,7 -7991,7 +7994,7 @@@ static void dd_sort_state(gmx_domdec_t 
      /* Reorder the state */
      for(i=0; i<estNR; i++)
      {
 -        if (EST_DISTR(i) && state->flags & (1<<i))
 +        if (EST_DISTR(i) && (state->flags & (1<<i)))
          {
              switch (i)
              {
@@@ -8603,13 -8600,6 +8603,13 @@@ void dd_partition_system(FIL
          /* Update the local pull groups */
          dd_make_local_pull_groups(dd,ir->pull,mdatoms);
      }
 +    
 +    if (ir->bRot)
 +    {
 +        /* Update the local rotation groups */
 +        dd_make_local_rotation_groups(dd,ir->rot);
 +    }
 +
  
      add_dd_statistics(dd);
      
diff --combined src/tools/gmx_anaeig.c
index 4c2e3fa949457178214589ee97a3f75d5408a973,811812f17d92186942480d32f35392bd32907ef4..570aef94e42b6e1101688224a422f9ec162b248f
@@@ -408,7 -408,8 +408,8 @@@ static void project(const char *trajfil
    int     nat,i,j,d,v,vec,nfr,nframes=0,snew_size,frame;
    t_trxstatus *out=NULL;
    t_trxstatus *status;
-   int     noutvec_extr,*imin,*imax;
+   int     noutvec_extr,imin,imax;
+   real    *pmin,*pmax;
    atom_id *all_at;
    matrix  box;
    rvec    *xread,*x;
    }
    
    if (extremefile) {
+     snew(pmin,noutvec_extr);
+     snew(pmax,noutvec_extr);
      if (extreme==0) {
        fprintf(stderr,"%11s %17s %17s\n","eigenvector","Minimum","Maximum");
        fprintf(stderr,
-             "%11s %10s %10s %10s %10s\n","","value","time","value","time");
-       snew(imin,noutvec_extr);
-       snew(imax,noutvec_extr);
+             "%11s %10s %10s %10s %10s\n","","value","frame","value","frame");
+       imin = 0;
+       imax = 0;
        for(v=0; v<noutvec_extr; v++) {
        for(i=0; i<nframes; i++) {
-         if (inprod[v][i]<inprod[v][imin[v]])
-           imin[v]=i;
-         if (inprod[v][i]>inprod[v][imax[v]])
-           imax[v]=i;
+         if (inprod[v][i]<inprod[v][imin])
+           imin = i;
+         if (inprod[v][i]>inprod[v][imax])
+           imax = i;
        }
-       min=inprod[v][imin[v]];
-       max=inprod[v][imax[v]];
-       fprintf(stderr,"%7d     %10.6f %10.1f %10.6f %10.1f\n",
+       pmin[v] = inprod[v][imin];
+       pmax[v] = inprod[v][imax];
+       fprintf(stderr,"%7d     %10.6f %10d %10.6f %10d\n",
                eignr[outvec[v]]+1,
-               min,inprod[noutvec][imin[v]],max,inprod[noutvec][imax[v]]); 
+               pmin[v],imin,pmax[v],imax); 
        }
      }
      else {
-       min=-extreme;
-       max=+extreme;
+       pmin[0] = -extreme;
+       pmax[0] =  extreme;
      }
      /* build format string for filename: */
      strcpy(str,extremefile);/* copy filename */
        for(i=0; i<natoms; i++)
          for(d=0; d<DIM; d++) 
            xread[index[i]][d] = 
-             (xav[i][d] + (min*(nextr-frame-1)+max*frame)/(nextr-1)
+             (xav[i][d] + (pmin[v]*(nextr-frame-1)+pmax[v]*frame)/(nextr-1)
              *eigvec[outvec[v]][i][d]/sqrtm[i]);
        write_trx(out,natoms,index,atoms,0,frame,topbox,xread,NULL,NULL);
        }
        close_trx(out);
      }
+     sfree(pmin);
+     sfree(pmax);
    }
    fprintf(stderr,"\n");
  }
@@@ -820,7 -825,7 +825,7 @@@ int gmx_anaeig(int argc,char *argv[]
      "computed based on the Quasiharmonic approach and based on",
      "Schlitter's formula."
    };
 -  static int  first=1,last=8,skip=1,nextr=2,nskip=6;
 +  static int  first=1,last=-1,skip=1,nextr=2,nskip=6;
    static real max=0.0,temp=298.15;
    static gmx_bool bSplit=FALSE,bEntropy=FALSE;
    t_pargs pa[] = {
    }
      
    if (bEntropy) {
+     if (bDMA1) {
+       gmx_fatal(FARGS,"Can not calculate entropies from mass-weighted eigenvalues, redo the analysis without mass-weighting");
+     }
      calc_entropy_qh(stdout,neig1,eigval1,temp,nskip);
      calc_entropy_schlitter(stdout,neig1,nskip,eigval1,temp);
    }
diff --combined src/tools/gmx_chi.c
index b6a9960bdccc478cacfcf7495b38af59014e97c1,97f58ad4f6c910fa478ccd94a81f8fb17b804f3c..13559df98706c5a0ce589da64e930066ada85437
@@@ -51,7 -51,7 +51,7 @@@
  #include "smalloc.h"
  #include "statutil.h"
  #include "tpxio.h"
 -#include "string.h"
 +#include <string.h>
  #include "sysstuff.h"
  #include "txtdump.h"
  #include "typedefs.h"
@@@ -1013,7 -1013,7 +1013,7 @@@ int gmx_chi(int argc,char *argv[]
      "The distributions [TT](histo-(dihedral)(RESIDUE).xvg[tt]) are cumulative over all residues of each type.[PAR]", 
      "If option [TT]-corr[tt] is given, the program will",
      "calculate dihedral autocorrelation functions. The function used",
-     "is C(t) = < cos([GRK]chi[grk]([GRK]tau[grk])) cos([GRK]chi[grk]([GRK]tau[grk]+t)) >. The use of cosines",
+     "is C(t) = [CHEVRON][COS][GRK]chi[grk]([GRK]tau[grk])[cos] [COS][GRK]chi[grk]([GRK]tau[grk]+t)[cos][chevron]. The use of cosines",
      "rather than angles themselves, resolves the problem of periodicity.",
      "(Van der Spoel & Berendsen (1997), Biophys. J. 72, 2032-2041).",
      "Separate files for each dihedral of each residue", 
      "rotamers per nanosecond,  and the order parameter S^2 of each dihedral.[BR]",
      "(d) a table for each residue of the rotamer occupancy.[PAR]", 
      "All rotamers are taken as 3-fold, except for [GRK]omega[grk] and [GRK]chi[grk] dihedrals",
-     "to planar groups (i.e. [GRK]chi[grk]2 of aromatics, Asp and Asn; [GRK]chi[grk]3 of Glu", 
-     "and Gln; and [GRK]chi[grk]4 of Arg), which are 2-fold. \"rotamer 0\" means ", 
+     "to planar groups (i.e. [GRK]chi[grk][SUB]2[sub] of aromatics, Asp and Asn; [GRK]chi[grk][SUB]3[sub] of Glu",
+     "and Gln; and [GRK]chi[grk][SUB]4[sub] of Arg), which are 2-fold. \"rotamer 0\" means ",
      "that the dihedral was not in the core region of each rotamer. ", 
      "The width of the core region can be set with [TT]-core_rotamer[tt][PAR]", 
  
      "are equally spaced in time.[PAR]",
  
      "If [TT]-chi_prod[tt] is set (and [TT]-maxchi[tt] > 0), cumulative rotamers, e.g.", 
-     "1+9([GRK]chi[grk]1-1)+3([GRK]chi[grk]2-1)+([GRK]chi[grk]3-1) (if the residue has three 3-fold ", 
+     "1+9([GRK]chi[grk][SUB]1[sub]-1)+3([GRK]chi[grk][SUB]2[sub]-1)+([GRK]chi[grk][SUB]3[sub]-1) (if the residue has three 3-fold ",
      "dihedrals and [TT]-maxchi[tt] >= 3)", 
      "are calculated. As before, if any dihedral is not in the core region,", 
      "the rotamer is taken to be 0. The occupancies of these cumulative ",
      { "-omega",FALSE, etBOOL, {&bOmega},  
        "Output for [GRK]omega[grk] dihedrals (peptide bonds)" },
      { "-rama", FALSE, etBOOL, {&bRama},
-       "Generate [GRK]phi[grk]/[GRK]psi[grk] and [GRK]chi[grk]1/[GRK]chi[grk]2 Ramachandran plots" },
+       "Generate [GRK]phi[grk]/[GRK]psi[grk] and [GRK]chi[grk][SUB]1[sub]/[GRK]chi[grk][SUB]2[sub] Ramachandran plots" },
      { "-viol", FALSE, etBOOL, {&bViol},
        "Write a file that gives 0 or 1 for violated Ramachandran angles" },
      { "-periodic", FALSE, etBOOL, {&bPBC},
      { "-normhisto", FALSE, etBOOL, {&bNormHisto},
        "Normalize histograms" },
      { "-ramomega",FALSE,etBOOL, {&bRamOmega},
-       "compute average omega as a function of phi/psi and plot it in an [TT].xpm[tt] plot" },
+       "compute average omega as a function of [GRK]phi[grk]/[GRK]psi[grk] and plot it in an [TT].xpm[tt] plot" },
      { "-bfact", FALSE, etREAL, {&bfac_init},
        "B-factor value for [TT].pdb[tt] file for atoms with no calculated dihedral order parameter"},
      { "-chi_prod",FALSE,etBOOL, {&bChiProduct},
    atom_id    isize,*index;
    int        ndih,nactdih,nf;
    real       **dih,*trans_frac,*aver_angle,*time;
 -  int        i,j,**chi_lookup,*xity; 
 +  int        i,j,**chi_lookup,*multiplicity; 
    
    t_filenm  fnm[] = {
      { efSTX, "-s",  NULL,     ffREAD  },
     *
     * added multiplicity */ 
  
 -  snew(xity,ndih) ;
 -  mk_multiplicity_lookup(xity, maxchi, dih, nlist, dlist,ndih); 
 +  snew(multiplicity,ndih) ;
 +  mk_multiplicity_lookup(multiplicity, maxchi, dih, nlist, dlist,ndih); 
   
    strcpy(grpname, "All residues, "); 
    if(bPhi) 
  
    low_ana_dih_trans(bDo_ot, opt2fn("-ot",NFILE,fnm),
                    bDo_oh, opt2fn("-oh",NFILE,fnm),maxchi, 
 -                  dih, nlist, dlist, nf, nactdih, grpname, xity, 
 +                  dih, nlist, dlist, nf, nactdih, grpname, multiplicity, 
                    time, FALSE, core_frac,oenv);
  
    /* Order parameters */  
      mk_chi_lookup(chi_lookup, maxchi, dih, nlist, dlist); 
      
      get_chi_product_traj(dih,nf,nactdih,nlist,
 -                       maxchi,dlist,time,chi_lookup,xity,
 +                       maxchi,dlist,time,chi_lookup,multiplicity,
                         FALSE,bNormHisto, core_frac,bAll,
                         opt2fn("-cp",NFILE,fnm),oenv); 
  
diff --combined src/tools/gmx_cluster.c
index 997fecdf6a9055cc9dd2653604163120d1fed02f,75f42f21f312510f1b7301c91e4769d98c08ff39..cd5090fa14d6d910237cc3ccfc5e6075a29f4a20
  #include "viewit.h"
  #include "gmx_ana.h"
  
 -/* macro's to print to two file pointers at once (i.e. stderr and log) */
 -#define lo_ffprintf(fp1,fp2,buf) \
 -   fprintf(fp1,"%s",buf);\
 -   fprintf(fp2,"%s",buf);
 +/* print to two file pointers at once (i.e. stderr and log) */
 +static inline
 +void lo_ffprintf(FILE *fp1, FILE *fp2, const char *buf)
 +{
 +    fprintf(fp1, "%s", buf);
 +    fprintf(fp2, "%s", buf);
 +}
 +
  /* just print a prepared buffer to fp1 and fp2 */
 -#define ffprintf(fp1,fp2,buf) { lo_ffprintf(fp1,fp2,buf) }
 +static inline
 +void ffprintf(FILE *fp1, FILE *fp2, const char *buf)
 +{
 +    lo_ffprintf(fp1, fp2, buf);
 +}
 +
  /* prepare buffer with one argument, then print to fp1 and fp2 */
 -#define ffprintf1(fp1,fp2,buf,fmt,arg) {\
 -   sprintf(buf,fmt,arg);\
 -   lo_ffprintf(fp1,fp2,buf)\
 +static inline
 +void ffprintf_d(FILE *fp1, FILE *fp2, char *buf, const char *fmt, int arg)
 +{
 +    sprintf(buf, fmt, arg);
 +    lo_ffprintf(fp1, fp2, buf);
  }
 +
 +/* prepare buffer with one argument, then print to fp1 and fp2 */
 +static inline
 +void ffprintf_g(FILE *fp1, FILE *fp2, char *buf, const char *fmt, real arg)
 +{
 +    sprintf(buf, fmt, arg);
 +    lo_ffprintf(fp1, fp2, buf);
 +}
 +
 +/* prepare buffer with one argument, then print to fp1 and fp2 */
 +static inline
 +void ffprintf_s(FILE *fp1, FILE *fp2, char *buf, const char *fmt, const char *arg)
 +{
 +    sprintf(buf, fmt, arg);
 +    lo_ffprintf(fp1, fp2, buf);
 +}
 +
 +/* prepare buffer with two arguments, then print to fp1 and fp2 */
 +static inline
 +void ffprintf_dd(FILE *fp1, FILE *fp2, char *buf, const char *fmt, int arg1, int arg2)
 +{
 +    sprintf(buf, fmt, arg1, arg2);
 +    lo_ffprintf(fp1, fp2, buf);
 +}
 +
 +/* prepare buffer with two arguments, then print to fp1 and fp2 */
 +static inline
 +void ffprintf_gg(FILE *fp1, FILE *fp2, char *buf, const char *fmt, real arg1, real arg2)
 +{
 +    sprintf(buf, fmt, arg1, arg2);
 +    lo_ffprintf(fp1, fp2, buf);
 +}
 +
  /* prepare buffer with two arguments, then print to fp1 and fp2 */
 -#define ffprintf2(fp1,fp2,buf,fmt,arg1,arg2) {\
 -   sprintf(buf,fmt,arg1,arg2);\
 -   lo_ffprintf(fp1,fp2,buf)\
 +static inline
 +void ffprintf_ss(FILE *fp1, FILE *fp2, char *buf, const char *fmt, const char *arg1, const char *arg2)
 +{
 +    sprintf(buf, fmt, arg1, arg2);
 +    lo_ffprintf(fp1, fp2, buf);
  }
  
  typedef struct {
@@@ -748,7 -702,7 +748,7 @@@ static void ana_trans(t_clusters *clust
        trans[clust->cl[i-1]-1][clust->cl[i]-1]++;
        maxtrans = max(maxtrans, trans[clust->cl[i]-1][clust->cl[i-1]-1]);
      }
 -  ffprintf2(stderr,log,buf,"Counted %d transitions in total, "
 +  ffprintf_dd(stderr,log,buf,"Counted %d transitions in total, "
            "max %d between two specific clusters\n",ntranst,maxtrans);
    if (transfn) {
      fp=ffopen(transfn,"w");
@@@ -797,7 -751,7 +797,7 @@@ static void analyze_clusters(int nf, t_
    
    clear_mat(zerobox);
    
 -  ffprintf1(stderr,log,buf,"\nFound %d clusters\n\n",clust->ncl);
 +  ffprintf_d(stderr,log,buf,"\nFound %d clusters\n\n",clust->ncl);
    trxsfn=NULL;
    if (trxfn) {
      /* do we write all structures? */
        trxsfn = parse_filename(trxfn, max(write_ncl,clust->ncl));
        snew(bWrite,nf);
      }
 -    ffprintf2(stderr,log,buf,"Writing %s structure for each cluster to %s\n",
 +    ffprintf_ss(stderr,log,buf,"Writing %s structure for each cluster to %s\n",
              bAverage ? "average" : "middle", trxfn);
      if (write_ncl) {
        /* find out what we want to tell the user:
@@@ -1106,7 -1060,7 +1106,7 @@@ int gmx_cluster(int argc,char *argv[]
      { "-dista", FALSE, etBOOL, {&bRMSdist},
        "Use RMSD of distances instead of RMS deviation" },
      { "-nlevels",FALSE,etINT,  {&nlevels},
-       "Discretize RMSD matrix in # levels" },
+       "Discretize RMSD matrix in this number of levels" },
      { "-cutoff",FALSE, etREAL, {&rmsdcut},
        "RMSD cut-off (nm) for two structures to be neighbor" },
      { "-fit",   FALSE, etBOOL, {&bFit},
      { "-av",    FALSE, etBOOL, {&bAverage},
        "Write average iso middle structure for each cluster" },
      { "-wcl",   FALSE, etINT,  {&write_ncl},
-       "Write all structures for first # clusters to numbered files" },
+       "Write the structures for this number of clusters to numbered files" },
      { "-nst",   FALSE, etINT,  {&write_nst},
-       "Only write all structures if more than # per cluster" },
+       "Only write all structures if more than this number of structures per cluster" },
      { "-rmsmin",FALSE, etREAL, {&rmsmin},
        "minimum rms difference with rest of cluster for writing structures" },
      { "-method",FALSE, etENUM, {methodname},
        } else
        sprintf(buf1,"Will use P=%d, M=%d",P,M);
      }
 -    ffprintf1(stderr,log,buf,"%s for determining the neighbors\n\n",buf1);
 +    ffprintf_s(stderr,log,buf,"%s for determining the neighbors\n\n",buf1);
    } else /* method != m_jarvis */
      bUseRmsdCut = ( bBinary || method == m_linkage || method == m_gromos );
    if (bUseRmsdCut && method != m_jarvis_patrick)
      }
      fprintf(stderr,"\n\n");
    }
 -  ffprintf2(stderr,log,buf,"The RMSD ranges from %g to %g nm\n",
 +  ffprintf_gg(stderr,log,buf,"The RMSD ranges from %g to %g nm\n",
            rms->minrms,rms->maxrms);
 -  ffprintf1(stderr,log,buf,"Average RMSD is %g\n",2*rms->sumrms/(nf*(nf-1)));
 -  ffprintf1(stderr,log,buf,"Number of structures for matrix %d\n",nf);
 -  ffprintf1(stderr,log,buf,"Energy of the matrix is %g nm\n",mat_energy(rms));
 +  ffprintf_g(stderr,log,buf,"Average RMSD is %g\n",2*rms->sumrms/(nf*(nf-1)));
 +  ffprintf_d(stderr,log,buf,"Number of structures for matrix %d\n",nf);
 +  ffprintf_g(stderr,log,buf,"Energy of the matrix is %g nm\n",mat_energy(rms));
    if (bUseRmsdCut && (rmsdcut < rms->minrms || rmsdcut > rms->maxrms) )
      fprintf(stderr,"WARNING: rmsd cutoff %g is outside range of rmsd values "
            "%g to %g\n",rmsdcut,rms->minrms,rms->maxrms);
diff --combined src/tools/gmx_current.c
index f311222a102c77a3dbe5b9ddd02e56c0b5c1920a,f55eedd04420df5b46b34c4cf4e04d2fa4b2df81..cc07fd6eaad665b5e4603ba8719fba5946b97a21
@@@ -685,7 -685,7 +685,7 @@@ int gmx_current(int argc,char *argv[]
      { "-nojump", FALSE, etBOOL, {&bNoJump},
        "Removes jumps of atoms across the box."},
      { "-eps", FALSE, etREAL, {&eps_rf},
-               "Dielectric constant of the surrounding medium. eps=0.0 corresponds to eps=infinity (tin-foil boundary conditions)."},
+               "Dielectric constant of the surrounding medium. The value zero corresponds to infinity (tin-foil boundary conditions)."},
        { "-bfit", FALSE, etREAL, {&bfit},
                "Begin of the fit of the straight line to the MSD of the translational fraction of the dipole moment."},
        { "-efit", FALSE, etREAL, {&efit},
    real       *mass2=NULL;
    rvec       *xtop,*vtop;
    matrix     box;
 -  atom_id    *index0=NULL;
 +  atom_id    *index0;
    int                                 *indexm=NULL;
    int        isize;
    t_trxstatus *status;
      "Option [TT]-temp[tt] sets the temperature required for the computation of the static dielectric constant.",
      "[PAR]",
      "Option [TT]-eps[tt] controls the dielectric constant of the surrounding medium for simulations using",
-     "a Reaction Field or dipole corrections of the Ewald summation (eps=0 corresponds to",
+     "a Reaction Field or dipole corrections of the Ewald summation ([TT]-eps[tt]=0 corresponds to",
      "tin-foil boundary conditions).",
      "[PAR]",
      "[TT]-[no]nojump[tt] unfolds the coordinates to allow free diffusion. This is required to get a continuous",
diff --combined src/tools/gmx_density.c
index 35a339bd05ef523d34187de0e3cf6a0a66b2fca4,fa02130d96efa238c5ecf85c757384d8dbdba6db..29c850b31b5326518c23cf4ca8a816c562dcc1a3
@@@ -39,7 -39,7 +39,7 @@@
  #include <ctype.h>
  
  #include "sysstuff.h"
 -#include "string.h"
 +#include <string.h>
  #include "string2.h"
  #include "typedefs.h"
  #include "smalloc.h"
@@@ -394,11 -394,11 +394,11 @@@ int gmx_density(int argc,char *argv[]
      { "-d", FALSE, etSTR, {&axtitle}, 
        "Take the normal on the membrane in direction X, Y or Z." },
      { "-sl",  FALSE, etINT, {&nslices},
-       "Divide the box in #nr slices." },
+       "Divide the box in this number of slices." },
      { "-dens",    FALSE, etENUM, {dens_opt},
        "Density"},
      { "-ng",       FALSE, etINT, {&ngrps},
-       "Number of groups to compute densities of" },
+       "Number of groups of which to compute densities." },
      { "-symm",    FALSE, etBOOL, {&bSymmetrize},
        "Symmetrize the density along the axis, with respect to the center. Useful for bilayers." },
      { "-center",  FALSE, etBOOL, {&bCenter},
diff --combined src/tools/gmx_editconf.c
index 7d33eb4a251442bd3068a21697e0e9a4d0363a2b,4c6d5c768bbb5bf025fbc52b5ed3633cdf7a8c23..5557f7ed72896b29f2644054e83e9e3a2a522e8e
@@@ -79,6 -79,8 +79,6 @@@ typedef struc
      int nsatm;
      t_simat sat[3];
  } t_simlist;
 -static const char *pdbtp[epdbNR] =
 -    { "ATOM  ", "HETATM" };
  
  real calc_mass(t_atoms *atoms, gmx_bool bGetMass, gmx_atomprop_t aps)
  {
@@@ -589,7 -591,7 +589,7 @@@ int gmx_editconf(int argc, char *argv[]
                          { visbox },
                          "HIDDENVisualize a grid of boxes, -1 visualizes the 14 box images" },
                      { "-bt", FALSE, etENUM,
-                         { btype }, "Box type for -box and -d" },
+                         { btype }, "Box type for [TT]-box[tt] and [TT]-d[tt]" },
                      { "-box", FALSE, etRVEC,
                          { newbox }, "Box vector lengths (a,b,c)" },
                      { "-angles", FALSE, etRVEC,
                          { &dist }, "Distance between the solute and the box" },
                      { "-c", FALSE, etBOOL,
                          { &bCenter },
-                         "Center molecule in box (implied by -box and -d)" },
+                         "Center molecule in box (implied by [TT]-box[tt] and [TT]-d[tt])" },
                      { "-center", FALSE, etRVEC,
                          { center }, "Coordinates of geometrical center" },
                      { "-aligncenter", FALSE, etRVEC,
                          "Default Van der Waals radius (in nm) if one can not be found in the database or if no parameters are present in the topology file" },
                      { "-sig56", FALSE, etREAL,
                          { &bSig56 },
-                         "Use rmin/2 (minimum in the Van der Waals potential) rather than sigma/2 " },
+                         "Use rmin/2 (minimum in the Van der Waals potential) rather than [GRK]sigma[grk]/2 " },
                      {
                          "-vdwread", FALSE, etBOOL,
                          { &bReadVDW },
-                         "Read the Van der Waals radii from the file vdwradii.dat rather than computing the radii based on the force field" },
+                         "Read the Van der Waals radii from the file [TT]vdwradii.dat[tt] rather than computing the radii based on the force field" },
                      { "-atom", FALSE, etBOOL,
                          { &peratom }, "Force B-factor attachment per atom" },
                      { "-legend", FALSE, etBOOL,
diff --combined src/tools/gmx_enemat.c
index 48b6bd7497c0ba3748e3bedd16ab34e6a81fd404,a1a4780dbaee606a877fea83762be7ae0e2e5b43..18cb971e604363ddbede01da26cff91018dcaa52
@@@ -95,7 -95,7 +95,7 @@@ int gmx_enemat(int argc,char *argv[]
      "calculated ([TT]-etot[tt]).[PAR]",
      
      "An approximation of the free energy can be calculated using:",
-     "E(free) = E0 + kT log( <exp((E-E0)/kT)> ), where '<>'",
+     "[MATH]E[SUB]free[sub] = E[SUB]0[sub] + kT [LOG][CHEVRON][EXP](E-E[SUB]0[sub])/kT[exp][chevron][log][math], where '[MATH][CHEVRON][chevron][math]'",
      "stands for time-average. A file with reference free energies",
      "can be supplied to calculate the free energy difference",
      "with some reference state. Group names (e.g. residue names)",
      }
     
      emid = 0.0;/*(emin+emax)*0.5;*/
 -    for(m=0; (m<egNR); m++)
 -      egrp_nm[m]=egrp_nm[m];
      egrp_nm[egTotal]="total";
      for (m=0; (m<egNR+egSP); m++) 
        if (egrp_use[m]) {
diff --combined src/tools/gmx_genbox.c
index 1b31ab681c9a8bd0b48705971f91f076f65e024c,f6b5c2219374ddd3db2b10df5b7038a9f9e359f5..0621c660bb75545463a9c129afcd8ab5bc8c1a01
@@@ -45,7 -45,7 +45,7 @@@
  #include "confio.h"
  #include "copyrite.h"
  #include "txtdump.h"
 -#include "math.h"
 +#include <math.h>
  #include "macros.h"
  #include "random.h"
  #include "futil.h"
@@@ -713,21 -713,21 +713,21 @@@ int gmx_genbox(int argc,char *argv[]
    output_env_t oenv;
    t_pargs pa[] = {
      { "-box",    FALSE, etRVEC, {new_box},   
-       "box size" },
+       "Box size" },
      { "-nmol",   FALSE, etINT , {&nmol_ins},  
-       "no of extra molecules to insert" },
+       "Number of extra molecules to insert" },
      { "-try",    FALSE, etINT , {&nmol_try},  
-       "try inserting [TT]-nmol[tt] times [TT]-try[tt] times" },
+       "Try inserting [TT]-nmol[tt] times [TT]-try[tt] times" },
      { "-seed",   FALSE, etINT , {&seed},      
-       "random generator seed"},
+       "Random generator seed"},
      { "-vdwd",   FALSE, etREAL, {&r_distance},
-       "default vdwaals distance"},
+       "Default van der Waals distance"},
      { "-shell",  FALSE, etREAL, {&r_shell},
-       "thickness of optional water layer around solute" },
+       "Thickness of optional water layer around solute" },
      { "-maxsol", FALSE, etINT,  {&max_sol},
-       "maximum number of solvent molecules to add if they fit in the box. If zero (default) this is ignored" },
+       "Maximum number of solvent molecules to add if they fit in the box. If zero (default) this is ignored" },
      { "-vel",    FALSE, etBOOL, {&bReadV},
-       "keep velocities from input solute and solvent" }
+       "Keep velocities from input solute and solvent" }
    };
  
    CopyRight(stderr,argv[0]);
diff --combined src/tools/gmx_genpr.c
index 2616edc490b5037c04f34aa1e1dcb9961b6c4991,38cf1b0b1f949160840bffb514d47964680f45d4..663adee5bc6780ef10d31cbbf29514f6f9b4ffaf
@@@ -39,7 -39,7 +39,7 @@@
  #include <math.h>
  #include "sysstuff.h"
  #include "statutil.h"
 -#include "string.h"
 +#include <string.h>
  #include "copyrite.h"
  #include "smalloc.h"
  #include "typedefs.h"
@@@ -84,9 -84,9 +84,9 @@@ int gmx_genpr(int argc,char *argv[]
        
    t_pargs pa[] = {
      { "-fc", FALSE, etRVEC, {fc}, 
-       "force constants (kJ/mol nm^2)" },
+       "Force constants (kJ/mol nm^2)" },
      { "-freeze", FALSE, etREAL, {&freeze_level},
-       "if the [TT]-of[tt] option or this one is given an index file will be written containing atom numbers of all atoms that have a B-factor less than the level given here" },
+       "If the [TT]-of[tt] option or this one is given an index file will be written containing atom numbers of all atoms that have a B-factor less than the level given here" },
      { "-disre", FALSE, etBOOL, {&bDisre},
        "Generate a distance restraint matrix for all the atoms in index" },
      { "-disre_dist", FALSE, etREAL, {&disre_dist},
diff --combined src/tools/gmx_h2order.c
index e7e98d7dc9c078a7ab884c9c6da51b8cdb65538a,cb232702758fac8d03efd094b22b17c7420f6052..e495b618620403606c43f000e56707c1bcd961af
@@@ -39,7 -39,7 +39,7 @@@
  #include <math.h>
  
  #include "sysstuff.h"
 -#include "string.h"
 +#include <string.h>
  #include "typedefs.h"
  #include "smalloc.h"
  #include "macros.h"
@@@ -263,7 -263,7 +263,7 @@@ int gmx_h2order(int argc,char *argv[]
        "Take the normal on the membrane in direction X, Y or Z." },
      { "-sl",  FALSE, etINT, {&nslices},
        "Calculate order parameter as function of boxlength, dividing the box"
-       " in #nr slices."}
+       " in this number of slices."}
    };
    const char *bugs[] = {
      "The program assigns whole water molecules to a slice, based on the first "
diff --combined src/tools/gmx_helix.c
index 8a6115b8c1a3ff46c9bd7f5f943c91e9779ba862,b2bbd118edff426c19a15ff7726e3748bfccb220..67f760f3cf3b6dfe4993f48460e81d8adf66a298
@@@ -54,7 -54,7 +54,7 @@@
  #include "index.h"
  #include "smalloc.h"
  #include "statutil.h"
 -#include "string.h"
 +#include <string.h>
  #include "sysstuff.h"
  #include "txtdump.h"
  #include "typedefs.h"
@@@ -130,7 -130,7 +130,7 @@@ int gmx_helix(int argc,char *argv[]
      "Then the following properties are computed:[PAR]",
      "[BB]1.[bb] Helix radius (file [TT]radius.xvg[tt]). This is merely the",
      "RMS deviation in two dimensions for all C[GRK]alpha[grk] atoms.",
-     "it is calced as sqrt((SUM i(x^2(i)+y^2(i)))/N), where N is the number",
+     "it is calculated as [SQRT]([SUM][sum][SUB]i[sub] (x^2(i)+y^2(i)))/N[sqrt] where N is the number",
      "of backbone atoms. For an ideal helix the radius is 0.23 nm[BR]",
      "[BB]2.[bb] Twist (file [TT]twist.xvg[tt]). The average helical angle per",
      "residue is calculated. For an [GRK]alpha[grk]-helix it is 100 degrees,",
diff --combined src/tools/gmx_membed.c
index fa2f81653e916a5a21fc8987ffa8f9ecc51d6a03,91aeb2b7b761d146aaeaad1e3c8e7ff6c3fefc80..ca8ea612b160923161ed62ebc0be0e5928f4ee58
  #include <config.h>
  #endif
  
 +#ifdef __linux
 +#define _GNU_SOURCE
 +#include <sched.h>
 +#include <sys/syscall.h>
 +#endif
  #include <signal.h>
  #include <stdlib.h>
 +
  #include "typedefs.h"
  #include "smalloc.h"
  #include "sysstuff.h"
  #ifdef GMX_LIB_MPI
  #include <mpi.h>
  #endif
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  #include "tmpi.h"
  #endif
  
 +#ifdef GMX_OPENMP
 +#include <omp.h>
 +#endif
 +
  /* afm stuf */
  #include "pull.h"
  
@@@ -1148,13 -1138,13 +1148,13 @@@ double do_md_membed(FILE *fplog,t_commr
  
  /*    if (DEFORM(*ir))
      {
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
          tMPI_Thread_mutex_lock(&deform_init_box_mutex);
  #endif
          set_deform_reference_box(upd,
                                   deform_init_init_step_tpx,
                                   deform_init_box_tpx);
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
          tMPI_Thread_mutex_unlock(&deform_init_box_mutex);
  #endif
      }*/
  
          /* Check whether everything is still allright */
          if (((int)gmx_get_stop_condition() > handled_stop_condition)
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
            && MASTER(cr)
  #endif
            )
              {
                  if(fflush(fplog) != 0)
                  {
-                     gmx_fatal(FARGS,"Cannot flush logfile - maybe you are out of quota?");
+                     gmx_fatal(FARGS,"Cannot flush logfile - maybe you are out of disk space?");
                  }
              }
          }
@@@ -2757,7 -2747,7 +2757,7 @@@ int mdrunner_membed(FILE *fplog,t_commr
      gmx_edsam_t ed=NULL;
      t_commrec   *cr_old=cr;
      int        nthreads=1,nthreads_requested=1;
 -
 +    int         omp_nthreads = 1;
  
        char                    *ins;
        int                     rm_bonded_at,fr_id,fr_i=0,tmp_id,warn=0;
          read_tpx_state(ftp2fn(efTPX,nfile,fnm),inputrec,state,NULL,mtop);
  
          /* NOW the threads will be started: */
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
  #endif
      }
      /* END OF CAUTION: cr is now reliable */
          gmx_setup_nodecomm(fplog,cr);
      }
  
 -    wcycle = wallcycle_init(fplog,resetstep,cr);
 +    /* get number of OpenMP/PME threads
 +    * env variable should be read only on one node to make sure it is identical everywhere */
 +#ifdef GMX_OPENMP
 +   if (EEL_PME(inputrec->coulombtype))
 +   {
 +       if (MASTER(cr))
 +       {
 +           char *ptr;
 +           omp_nthreads = omp_get_max_threads();
 +           if ((ptr=getenv("GMX_PME_NTHREADS")) != NULL)
 +           {
 +               sscanf(ptr,"%d",&omp_nthreads);
 +           }
 +           if (fplog!=NULL)
 +           {
 +               fprintf(fplog,"Using %d threads for PME\n",omp_nthreads);
 +           }
 +       }
 +       if (PAR(cr))
 +       {
 +           gmx_bcast_sim(sizeof(omp_nthreads),&omp_nthreads,cr);
 +       }
 +   }
 +#endif
 +
 +    wcycle = wallcycle_init(fplog,resetstep,cr, omp_nthreads);
      if (PAR(cr))
      {
          /* Master synchronizes its value of reset_counters with all nodes
          fr = mk_forcerec();
          init_forcerec(fplog,oenv,fr,fcd,inputrec,mtop,cr,box,FALSE,
                        opt2fn("-table",nfile,fnm),
 +                      opt2fn("-tabletf",nfile,fnm),
                        opt2fn("-tablep",nfile,fnm),
                        opt2fn("-tableb",nfile,fnm),FALSE,pforce);
  
          /* version for PCA_NOT_READ_NODE (see md.c) */
          /*init_forcerec(fplog,fr,fcd,inputrec,mtop,cr,box,FALSE,
 -          "nofile","nofile","nofile",FALSE,pforce);
 +          "nofile","nofile","nofile","nofile",FALSE,pforce);
            */
          fr->bSepDVDL = ((Flags & MD_SEPPOT) == MD_SEPPOT);
  
              /* The PME only nodes need to know nChargePerturbed */
              gmx_bcast_sim(sizeof(nChargePerturbed),&nChargePerturbed,cr);
          }
 +
 +
 +        /*set CPU affinity*/
 +#ifdef GMX_OPENMP
 +#ifdef __linux
 +#ifdef GMX_LIB_MPI
 +        {
 +            int core;
 +            MPI_Comm comm_intra; /*intra communicator (but different to nc.comm_intra includes PME nodes)*/
 +            MPI_Comm_split(MPI_COMM_WORLD,gmx_hostname_num(),gmx_node_rank(),&comm_intra);
 +            int local_omp_nthreads = (cr->duty & DUTY_PME) ? omp_nthreads : 1; /*threads on this node*/
 +            MPI_Scan(&local_omp_nthreads,&core, 1, MPI_INT, MPI_SUM, comm_intra);
 +            core-=local_omp_nthreads; /*make exclusive scan*/
 +    #pragma omp parallel firstprivate(core) num_threads(local_omp_nthreads)
 +            {
 +                cpu_set_t mask;
 +                CPU_ZERO(&mask);
 +                core+=omp_get_thread_num();
 +                CPU_SET(core,&mask);
 +                sched_setaffinity((pid_t) syscall (SYS_gettid),sizeof(cpu_set_t),&mask);
 +            }
 +        }
 +#endif /*GMX_MPI*/
 +#endif /*__linux*/
 +#endif /*GMX_OPENMP*/
 +
          if (cr->duty & DUTY_PME)
          {
              status = gmx_pme_init(pmedata,cr,npme_major,npme_minor,inputrec,
                                    mtop ? mtop->natoms : 0,nChargePerturbed,
 -                                  (Flags & MD_REPRODUCIBLE));
 +                                  (Flags & MD_REPRODUCIBLE),omp_nthreads);
              if (status != 0)
              {
                  gmx_fatal(FARGS,"Error %d initializing PME",status);
@@@ -3670,7 -3608,7 +3670,7 @@@ int gmx_membed(int argc,char *argv[]
    { "-multi",   FALSE, etINT,{&nmultisim},
      "HIDDENDo multiple simulations in parallel" },
    { "-replex",  FALSE, etINT, {&repl_ex_nst},
-     "HIDDENAttempt replica exchange every # steps" },
+     "HIDDENAttempt replica exchange periodically with this period (steps)" },
    { "-reseed",  FALSE, etINT, {&repl_ex_seed},
      "HIDDENSeed for replica exchange, -1 is generate a seed" },
    { "-rerunvsite", FALSE, etBOOL, {&bRerunVSite},
        dd_node_order = nenum(ddno_opt);
        cr->npmenodes = npme;
  
 -#ifdef GMX_THREADS
 +#ifdef GMX_THREAD_MPI
        /* now determine the number of threads automatically. The threads are
     only started at mdrunner_threads, though. */
        if (nthreads<1)
                gmx_fatal(FARGS,"Need at least two replicas for replica exchange (option -multi)");
  
        if (nmultisim > 1) {
 -#ifndef GMX_THREADS
 +#ifndef GMX_THREAD_MPI
                  gmx_bool bParFn = (multidir == NULL);
                init_multisystem(cr,nmultisim,multidir,NFILE,fnm,TRUE);
  #else
diff --combined src/tools/gmx_order.c
index f554c92a10c26329449c764e6ffa7654d849ceaa,cc47ba488f8084b6c6a50c668dc1ec54c554fbbb..64b62728cf12e47102ba09508230d3584f2e290b
@@@ -40,7 -40,7 +40,7 @@@
  #include <ctype.h>
  
  #include "sysstuff.h"
 -#include "string.h"
 +#include <string.h>
  #include "typedefs.h"
  #include "smalloc.h"
  #include "macros.h"
@@@ -802,7 -802,7 +802,7 @@@ int gmx_order(int argc,char *argv[]
        "Direction of the normal on the membrane" },
      { "-sl",     FALSE, etINT, {&nslices},
        "Calculate order parameter as function of box length, dividing the box"
-       " in #nr slices." },
+       " into this number of slices." },
      { "-szonly", FALSE, etBOOL,{&bSzonly},
        "Only give Sz element of order tensor. (axis can be specified with [TT]-d[tt])" },
      { "-unsat",  FALSE, etBOOL,{&bUnsat},
index 3446bb24aaf206bfb500a2ddc62956b75db1384d,9a5d1e1c9024cfbc56b47b1e10b58e2d93378de5..40b9526180d4710221fa4c83b7a03513b1e5aaac
@@@ -40,7 -40,7 +40,7 @@@
  #include <ctype.h>
  
  #include "sysstuff.h"
 -#include "string.h"
 +#include <string.h>
  #include "typedefs.h"
  #include "smalloc.h"
  #include "macros.h"
@@@ -414,13 -414,13 +414,13 @@@ int gmx_potential(int argc,char *argv[]
        "Take the normal on the membrane in direction X, Y or Z." },
      { "-sl",  FALSE, etINT, {&nslices},
        "Calculate potential as function of boxlength, dividing the box"
-       " in #nr slices." } ,
+       " in this number of slices." } ,
      { "-cb",  FALSE, etINT, {&cb},
-       "Discard first #nr slices of box for integration" },
+       "Discard this number of  first slices of box for integration" },
      { "-ce",  FALSE, etINT, {&ce},
-       "Discard last #nr slices of box for integration" },
+       "Discard this number of last slices of box for integration" },
      { "-tz",  FALSE, etREAL, {&fudge_z},
-       "Translate all coordinates <distance> in the direction of the box" },
+       "Translate all coordinates by this distance in the direction of the box" },
      { "-spherical", FALSE, etBOOL, {&bSpherical},
        "Calculate spherical thingie" },
      { "-ng",       FALSE, etINT, {&ngrps},
diff --combined src/tools/gmx_spatial.c
index bab9d0b57fee149736492e27f2345fe018726efe,fc30ea68f70c16d888287570d6b14aa457050912..8de82473c4a7e4a17f0fc2276e13dbfafe6a2980
@@@ -45,7 -45,7 +45,7 @@@
  #include "copyrite.h"
  #include "statutil.h"
  #include "tpxio.h"
 -#include "math.h"
 +#include <math.h>
  #include "index.h"
  #include "pbc.h"
  #include "rmpbc.h"
@@@ -120,7 -120,7 +120,7 @@@ int gmx_spatial(int argc,char *argv[]
      /*    { "-cut",      bCUTDOWN, etBOOL, {&bCUTDOWN},*/
      /*      "Display a total cube that is of minimal size" }, */
      { "-bin",      FALSE, etREAL, {&rBINWIDTH},
-       "Width of the bins in nm" },
+       "Width of the bins (nm)" },
      { "-nab",      FALSE, etINT, {&iNAB},
        "Number of additional bins to ensure proper memory allocation" }
    };
diff --combined src/tools/gmx_tcaf.c
index 5a7babd4695ae78a4490290868819a2cda992e47,10a55ac83e288c16ac962b2614caacff2032772a..b644870479fa8875f25204d53f88ca9c2ee5bc32
@@@ -49,7 -49,7 +49,7 @@@
  #include "index.h"
  #include "smalloc.h"
  #include "statutil.h"
 -#include "string.h"
 +#include <string.h>
  #include "sysstuff.h"
  #include "txtdump.h"
  #include "typedefs.h"
@@@ -146,7 -146,7 +146,7 @@@ static void process_tcaf(int nframes,re
    do_view(oenv,fn_tc,"-nxy");
    
    if (fn_cub) {
-     fp_cub = xvgropen(fn_cub,"TCAF's and fits", "Time (ps)","TCAF",oenv);
+     fp_cub = xvgropen(fn_cub,"TCAFs and fits", "Time (ps)","TCAF",oenv);
      for(kc=0; kc<nkc; kc++) {
        fprintf(fp_cub,"%g %g\n",0.0,1.0);
        for(i=1; i<ncorr; i++) {
@@@ -227,23 -227,23 +227,23 @@@ int gmx_tcaf(int argc,char *argv[]
      "not independent). For each k-vector the sine and cosine are used, in",
      "combination with the velocity in 2 perpendicular directions. This gives",
      "a total of 16*2*2=64 transverse currents. One autocorrelation is",
-     "calculated fitted for each k-vector, which gives 16 TCAF's. Each of",
-     "these TCAF's is fitted to f(t) = exp(-v)(cosh(Wv) + 1/W sinh(Wv)),",
-     "v = -t/(2 [GRK]tau[grk]), W = sqrt(1 - 4 [GRK]tau[grk] [GRK]eta[grk]/[GRK]rho[grk] k^2), which gives 16 values of [GRK]tau[grk]",
-     "and [GRK]eta[grk]. The fit weights decay with time as exp(-t/wt), and the TCAF and",
-     "fit are calculated up to time 5*wt.",
-     "The [GRK]eta[grk] values should be fitted to 1 - a [GRK]eta[grk](k) k^2, from which",
+     "calculated fitted for each k-vector, which gives 16 TCAFs. Each of",
+     "these TCAFs is fitted to [MATH]f(t) = [EXP]-v[exp]([COSH]Wv[cosh] + 1/W [SINH]Wv[sinh])[math],",
+     "[MATH]v = -t/(2 [GRK]tau[grk])[math], [MATH]W = [SQRT]1 - 4 [GRK]tau[grk] [GRK]eta[grk]/[GRK]rho[grk] k^2[sqrt][math], which gives 16 values of [GRK]tau[grk]",
+     "and [GRK]eta[grk]. The fit weights decay exponentially with time constant [MATH]w[math] (given with [TT]-wt[tt]) as [MATH][EXP]-t/w[exp][math], and the TCAF and",
+     "fit are calculated up to time [MATH]5*w[math].",
+     "The [GRK]eta[grk] values should be fitted to [MATH]1 - a [GRK]eta[grk](k) k^2[math], from which",
      "one can estimate the shear viscosity at k=0.[PAR]",
      "When the box is cubic, one can use the option [TT]-oc[tt], which",
-     "averages the TCAF's over all k-vectors with the same length.",
-     "This results in more accurate tcaf's.",
-     "Both the cubic TCAF's and fits are written to [TT]-oc[tt]",
+     "averages the TCAFs over all k-vectors with the same length.",
+     "This results in more accurate TCAFs.",
+     "Both the cubic TCAFs and fits are written to [TT]-oc[tt]",
      "The cubic [GRK]eta[grk] estimates are also written to [TT]-ov[tt].[PAR]",
      "With option [TT]-mol[tt], the transverse current is determined of",
      "molecules instead of atoms. In this case, the index group should",
      "consist of molecule numbers instead of atom numbers.[PAR]",
      "The k-dependent viscosities in the [TT]-ov[tt] file should be",
-     "fitted to [GRK]eta[grk](k) = [GRK]eta[grk]0 (1 - a k^2) to obtain the viscosity at",
+     "fitted to [MATH][GRK]eta[grk](k) = [GRK]eta[grk][SUB]0[sub] (1 - a k^2)[math] to obtain the viscosity at",
      "infinite wavelength.[PAR]",
      "[BB]Note:[bb] make sure you write coordinates and velocities often enough.",
      "The initial, non-exponential, part of the autocorrelation function",
    static real wt=5;
    t_pargs pa[] = {
      { "-mol", FALSE, etBOOL, {&bMol},
-       "Calculate tcaf of molecules" },
+       "Calculate TCAF of molecules" },
      { "-k34", FALSE, etBOOL, {&bK34},
        "Also use k=(3,0,0) and k=(4,0,0)" },
      { "-wt", FALSE, etREAL, {&wt},
diff --combined src/tools/gmx_tune_pme.c
index 0c8a38032dd6bf2bbb972c592e2b8e3ed2101b5f,a1cd876af9b7dd9959f03a65c43b524c7b7cd7e2..1732cb9b1df04da233c7d0aece6b34f4061e3190
@@@ -2124,7 -2124,6 +2124,7 @@@ int gmx_tune_pme(int argc,char *argv[]
        { efXVG, "-dhdl",   "dhdl",     ffOPTWR },
        { efXVG, "-field",  "field",    ffOPTWR },
        { efXVG, "-table",  "table",    ffOPTRD },
 +      { efXVG, "-tabletf", "tabletf",   ffOPTRD },
        { efXVG, "-tablep", "tablep",   ffOPTRD },
        { efXVG, "-tableb", "table",    ffOPTRD },
        { efTRX, "-rerun",  "rerun",    ffOPTRD },
        { efXVG, "-runav",  "runaver",  ffOPTWR },
        { efXVG, "-px",     "pullx",    ffOPTWR },
        { efXVG, "-pf",     "pullf",    ffOPTWR },
 +      { efXVG, "-ro",     "rotation", ffOPTWR },
 +      { efLOG, "-ra",     "rotangles",ffOPTWR },
 +      { efLOG, "-rs",     "rotslabs", ffOPTWR },
 +      { efLOG, "-rt",     "rottorque",ffOPTWR },
        { efMTX, "-mtx",    "nm",       ffOPTWR },
        { efNDX, "-dn",     "dipole",   ffOPTWR },
        /* Output files that are deleted after each benchmark run */
        { efXVG, "-brunav", "benchrnav",ffOPTWR },
        { efXVG, "-bpx",    "benchpx",  ffOPTWR },
        { efXVG, "-bpf",    "benchpf",  ffOPTWR },
 +      { efXVG, "-bro",    "benchrot", ffOPTWR },
 +      { efLOG, "-bra",    "benchrota",ffOPTWR },
 +      { efLOG, "-brs",    "benchrots",ffOPTWR },
 +      { efLOG, "-brt",    "benchrott",ffOPTWR },
        { efMTX, "-bmtx",   "benchn",   ffOPTWR },
        { efNDX, "-bdn",    "bench",    ffOPTWR }
      };
        { "-multi",     FALSE, etINT,  {&nmultisim},
          "Do multiple simulations in parallel" },
        { "-replex",    FALSE, etINT,  {&repl_ex_nst},
-         "Attempt replica exchange every # steps" },
+         "Attempt replica exchange periodically with this period (steps)" },
        { "-reseed",    FALSE, etINT,  {&repl_ex_seed},
          "Seed for replica exchange, -1 is generate a seed" },
        { "-rerunvsite", FALSE, etBOOL, {&bRerunVSite},
diff --combined src/tools/mk_angndx.c
index 25215fdcefea4656615449f417efc4e145392edd,5acb833b538fea6a8400151ac70cb531fe7b671f..b159ecae2f94f59f4d39137b1dddc9a61b7a65f3
@@@ -173,7 -173,7 +173,7 @@@ static int *select_ftype(const char *op
    if (opt[0] == 'a') {
      *mult = 3;
      for(ftype=0; ftype<F_NRE; ftype++) {
 -      if (interaction_function[ftype].flags & IF_ATYPE ||
 +      if ((interaction_function[ftype].flags & IF_ATYPE) ||
          ftype == F_TABANGLES) {
        (*nft)++;
        srenew(ft,*nft);
@@@ -218,7 -218,7 +218,7 @@@ int main(int argc,char *argv[]
      { "-hyd", FALSE, etBOOL, {&bH},
        "Include angles with atoms with mass < 1.5" },
      { "-hq", FALSE, etREAL, {&hq},
-       "Ignore angles with atoms with mass < 1.5 and |q| < hq" }
+       "Ignore angles with atoms with mass < 1.5 and magnitude of their charge less than this value" }
    };
   
    output_env_t oenv;