Convert gmx-sas to the C++ framework
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 26 Oct 2013 05:25:28 +0000 (08:25 +0300)
committerRoland Schulz <roland@rschulz.eu>
Fri, 28 Feb 2014 01:26:02 +0000 (02:26 +0100)
commit5b99d6a24a42e98f3b4d3295ed05eedc57f0f153
treee3344e27970804b08588b3db8b22a2954a724890
parente1a21fd16857e2f2eba74999578e92ac4f2743c3
Convert gmx-sas to the C++ framework

An example of converting a non-trivial analysis tool to the new
framework.  Most functionality is intact, but the command-line interface
is changed a bit.  Changes in behavior:
 - Writing a position restraint file is not implemented.  Would not be
   very difficult to add.
 - Solvation free energy estimates are written into a separate file
   instead of the main output file, and only if requested with an -odg
   option.
 - The calculation group is specified as a selection with -surface.
   Can be a dynamic selection.  The total area of this group is always
   written out.
 - There can be 0..* extra output groups, specified as selections with
   -output.  All can be dynamic, and must always be a subset of the
   calculation group.
 - There is no longer a separate concept of hydrophilic and hydrophobic
   surface area.  The user can trivially calculate such things by
   providing two different output groups.  The old hydrophobicity
   definition is easily expressed as "... and charge {-0.2 to 0.2}".
 - tpr file is no longer required for most of the output.
 - Output precision is different from the old tool.  The current
   precision (fixed to three decimal places) should be sufficient for
   most uses, but it could be considered to use %g for formatting like
   the old tool if really necessary.

Future TODOs:
 - Consider if the legends on the plots could be improved.
 - Add unit tests for the actual surface area calculation routine.

Part of #665.

Change-Id: Iee60c13b927b3b63b6e218164cd961971f2f3fce
18 files changed:
cmake/legacy_and_external.supp
src/gromacs/gmxana/gmx_ana.h
src/gromacs/gmxana/gmx_sas.c [deleted file]
src/gromacs/selection/selection.h
src/gromacs/trajectoryanalysis/CMakeLists.txt
src/gromacs/trajectoryanalysis/modules.cpp
src/gromacs/trajectoryanalysis/modules/nsc.c [moved from src/gromacs/gmxana/nsc.c with 97% similarity]
src/gromacs/trajectoryanalysis/modules/nsc.h [moved from src/gromacs/gmxana/nsc.h with 91% similarity]
src/gromacs/trajectoryanalysis/modules/sasa.cpp [new file with mode: 0644]
src/gromacs/trajectoryanalysis/modules/sasa.h [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/CMakeLists.txt
src/gromacs/trajectoryanalysis/tests/lysozyme.gro [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_BasicTest.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_HandlesDynamicCalculationGroup.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_HandlesDynamicOutputGroup.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SasaModuleTest_WritesConnollySurfaceWithSolute.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/sasa.cpp [new file with mode: 0644]
src/programs/legacymodules.cpp