Add Mingw warnings

Change-Id: I8825ee1948fe03be751f09bc87db050f89fa49bd
Version 5.0.1

Bumped version numbers to remove -dev tags, bumped regressiontest
md5sum.

Change-Id: I1ec0a9b850a796d44e89025b742521ff48d8f482
Version bumps after new release

Numbers bumped, -dev tag replaced.

Change-Id: Ie5d579a360e935743e99577e0d01779569156893
Fix build for external boost 1.56.0

exception/detail/attribute_noreturn.hpp has been removed in 1.56. We
shouldn't have used a detail header in the first place. In master
we can use GMX_ATTRIBUTE_NORETURN but 5.0.x it is defined only
for code analysis not for compilers.

Change-Id: I6f26d6ddc62c73f583d324f7c794a499c274b394
Check for implicit solvent + Verlet scheme

Fixed #1570

Change-Id: I8734c2dc99d3bc3e0a79ae043d86854446f3b495
Fixed DD state collection issue

Collecting the cg distribution state to the master (for output
of replica exchange) could go wrong when the DD was out of sync.
This code path was probably never executed.

Change-Id: I14b41c15ddc827a46f7c6448fb7bd90414f8e210
Fix malformed CUDA version macro check

The CUDA_VERSION macro check is incorrect in two places. The first is
harmless as it is related to legacy CUDA 3.2 version's reporting. The
second occurrence affects the check that enables stream priorities and
due to the incorrect check, with CUDA 5.5 priorities have not been used.

Fixes #1594

Change-Id: Icf781d41549c39b6b913c11bb11d4dc4e9f3be9c
Merge release-5-0 into master

Conflicts:
	CMakeLists.txt
		only version changes not needed in master
	src/gromacs/utility/gmxassert.h
		better fix already in master

Change-Id: I8af70d807972758149e9f69b420d528269e9bebd
Added flat-bottom cylindrical restraints in x and y.

The code previously only allowed the long axis of the cylinder
to be aligned along z.  This patch allows the cylinder to be
aligned along any axis.

Old topologies and .tpr files will still work for all geometries with
g values from 2 to 5, as 2 is now just a synonym for a z-directional
cylinder.  The new values are g=6 for x, g=7 for y, and g=8 for z.
The manual has been updated to reflect these changes.

Introduced a new static function that computes forces and energy for the
flat-bottom restraint.

Refs #1577

Change-Id: I40e0bd35225170e13a18ee54f6798470e697f29d
Remove .tpa, .tpb, .tpx, .trj files. Part of #1500.

Change-Id: Ia055cbf5311bf8780ca826c767207e5172d1b7e2
Improve performance of MIC exponential

The limited precision is due to argument scaling
rather than the exponential function lookup, so
instead of iterating we can improve the accuracy
with a simple correction step, similar to what
was done for the recent AVX-512ER implementation.

Change-Id: If55e7c4cefac5022e7211dfa56686cb9ee03a54a
Enable static anon namespace workaround on pathscale

The pathscale compilers suffer from the same static
anon namespace bug as the intel ones. Since the bug
is no longer Intel-specific, the INTEL_ prefix in
the macro has been removed.

Change-Id: Id87c9386cb831ba43ae05b2006dcfd0f1bf06be8
Manually sort some includes in src/gromacs

Sort manually includes in files where there are #ifdefs within the
include statements and the automatic sorter does not do a good job
because of this.

This commit does this for files found in src/gromacs/.  Files from other
locations will be done in a separate change if there are any.

Fix nbnxn_cuda.h to work without requiring code to include
nbnxn_pairlist.h first.

Change-Id: I26fa1a28ea9094a62c826d8ee65ddabac345da68
Use absolute include paths in nbnxn kernels

Currently, the WIP automatic include sorter expects these files to be
included as paths relative to src/, and so does doc-check after changes
done for the include sorter.  Change the generator source files to
account for this, and regenerate the kernels.  Can be improved in the
future.

Make the kernel generator work even if the current working directory is
not the same as the script directory.

Change-Id: Ibc603dd0c85291f0c8fede394d9fa35b39c3a0a4
Sort all includes in src/gromacs

Used:
  admin/reformat_all.sh --pattern=src/gromacs includesort -B=../build
after building the doc-check target (whose dependencies are needed for
the sorter).

Change-Id: Icde0fb5cb5bc082fb4381d4cba1211329bad3fa5
Sort includes outside src/gromacs

Change-Id: I7efefc3835d1a5974886ef680a9fb0ddce11ee3e
Move _GNU_SOURCE to gmxpre.h

This makes life simpler in files that require it, and removes clutter
from there.  The only (minor) disadvantage is that it is now defined
everywhere, so people who develop on a system where it has effect may
accidentally introduce additional function calls that depend on the
define.  But Jenkins should catch those easily.

Change-Id: Ia4ed8b5d189138694076705ded695d818bbc73e3
Convert domdec code to C++

Used std:: versions of at least some calls to min, max, sqrt and pow,
eliminated unused variables, used a named floating-point constant,
used a static_cast to make clear that we intend to truncate to integer
in one place, made some iteration variables local to their block,
protected some uses of fplog and fshift.

Eliminated some redundant #ifdef GMX_MPI, changed the range of others
to declare variables only where used.

Converted some neighbour-search constants to be static const real,
rather than macros, with the side effect of not having to deal
with overloaded std::sqrt for constants.

Introduced one work-around (duplicating the code of add_ifunc) for
dealing with the way that nral is a complicated function of
ftype. Static analysis was not being consistent in the way it was
choosing code paths with possible values of nral in different
functions. Co-locating two loops over nral resolves the issue.

Added assertions that help static analysis understand that settles are
kinds of constraints and that sane things happen elsewhere, so that
code paths that look like they might be called when only
inter-charge-group settles exist are actually well formed.

Added yet more assertions to reassure the analyzer that we handle
memory allocation with charge-group linking correctly.

Clarified a PBC-related variable name.

Change-Id: I5d1cf06c866098d183d7fe5aa023a292ca3d109b
Remove documentation references to optimize-fft

The functionality was removed before 5.0 was released

Change-Id: I97d55338f7026b0410c4bdec52a42ac8c24016de
Add gmx_getpid()

This allows getting rid of all conditional includes and some conditional
compilation in two different source files.

Change-Id: I3095843a2155b087730362a4f3ef409ccf24018c