Avoid some incorrect behavior with gmx solvate
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 25 May 2017 10:23:31 +0000 (13:23 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 29 May 2017 13:32:07 +0000 (15:32 +0200)
commit44909a43542f9cd926b723231d65d192141fb4f0
treedb6f36026b37d160ddd413f6cca28a00c65519d0
parentb15c09b20ca9cd618fa77edebefa271982af0953
Avoid some incorrect behavior with gmx solvate

gmx solvate cannot replicate non-rectangular solvent boxes correctly
(there are several different places that assume a diagonal box matrix),
so give a fatal error if that is attempted.  To support some uses with
triclinic boxes, skip the replication step if the solvent and target box
sizes are already equal.

Support for general triclinic boxes can be added separately, and the
check introduced here can be valuable even in that case: it keeps a
pre-equilibrated solvent box intact if the target box size is the same.

Related to #2148.

Change-Id: I078df1f2279ccb758b11787becb89f5dbbbdfca7
src/gromacs/gmxpreprocess/solvate.cpp
src/gromacs/pbcutil/boxutilities.cpp
src/gromacs/pbcutil/boxutilities.h