Make 'gmx sasa' volume computation translation-invariant
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 29 Nov 2014 05:48:10 +0000 (07:48 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 16 Dec 2014 19:37:31 +0000 (20:37 +0100)
commit3325b3876273e9c2446df0057434d819fce0c8e9
treecb9bf133b194fea6a32463c480987db6defabbe8
parent5615e315439770925beb2fbff3e967d7709cc5ea
Make 'gmx sasa' volume computation translation-invariant

Compute the center of the molecule also when PBC is used, instead of
using the origin as the center.  The center is used for volume
computation, and this makes the output translation-invariant with PBC.
This also makes the results of PBC and no-PBC computation match for the
same structure in case there are no contacts over the PBC.

The whole volume algorithm is broken if the molecule is split across
PBC in the input structure (which is likely the case if one wants to use
-pbc), and that would require substantially more effort (essentially,
making each continuous surface whole before computing the volume), so
only added a note to 'gmx sasa -h' to explain this for now.

Change-Id: I1cf75505ceb403f5650f05453ec2bc7b979d1e9e
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/trajectoryanalysis/modules/surfacearea.cpp
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_BasicTest.xml
src/gromacs/trajectoryanalysis/tests/refdata/SurfaceAreaTest_Computes100PointsWithRectangularPBC.xml
src/gromacs/trajectoryanalysis/tests/refdata/SurfaceAreaTest_Computes100PointsWithTriclinicPBC.xml
src/gromacs/trajectoryanalysis/tests/surfacearea.cpp