Fixes where mdrun could return incorrect results

Fixed reading of bonded tables

Now gmx mdrun -tableb must name all tabulated bonded interaction table files explicitly, because the former implicit naming scheme is incompatible with the new command-line checking code.

Issue 1913

Fixed bug with flat-bottomed position restraints and MPI and OpenMP

The flat-bottom reference coodinates got mixed up when running with MPI + OpenMP.

Issue 1969

Fixed multi-sim + DD + simple distance restraints

The check should not look for the existence of a multi-sim, because the user must also set GMX_DISRE_ENSEMBLE_SIZE in order to get ensemble restraints.

Issue 1989

Fixed OpenCL error with empty domains

We now don’t call the force clearing when there are zero elements to clear, as can happen with an empty domain with DD. Also simplified the clearing thread count calculation.

Issue 1990

Handled partially frozen and constrained atoms

Atoms frozen along some, but not all dimensions would still be moved along all dimensions by constraints. Now such dimensions are frozen. Note that the initial configuration might not obey the constraints, which leads to conflicting demands of freezing and constraining. Partially frozen atoms in the initial configuration will still be constrained along all dimensions (but will be frozen during the run).

Issue 1960

Fixed OpenCL error with empty domains

We now don’t call the force clearing when there are zero elements to clear, as can happen with an empty domain with DD. Also simplified the clearing thread count calculation.

Issue 1990

Fix compile error for IBM VMX on ppc64

gcc-5.1 does not provide vec_mul(), only vec_madd(). This has already been fixed in the master branch with the new implementation.

Issue 1812

Correct nrdf for 1D/2D systems

With COMM removal, grompp would subtract degrees of freedom also for VCM groups with fully frozen dimensions, i.e. 1D/2D systems. Also fixed division by zero for groups with #DOF=0 with VV.

Issue 1923

Avoid assertion failure in pme_loadbal_do

When ir->init_step % ir->nstlist != 0 an assertion would fail in pme_loadbal_do. If it does not fail every time, the assertion can safely be replaced by a conditional return, which is now done in this case.

Issue 1870

Fixed incorrect CMAP parsing

The CMAP parsing in grompp expected exactly one space between atomtypes and would silently corrupt the parameters when more than one space was present.

Also added CMAP comparison to gmx check.

Issue 1898

Changed norm(...) > 0 condition to norm2(...) > 0 in init_ekindata()

Fixes issue Issue 1856 on K computer

Fix excessive list splitting

Due to a possible integer overflow, the pair list splitting code could end up over-splitting pair lists and causing large performance degradation. Due to the larger processor count, runs using AMD GPUs, using 100k+ simulation systems are more prone to suffer from the issue.

Issue 1904

Fix Ewald 3DC dipole with Verlet scheme

With the Verlet scheme, the dipole for the Ewald 3DC correction was summed twice over the PP-ranks at non-NS steps, leads to a correction that was a factor #PP-ranks too high.

Issue 1916

Removed restriction on dihdraltypes order

Wildcards are allowed for dihedraltypes by grompp. But it was assumed, with only code and no user documentation, that wildcard types come after fully specified types. If this order was switched, grompp would silently choose the wildcard matches. Now the match with the most real atom type matches is chosen. Added a paragraph to the bonded parameter section in the manual on dihedral wildcard matching.

Issue 1901

Fix tabulated wall potential

The dispersion and repulsion of the tabulated wall potential were a factor too small by a factor 6 and 12 respectively.

Issue 1912

Correct mdrun tMPI (non-)parallel error message

Issue 1931

Fixed expanded ensemble lambda values when proposing the initial state

When fep_state was zero, potentially wrong lambda values were being used.

Issue 1995

Fixes for mdrun performance issues

Added support for CUDA CC 6.0/6.1

This change adds build-system and kernel generator support for the Pascal architectures announced so far (GP100: 6.0, GP104: 6.1) and supported by the CUDA 8.0 compiler.

By default we now generate binary as well as PTX code for both sm_60 and sm_61 and given the considerable differences between the two, we also generate PTX for both virtual arch. For now we don’t add CC 6.2 (GP102) compilation support as know nothing about it.

On the kernel generation side, given the increased register file, for CC 6.0 the “wider” 128 threads/block kernels are enabled, on 6.1 and later the 64 threads/block remains.

Some macros that were incorrectly left behind by the adbada4 fix had to be eliminated from the CUDA host code because these caused double definitions.

Re-enable LJ-PME + Lorentz-Berthelot on GPUs

We do have GPU kernels which were enabled in 5.1.0, but got disabled with some refactoring before 5.1.1.

Fixes for gmx tools

Fixed gmx dos implementations

Issue 1996, Issue 1813

Prevented gmx pdb2gmx writing to unallocated memory making specbonds

Marked optional input/output files in gmx order

Mark files that are not always read, or which are not written if the user does not ask for them, with ffOPTRD/ffOPTWR instead of using ffREAD/ffWRITE. With changes in 5.1, files marked with ffREAD are really mandatory, since we check already during command-line parsing that the file actually exists (so that we can give a good error message). This change also improves the understandability of the help.

Issue 1954

Removed broken memory reallocation in gmx dielectric

Issue 1920

Fixed non-normalization of FFT autocorr

The function many_auto_correl incorrectly divided by the number of data points, leading to incorrect absolute values of autocorrelation functions, as e.g. out by gmx analyze -ac -nonormalize. Also simplified the FFT size calculation.

Added a test for -nonormalize functionality.

Issue 1914

New consistency checks

Added QMMM checks

QMMM only works with cutoff-scheme=group and dynamics. grompp and mdrun now check for this. Also fixed potential print of NULL string in init_gaussian.

Issue 1940

Build system enhancements

Ignore stderr when detecting SIMD and build info

Cray and some other stupid compilers echo extra stuff to stderr when compiling a normal source file. Unfortunately, the standard CMake try_run cannot ignore stderr, and we need to use some. Refactored our use to work around such compilers.

Issue 1881

Make more CMake variables advanced

This keeps the ccmake display down to things users are reasonably likely to want to change, including several introduced by FindCuda in recent CMake versions.

Issue 1764

Fixed SIMD detection on new AMD AVX CPUs without fma

We earlier assumed that all AMD CPUs had fused multiply-add support and could use AVX_128_FMA, but with this change we properly detect it and revert to AVX_256 otherwise.

Issue 1906

Warn about OpenMPI 1.8.6

Issue 1897

Improved documentation

Fixed constants, units and conversion factors

The definition of pressure was wrong, should be in bar. There’s no point in giving a standard conversion factor to other units that nobody uses.

Corrected value of electric conversion factor f in the manual

  • As suggested by Christopher Neale
  • Made a new latex command for the value so that it can appear consistently throughout all uses in the .tex manual
  • changed the value to f = 138.935 458(9), which is value and standard deviation calculated from NIST 2010 CODATA, as also used by GROMACS in units.h (full value calculated from numbers in units.h is f = 138.935 457 839 ... )
  • If I calculated correctly, the pre-June-2015 value of the standard deviation was correct, just the last two digits of the value itself were swapped in some places 58(9) <-> 85(9)
  • I believe commit 1ee3b15530a5 accidentally overwrote the standard deviation with digits from the value itself

Fixed mdp label generation

The extra colons meant the rst didn’t generate the label that is expected.

Spelling fixes

Thanks to Nicholas Breen

Improved/enlarged Fig. 4.9 in manual for better readability

  • Made the whole figure somewhat larger
  • Made the axis text larger
  • Added/updated the units: - kJ mole-1 -> kJ mol-1 - added degree unit
  • Changed plot type from .eps to .pdf

Re-generated EPS for figure 4.8

It was hard to distinguish between i and j in this figure, which turns out to be from an inappropriate bounding box in the EPS version of it. Regenerated all three EPS components of Figure 4.8, which gives a satisfactory final appearance.

Fixed typo in Fourier dihedral equation

This now matches the version in the preceding subsection, and seems consistent with thoses equations and the code in convparm.c.

Updated reference manual text about PME tuning

Also removed some junk that has long been commented out.

Documented GMX_GPU_APPLICATION_CLOCKS

Added description for the use of the GMX_GPU_APPLICATION_CLOCKS environment variable.

House-keeping that reduces users’ problems

Reverted to old behavior for handling SETTLE errors

SETTLE errors were changed to fatal in 5.1.2. This causes problems with minimization of some systems, since a SETTLE error is likely to occur at the beginning of the minimization. This commit reverts that such that it only issues a warning as before.

Issue 1915

Properly reset CUDA application clocks

We now store the application clock values we read when starting mdrun and reset to these values, but only when clocks have not been changed (by another process) in the meantime.

Issue 1846

Used sysconf(_SC_NPROCESSORS_ONLN) better on x86

If we’re not on ARM and sysconf(_SC_NPROCESSORS_ONLN) doesn’t match sysconf(_SC_NPROCESSORS_CONF), we should use the former, as that is all that’s reliable, e.g. on x86 with hyperthreading disabled in the kernel.

Issue 1991

Prevented use of mdrun -maxh -multi

This didn’t work, but can’t be fixed safely. A proper fix has been made for the 2016 release.

Issue 1942

Ignore empty GMXLIB environment variable

If the GMXLIB environment variable was set, but empty, it triggered an assert (at least) in pdb2gmx. Now this case is silently handled as if the variable wasn’t set at all.

Part of Issue 1928

Fixed large file issue on 32-bit platforms

At some point gcc started to issue a warning instead of a fatal error for the checking code; fixed to really generate an error now.

Issue 1834