added correction for PME virial with non-linear virtual sites
authorBerk Hess <hess@kth.se>
Tue, 27 Mar 2012 11:35:13 +0000 (13:35 +0200)
committerBerk Hess <hess@kth.se>
Tue, 27 Mar 2012 11:35:13 +0000 (13:35 +0200)
commit2c59fdcc2d05d49d39e9d19db6a497aa8a3c9dfc
tree59b56584725dd0630dbae5783c1d62b76dbfcb5b
parenta3885ef128eedb6d40a247dd6fabbce78b90b57b
added correction for PME virial with non-linear virtual sites

With non-linear virtual site constructs the virial nees to be corrected
when it is not calculated from the particle coordinates and masses.
Currently this is only a problem for the PME mesh contribution.
This would lead to an incorrect virial and pressure. The error was small
for unordered systems, but could be significant for e.g. an all-atom
bilayer with hydrogens replaced by virtual sites. Fixes #908

Change-Id: I27a06019aa09734a14f3630ef296aaaacb9c5f0b
include/vsite.h
src/mdlib/sim_util.c
src/mdlib/vsite.c