Support concurrent t_topology and gmx_mtop_t use
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 20 Jun 2016 17:55:59 +0000 (20:55 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Tue, 11 Oct 2016 12:36:54 +0000 (14:36 +0200)
commit8d63efb3fc0dd1fa6de34e42d050e505009f83b0
tree152801549b405feb73e76ff2c433c50fe444644f
parentbbffb126ec5fa91657a19b9dace01f5fdcb940cc
Support concurrent t_topology and gmx_mtop_t use

Make gmx_mtop_t_to_t_topology() take a boolean flag that specifies
whether to free memory from mtop or not.  This makes it possible to
convert an mtop to a t_topology and then use both in subsequent code.
This in turn makes a piecewise conversion from t_topology to gmx_mtop_t
possible.

Using these two concurrently currently always leads to memory leaks, but
these should mostly be temporary during the conversion, and can be
sorted out separately if necessary.

Part of #1862.

Change-Id: Iccd6039c2226d1dc617963878e5640bb53f09ad6
src/gromacs/fileio/confio.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/gmxana/gmx_nmeig.cpp
src/gromacs/tools/check.cpp
src/gromacs/tools/convert_tpr.cpp
src/gromacs/tools/dump.cpp
src/gromacs/topology/mtop_util.cpp
src/gromacs/topology/mtop_util.h
src/gromacs/topology/topology.h