Support scoped key-value tree transform rules
commit8aeca67da27d19dad230f289f43739ac5fa8b688
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 9 Jul 2017 06:28:26 +0000 (9 09:28 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 11 Jul 2017 08:23:23 +0000 (11 10:23 +0200)
treeb725c60a538cbf8337f49ae2b932b203e8f99bca
parent77fd72b9dc0af1432fb6ff8391f3842f699340d7
Support scoped key-value tree transform rules

Resolve several TODOs about having the knowledge of the "applied-forces"
option section scattered in different places.  It is now possible to
create a "scoped" key-value tree transform rule interface such that all
rules created through it target a specific subtree in the target tree.

This makes it possible to have initMdpOptions() and initMdpTransform()
operate on the same tree in electricfield.cpp, and have the higher-level
structure only declared in mdmodules.cpp.  Remove the dependency on
MDModules from electric field tests, since it can now use these two
methods without knowing anything about the presence of the higher-level
"applied-forces" section.

Change-Id: I8107b10af3c9c602f40297a2279e3b0449e27e8d
src/gromacs/applied-forces/electricfield.cpp
src/gromacs/applied-forces/tests/electricfield.cpp
src/gromacs/mdrunutility/mdmodules.cpp
src/gromacs/options/treesupport.cpp
src/gromacs/utility/keyvaluetree.h
src/gromacs/utility/keyvaluetreetransform.cpp
src/gromacs/utility/keyvaluetreetransform.h
src/gromacs/utility/tests/keyvaluetreetransform.cpp
src/gromacs/utility/tests/refdata/TreeValueTransformTest_ScopedTransformRules.xml [new file with mode: 0644]