Add some unit tests for surface area calculation
authorTeemu Murtola <teemu.murtola@gmail.com>
Fri, 28 Feb 2014 04:37:13 +0000 (06:37 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 26 Nov 2014 17:34:27 +0000 (18:34 +0100)
commitccd8bc32ce227d0aba7550a02748f5951fa6d250
treea20219658ed917a1eeafc0a165c7903fec804f72
parentfa0aef8b391cb1c09c7b8f4c41613fac213c4d50
Add some unit tests for surface area calculation

There are a few real unit tests that compare the results against
analytical calculation for trivial cases, but the rest of the tests are
more of regression tests, designed to catch changes in the output.
I have not actually checked that the reference values for the more
complex values are correct.

Put the tests in surfacearea.cpp instead of nsc.cpp and renamed the
implementation to match in preparation for future cleanup.

The volume computation with PBC is not tested, since it is broken.

Change-Id: I18e3baa899b1c10fec0c8b43d8dd76a357297005
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/trajectoryanalysis/modules/surfacearea.c [moved from src/gromacs/trajectoryanalysis/modules/nsc.c with 99% similarity]
src/gromacs/trajectoryanalysis/modules/surfacearea.h [moved from src/gromacs/trajectoryanalysis/modules/nsc.h with 96% similarity]
src/gromacs/trajectoryanalysis/tests/CMakeLists.txt
src/gromacs/trajectoryanalysis/tests/refdata/SurfaceAreaTest_Computes100Points.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SurfaceAreaTest_Computes100PointsWithRectangularPBC.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/refdata/SurfaceAreaTest_Computes100PointsWithTriclinicPBC.xml [new file with mode: 0644]
src/gromacs/trajectoryanalysis/tests/sasa.cpp
src/gromacs/trajectoryanalysis/tests/surfacearea.cpp [new file with mode: 0644]
src/testutils/testasserts.h