Made distance restraints work with threads and DD
commitc1364cf4e4b14d3726ed7bcb7caa5c17affbecf7
authorBerk Hess <hess@kth.se>
Wed, 10 Aug 2016 10:23:03 +0000 (10 12:23 +0200)
committerDavid van der Spoel <davidvanderspoel@gmail.com>
Fri, 16 Sep 2016 08:04:42 +0000 (16 10:04 +0200)
treed9716b5f07a312ae010c8cbd022f7dbb8a16805b
parentd97be0dc79bdfedbea575ba3e7808bb4bfce7998
Made distance restraints work with threads and DD

The NMR distance restraints use several buffers for summing distances
that were indexed based on the index of the thread+domain local ilist
force atoms. This gives incorrect results with OpenMP and/or domain
decomposition. Using the type index for the restraint and a domain-
local, but not thread-local index for the pair resolves these issues.
The are now only two limitations left:
* Time-averaged restraint don't work with DD.
* Multiple copies of molecules in the same system without ensemble
  averaging does not work with DD.

Fixes #1117.
Fixes #1989.
Fixes #2029.

Change-Id: Ic51230aa19a4640caca29a7d7ff471e30a3d9f09
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/listed-forces/disre.cpp
src/gromacs/listed-forces/disre.h
src/gromacs/listed-forces/listed-forces.cpp
src/gromacs/listed-forces/listed-forces.h
src/gromacs/mdlib/force.cpp
src/gromacs/mdtypes/fcdata.h