fixed DD charge group displacement error check

One of the two checks for large charge group displacement during
domain decomposition mixed the dimension index and the dimension.
The check was correct for decomposition in x, xy or xyz. Other setups
could lead to false positives and false negatives (unlikely).
Fixes #959

Change-Id: I9e38c43f931e6ca8149faae40f49f675a7ae9664
Fix overlapping memcpy

The memcpy were not neccessary.

Fixes #984

Change-Id: Iea1d34756444cba2493940ab3f2252e7c108323f
Fixed segv in essential dynamics module

Change-Id: Ia5657a535e7e31d55bf2b310a20dfee2a5e3b7f4
Merge "Fixed segv in essential dynamics module" into release-4-5-patches
Added comment in get_structure about which structures are included

This patch just adds a comment and refactors natoms -> nav to better
clarify when we deal with the AVERAGE and when with the REFERENCE (fit)
structure. 'natoms' is not a good choice if we are talking about
the number of atoms in the average structure only.

Change-Id: I7025fb6ea59af0a7bcd7953a25abd09be0dd2979
Fixed calculation of projection for STAR and/or SORI

Both for STAR and for SORI, if provided to make_edi, the
fit structure and the average structure can be the same
(in these cases the old code works fine), or one can do
the fit on another (possibly larger) part of the molecule.
In the latter case, STAR (or SORI) contains first the fit and
then the average structure (concatenated). Here, the fit has to
be performed using the fit structure while the projection(s) have
to be calculated using the average structure. This is now
taken care of by the 'avindex' index variable.

Change-Id: Id97235030f3394df2931e30249083ad439dbe791
Merge "Added comment in get_structure about which structures are included" into release-4-5-patches
fixed incorrect TPI results with dynamic box

TPI with a box in the -rerun file different from the tpr gave systematic
errors. In Gromacs 4.0 there was a minor error, but not systematic.
Now TPI with any box setup is fully correct. Fixes #799

Change-Id: I69279874c2d1192e63efa224a0f035d43e919e88
Fixed essential dynamics / flooding group PBC serial

In former versions, the PBC representation of essential dynamics /
flooding group atoms could be incorrect in serial runs if the ED group
contained more than a single molecule. In multi-molecule cases, the required
steps to choose the correct PBC image in communicate_group_positions()
therefore need to be performed also in serial runs. Since the PBC representation
can only change in neigborsearching steps, we only need to check the
shifts then. In parallel, NS is signalled by the bUpdateShifts
variable, which is set in dd_make_local_ed_indices(). The latter
function is however not called in serial runs; but still we can pass
the bNS boolean to do_flood() to signal the NS status. For essential
dynamics, unfortunately, since do_edsam() is called from constrain(), there
is no information about the NS status at that point. Until someone
comes up with a better idea, we therefore do the PBC check in every step
in serial essential dynamics - the performance impact will be negligible
anyway.

Change-Id: I86336a5e34131bdeac7e28f35b1ccb633450e54e
Merge "fixed incorrect TPI results with dynamic box" into release-4-5-patches
fixed trjconv not writing velocities with cpt input

Fixes #930

Change-Id: I554dd729484a4238620f2773b5c3b3672cab72ee
Added TIP4P back into CHARMM27

I think Par erroneously removed this in 73b6d636a

Change-Id: Ie9f64636b1b28030ec86248649acad343b7c9a76
Optional computation of fluct. props in g_energy. Fixes #954

Added a command line option -fluct_props to turn on the computation
of heat capacity etc. in g_energy. This prevents a warning message
from appearing on the screen each time the program is run.

Change-Id: I0cac44494ec5a366762d4d0a915146298d2ce1e0
Fix coordinate is zero check in gmxcheck

Change-Id: I7504d235edc659b586d61243f3cbf72add2f92b2
Merge "Fix coordinate is zero check in gmxcheck" into release-4-5-patches
Added PGLU entry in aminoacids.n.tdb for OPLS-AA.

Previously, pdb2gmx would fail during terminus selection for this residue.

Change submitted initially on the master branch, then abandoned.
(https://gerrit.gromacs.org/#/c/1290/)

Fixes #804.

Change-Id: Ic810242dc65019858c0332d352ef1ba96d4662d6
Newer version of thread_mpi, with various fixes, including tMPI_Scan()

- Implements tMPI_Scan()
- Many doxygen fixes
- removed unused variables from atomic operations
- Added C++11 compatible thread and mutex class

Change-Id: I4cce48627fa846da3c599a7de64d3898c358390b
bug fix for pme.c MPI_COMM_NULL fix dcf8b67e

Change-Id: Idb233db1337bcb881041caec96572e5df6183e6e
Fixes too many backup files for *.nroff files

Problem introduced by 26bd5f7ac7af. nroff files are generated
automatically and one could get erorr message when 99 backup files
existed.

Change-Id: Ia0a5c7e04064a0d304266e1dc6af347d3e846864
Update use of CPack components and add install targets

* Removed component runtime and replaced it with component "scripts",
a component for each tool, and the component group tools. This means
CPack is capable of dealing with a single tool, or with the whole
group.
* Moved gmxpreprocess library to libraries component.
* Created CPack dependencies so that shared libraries accompany
executables.
* Created non-CPack install targets for each GROMACS tool, e.g.
"make install-grompp". Shared libraries are installed with these
tools as appropriate. Using library suffices could be right here,
but that's the user's problem to solve.

Development, regression testing and bug testing is more convenient if
you can easily build and install just a subset of tools. This could
always have been done with CMake black magic, but these targets makes
lives easier. Also users can now easily install MPI or
double-precision flavours of selected tools as suitable.

Change-Id: I1053f7ff91d50169ac930f1ac5b84378d3ab2e67