Updated dlist.c to recognize more atom names.

Previously, g_chi basically only worked correctly for OPLS-AA and
Gromos96 force fields, based on C-terminal atom names.  This commit
adds atom names for AMBER and CHARMM force fields so that g_chi
calculates dihedral properties for all residues.

Change-Id: I48517fb55bd46e7d49941f7902f4f6531e443e62
cmake: Improve some error messages

Lessons learned from the Q-bio summer school

Change-Id: I521a08ba3a83566582137740a0d097c0637d7d3e
Properly finalize MPI on mdrun -version. Fixes #1313

Change-Id: I1ae5f342da96980df322770d134555e2dc9fe712
Refactored preparation of buffer for NBNxN table loads

The outer and inner kernels try to be hardware-agnostic, but some
architectures need a thread-local buffer for transferring computed
table indices to integer registers via memory. It is better to set up
this buffer using a helper function that is implemented in
hardware-specific files, because the compiler can help prevent some
bugs. In particular, you can no longer forget to make a function
definition on non-SSE2. This eliminates one of the special-case kernel

Change-Id: I1ebdd15afaf03ff4559365867970b88e9ce0ed5e
Fixing problem caused by overflow in expanded ensemble.

Basic problem: logic was failing for single precision because of round off errors.
Solution: convert some of the intermediate arrays into double.

Fixes redmine #1314

Change-Id: Id7e3771d257bbeebeed2f340593b817015a0cd4c
Fixed reference SIMD code to work with MSVC

Also noted minor issue with rounding to even. Using rint would be
preferable, but that's even harder to work around on MSVC.

Change-Id: I495cf2d43cf0b33cc0896958f15703ba8632c7e4
Reordered FFTW fatal error; avoids using unset variables

Now variables that are set in FFTW detection are only used when the
variable that reports FFTW has been found is set (i.e. there has not
been a fatal error). Not sure why we haven't seen problems with this
so far, but we do see them on Power7 with cmake 2.8.8 when FFTWF is
not available.

Change-Id: I1a3e84002dda7f29f90eb532ab14ce51dfca6e5c
fixed parallel normal modes with PME

When doing a normal mode calculation with PME and (thread-)MPI,
the PME forces were incorrect. Also fixed some EM/NM output layout.
Fixes #1308

Change-Id: Ia7862fa62e235336c546824afdcbe28f37b145c5
Fixed GMX_DD_DUMP_GRID

The pdb format string no longer matched the parameters it was given

Change-Id: I682154a0986fdbd73ae414264982a68fed164c87
Fix minor wallcycle output issues

Document 19-character wcn name restriction better.

Enforce 19-character wcn name restriction better. The new behaviour
correctly truncates a wcn[] that is too long for the 19-printing
character field width of the wallcycle table.

Compress two names into one field for GMX_CYCLE_ALL correctly. The
previous version was buggy because the first call to snprintf()
resulted in 0 == buf[8], which suppressed output of the second name
completely. The previous version's second call to snprintf() was
probably wrong similarly.

Change-Id: I430ca6eb2bccfe3775e58bae4b6fc3326bcde706
Consolidated NBNxN SIMD kernel utility routines

Hardware-, precision-, and j-width-specific routines used only by the
NBNxN kernels are now all defined in
nbnxn_kernel_simd_utils*.h. Hardware-specific details are contained in
files specific to that hardware.

A major feature contained in this patch is a refactored treatment of
NBNxN particle-particle exclusions. This hides the
x86-implementation-specific details of using integer- or real-valued
SIMD registers and operations. Both inner and outer NBNXN loops are
now more independent of hardware.

* Moved SIMD types, constants and functions for exclusions to the
  NBNxN kernel module, because that is the only place where they are
  used.
* Introduced gmx_exclfilter type to hide the implementation detail of
  whether the masking is handled in integer- or real-valued SIMD
  registers
* Consolidated gmx_checkbitmask* likewise, and renamed to reflect that
  it returns a gmx_mm_pb
* Eliminated the need for gmx_castsi_pr, gmx_set1_epi32, gmx_load_si
  by recasting the code as the composite operation of
  gmx_load1?_exclfilter
* Through the above, eliminated the need for CHECKBITMASK preprocessor
  defines and checks
* Converted code macros to static inline functions
* Converted FILTER_STRIDE and NBFP_STRIDE to a static const instead of
  macro, since neither are ever used as an array dimension in C. This
  works towards using the compiler where possible and the preprocessor
  only where necessary.
* Introduced functions for exclusion mask loading so that there will
  be a link seam for testing with in master branch

TODO: Respond to two questions addressed to Berk embedded in new
comments.

Change-Id: I2a74638b982bdbf5a88442b93736df0a2f0c14b0
Fixes for Bluegene/Q

* Moved suffixing code to after where gmxManageBlueGene sets
  GMX_MPI. Since nothing depends on the suffixing until the calls to
  add_subdirectory(), this is safe. There is a complication from the
  way that GMX_MPI means "real MPI" for most of CMake and "real or
  thread MPI" in the source code; that is managed by GMX_THREAD_MPI=ON
  causing GMX_MPI=ON at a certain point. To cope with this, we add the
  "_mpi" suffix in response to GMX_LIB_MPI=on, which is how things
  should have been done back when GMX_MPI was co-opted, except that
  the suffixing was probably being done too early... Altogether, this
  change means that real-MPI binaries are always built with the _mpi
  suffix, like users have come to expect.
* Added compiler suppression for a useless information message that
  is otherwise issued for almost every source file
* Made the C and CXX platform files identical; I'd originally
  thought they could be combined on the command line, but
  that is not true

Change-Id: I26cb782a1b47cf48f47b80ec8c8d0a53db338872
introduced nbnxn data structure for bounding boxes

The nbnxn search code now uses a well organized bounding box data
structure instead of a complicated indexed plain float array
for the cluster bounding boxes.

Change-Id: Ia5adf2d33d495cff3178ca950e8c16aefcfef1fb
Fix detection and suggestion in gmx_cpuid for IBM QPX

Also made some variable names more descriptive.

Change-Id: I0eaac7ff6ce5cb0da82d9c54d10c555850a3dad1
Split up Verlet SIMD kernels for faster compilation

Each kernel is now defined in a seperate compilation unit, and the
files for the kernel functions, the kernel dispatcher function, and
their definitions are all generated by Python script. See its comments
for details. The generation is done by developers and the results
stored in the repo, to avoid CMake-time dependencies. The source for
the file generation is separated from the results of the generation.

On a 48-core AMD machine using GCC 4.7 for an SSE2 build (i.e. 4xN
Verlet kernels), the time for "make mdrun -j" went from 73 s to 34 s.

On a more recent 8-core Intel machine using GCC 4.6.4 for AVX_256
build (both 2xNN and 4xN), the time for "make mdrun -j" went from
81 s to 63 s.

On 16 cores of a POWER7 BlueGene/Q front-end node, time to compile
release-4-6 stays about the same (around 160s).

Also unwound some include file dependencies and removed repeated
definitions of some supporting structures and functions.

Change-Id: I0da1faf351defbe68d5ca43febcabddd93e21f0d
Set upper case of FFTW variable at the right place.

Fixes #1327

Change-Id: Ie9ef1fffceefef7d46f1e7a5a8ca3ceb22a81854
corrected grompp constraint/DOF warning with vsites

grompp now counts constraints after removing the ones with vsites.
Fixes #1322

Change-Id: I1f2b129fa5f4c5f56fea384f2749af833c92eabc
mdrun without OpenMP with thread-MPI now uses all cores

With the Verlet scheme, mdrun compiled without OpenMP would
often run on a single MPI-thread only.
Fixes #1317

Change-Id: I8fc43fe933ba23047f0ee9368ad9105cfc62eb4a
Fixing manual for sc-coul description.

fixes #1331

Change-Id: I84a388bf8a9e289b37ff838a0d335d96d4393fb2
made free energy PME kernel 40% faster

Also removed double assignments and unused variables.

Change-Id: Ia8202ee90f70da86474cc946707f016d8ad69286