Support for default values for SelectionOption
authorTeemu Murtola <teemu.murtola@gmail.com>
Tue, 12 Nov 2013 19:46:30 +0000 (21:46 +0200)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sun, 5 Jan 2014 04:57:05 +0000 (06:57 +0200)
commit2bdc4de6b126e0e774cf7e8f64c0c29a63c34830
tree3b23b6e8bb802c76765e18a4f19d968c850825c2
parent498c8a4f01b896e3f84facac557c07af1daf6819
Support for default values for SelectionOption

SelectionOption now provides a defaultSelectionText() method to define a
default selection text for cases where the user does not provide the
option at all.  The free volume tool now uses this, since typical usage
is to run for all atoms in the system.
Was discussed on gmx-developers some time ago, so hopefully this is
useful in other contexts as well.
The default value does not appear in the output of -h, but that is
better fixed separately as part of a larger overhaul of the help output.

Change-Id: Ib4cba901a33e402a96ece473f70ac10365abcaac
src/gromacs/selection/selection.h
src/gromacs/selection/selectionoption.cpp
src/gromacs/selection/selectionoption.h
src/gromacs/selection/selectionoptionmanager.cpp
src/gromacs/selection/selectionoptionmanager.h
src/gromacs/selection/selectionoptionstorage.h
src/gromacs/selection/tests/selectionoption.cpp
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/tests/freevolume.cpp
src/gromacs/trajectoryanalysis/tests/refdata/FreeVolumeModuleTest_ComputesFreeVolume.xml