Another MacOSX rpath fix

Version comparison was wrong. 2.8.11.x is greater 2.8.11 and thus
was using the 2.8.12 method.

Change-Id: I3eda8c6239ad13194a04fa1da59e99adf2e68519
Remove overeager selection index group check

The check for sorted groups in selections was a bit too eager, and
prevented use of many index groups that would previously have been
perfectly valid for, e.g., g_bond, with gmx distance.  Remove the
check.  Instead, fix the case where unsorted group is passed as the
value of a selection, and add tests for that.

Will reinstantiate the check later in another form, as currently
unsorted index groups get silently accepted and treated in a more or
less random manner in all other cases.  However, this change provides
a usability improvement that could be nice to have, even if I don't
immediately have time to implement the check.

Change-Id: I86e935d8bd08e63a9e3d01fb5a4084d96c5b7006
Default SD integrator is now sd1 by Nicu Goga

The default SD integrator is now sd1, sd2 is deprecated. grompp
and mdrun both warn about sd2, and recommend sd.

The new sd1 integrator was developed by Herman Berendsen and
implemented by Nicu Goga.
Without constraints the sd1 integrator is nearly unchanged.
With constraints the new sd1 integrator is now as accurate as normal
MD with a leap-frog integrator, whereas the sd2 integrator will give
a slightly too high temperature.

Fixes #1496

Change-Id: I02b4537b05742ed499a84b625c4d4bf8994c0304
Use parallel terminology more consistently

In user-facing docs, log and debug output, we should be consistent.
(Later, in master, we can fix the code and comments). Definitions:

* core: hardware that actually executes instructions
* socket: a group of cores sharing (e.g.) L3 cache
* node: a group of sockets not needing a network connection
  to run in parallel
* thread: vague - an instruction stream (but should not be used
  if one of the foregoing is more appropriate)
* rank: an MPI rank (of either flavour), thus containing at least
  one thread
* process: in mdrun, regarding parallelism, only used when
  needing to distinguish real MPI from tMPI
(These, or similar, will end up in some user docs shortly.)

The goal is to express ourselves in the most relevant abstraction, not
all of them. For example, we should talk about the number of OpenMP
threads per MPI rank without observing that there are two kinds of
implementations of MPI, unless we need to draw a relevant distinction
between those two kinds of implementations.

Where debug output seems more like dumping a data structure than
describing logical state, I've left the names in strings referring to
the members of the data structure (e.g. cr->nodeid, which refers to
the MPI rank).

Changed variable name in gmx_check_thread_affinity_set() from ncpus to
nthreads_hw_avail to make clear that the associated change to the
debug string is correct.

Doubtless there are still uses of "process" that should refer to
"rank," but we use "process" to mean very many different things, so it
is hard to use sed-like tools effectively. Ideally, clang libTooling
would make it easy to find only uses that are present in strings, but
I don't have time to learn how to do that now.

Change-Id: I4dc39dff8be81a30ce803d7833dc305d29d8d188
Update TNG build system

GROMACS can now find and use a copy of TNG installed on the system.
The default is still to compile the version shipped with GROMACS.
That compilation is now handled using the BuildTNG.cmake script, so
there is no duplication between the GROMACS and TNG CMake code that
builds TNG, and the result is fully portable with all supported
environments and CMake versions.

Moved TNG handling into src/gromacs/CMakeLists.txt where it is
actually used.

Bumped the version of the TNG library to 1.6. Corresponds to commit
ba9aea42b01 in the TNG repository.

Renamed md5 things with GROMACS prefixes, so that there is no internal
name clash with the md5 things in TNG, and no client of libgromacs can
get unexpected behaviour.

Updated GMX_USE_TNG=off to work, and silenced unused-parameter
warnings associated with that setting.

Refs #1453 (partial fix)
Fixes #1520

Change-Id: I7ac9b578e45b8e75c67c9df9440eed968a3a9371
Fixed CMAP generation for alanine dipeptide special residue

Fix CMAP to work for residues not detected as proteins, and
make sure we correctly process single-residue entries that
have residue-internal CMAP definitions. In particular, this
is important for the default alanine dipeptide special
residues (ALAD) in Charmm27.

Fixes #824.

Change-Id: I5538b26175f12dcac983491323b5b6ee303c8434
Fix error for no 64bit file support

Because the cache was set the error wasn't shown after
rerunning cmake.

Change-Id: I9def74eaecd02d2f2bfc6c40b7954404e2890717
Merge branch 'release-4-6' into release-5-0

Conflicts:
	CMakeLists.txt
Left CMake version condition in favour of new fix from release-4-6;
actual settings logic from release-5-0.

Change-Id: I493571b2aca74647a7547d5c2d9463679bdd858a
Merge "Merge branch 'release-4-6' into release-5-0" into release-5-0
Fixes #1532, SEGV in g_current.

Unfortunately the tool does not do anything useful at this point
in time it seems, it just produces one graph that is non-zero

Change-Id: Ie991b8200628253ab308d36cb5afc80138b1acff
Allow printing potential energies to dhdl.xvg file

Previously, only total energies were printed out to the dhdl.xvg
file.  In many cases, it is more useful to print out just
the potential energies.  For example, when doing mdrun -rerun,
and comparing to output run without rerun, the velocities may not
be identical, which makes it difficult to compare the total
energies between runs when computing free energies and other
observables. dhdl-print-energy can now be 'no', 'total',
or 'potential'. The alternative 'kinetic' should generally not
be needed, since that can be done analytically in all cases.

Backwards compatible in the .tpr since gmx_bool is an int. The
old false value will be interpreted as 'no', and the 'yes' value
as 'total' energy, which will reproduce the old behavior.

Fixes #1329

Change-Id: I16828ef07c46bcfc61fe03744cbf251c00160636
Enable rtp angle/dihedral entries not connected by bonds

pdb2gmx has previously silently ignored any angles or
torsions not connected by bonds. This patch adds code
to mark with RTP/hackblock entries that have been
assigned in this search, and afterwards we add those
that have not yet been matched. In particular, this makes
it possible to have angles or torsions in RTP entries
even if those atoms are not connected by bonds.

Fixes #1276.

Change-Id: I61c3c3954ef8c4cd59956d88b73c6a69c1a66c65
Fix detection of i386 in tmpi

The i386 without underscore is not recommended for new code and is not
defined if -std=... (other than gnu...) is passed on the command line.
__i386__ is already present for GCC 3.2 so there is no need for the old
name. Also we use __i386__ in other places in the code already.
We dont pass such a flag by default for 4.6, but the user could.
In 5.0 this fixes tmpi if the compiler supports c++11 and we pass
std=c++11.

Fixes #1533

Change-Id: I615cb91d3e3196a90fa4ba03fa183bf47af5d444
Merge release-4-6 into release-5-0

Change-Id: I89230f8a117d9636570e573b7b2657c79aea51c0
Remove some hardcoded selection string buffers

This removes some arbitrary limitations on the length of the input
string.  The error handling would still be in the need of a bigger
overhaul (all of these were in the error handling parts).

Fixes #1538, related to #655.

Change-Id: I1112b5ccae526cf3b8fd079bbabf8d7f61e52635
Use cosistent style when referring to force fields.

Refs #677.

Change-Id: I386c6d9782c88d5af929a3230cd3beb06f2cfbd2
Updated LJ-PME documentation

Added a description of the more accurate treatment of the LJ
combination rule treatment for LJ-PME.

Also updated the Verlet support table.

Removed old figure describing the quality of an old approximation no
longer available in the code.

Added some usage suggestions.

Change-Id: If671536bced4a404caab10b7aa386f8f88f95c46
Merge "Merge release-4-6 into release-5-0" into release-5-0
Convert install guide to markdown

Adds `make install-guide` to make both a plain-text INSTALL for the
tarball, and a monolithic HTML install guide for uploading to the
website. Intended for processing with pandoc, but I don't think
there's any pandoc-specific extensions used. Naturally, if the build
system doesn't have pandoc, then this make target is not available,
just like the other documentation features.

Added more description about various SIMD instruction sets,
portability, and how to use compilers and the GMX_SIMD setting.

Added summary of important CMake options for typical GROMACS
installations.

This now does some variable interpolation to keep accuracy up without
active maintenance, so setting some such variables gets changed a bit.

Mentioned more optional build components

Minor textual changes to the install guide.

Fixes #1440. Refs #1242

Change-Id: Iff8e165759fbf8cc5199c8447e912403b8a79a17
Fixed free energy with LJ-PME

First, Only the normal LJ part of the potential was
shifted for LJ-PME with potential-shift
modifier in the free energy kernel,
and not the Ewald component. This had an effect
of roughly 0.05% on the total energy. Second,
Berk found that the verlet nbnxn SIMD LJ-PME kernel
had an issue that caused the potential and force
to be slightly off. With this patch, both
potential and force match the non-free-energy
kernel perfectly with at lambda=0.

Change-Id: I4bc53ce1bdb96ba06656b86470dbf8dbd1e81972