Replacement for pdb2gmx tests
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 6 Jul 2018 16:41:07 +0000 (18:41 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 16 Jul 2018 15:35:07 +0000 (17:35 +0200)
commit27a4d57c36c1d5008eaa9ee90c05f706f8a45fad
tree43f2d9f9c5378b63b3e1765a54bca93e2902c174
parentcbaeb20b0f6d26be942d0dc419db6f43ec789ace
Replacement for pdb2gmx tests

This test directly asserts upon the .top and .gro files that are
written out, using fragments of the
regressiontests/complex/aminoacids/conf.gro because these cover all
basic amino acid types. It also adds testing for hydrogen vsites for
amber and charmm.

We now omit doing an energy minimization after the string checks,
which was always a doubtful way to test pdb2gmx. These tests are still
too slow to run with other pre- and post-submit testing, so a new
CTest category has been made for them, and that category is excluded
from Jenkins builds by default. Developers will still run these by
default with "make check" or "ctest" but that should be fast enough on
a workstation. Later we can probably refactor them to use in-memory
buffers and be fast enough to put with the other tests.

Modified pdb2gmx to avoid writing fractional charges for every atom in
the [atoms] output, which isn't very useful for users and makes
writing tests more difficult.

Fixed unstable sorting of dihedrals whose parameters are strings that
identify macros.

Added new capability for refdata tests to filter out lines that vary
at run time by supplying a regex that matches the lines to skip.
That's not ideal, but useful for now. Better would be to refactor
tools so that e.g. header output can go to a different stream, but
first we should have basic tests in place.

Added tests for Regex. Fixed minor bug in c++ stdlib regex
implementation of Regex. Noted the remaining reason why we have
Regex supported by two different implementations.

Minor updates to use compat::make_unique

Extended functionality of CommandLine for convenient use.

Refs #1587, #2566

Change-Id: I6a4aeb1a4c460621ca89a0dc6177567fa09d9200
92 files changed:
admin/builds/gromacs.py
docs/release-notes/tools.rst
src/gromacs/gmxpreprocess/gen_ad.cpp
src/gromacs/gmxpreprocess/tests/CMakeLists.txt
src/gromacs/gmxpreprocess/tests/fragment1.pdb [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/fragment2.pdb [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/fragment3.pdb [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/fragment4.pdb [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/pdb2gmx.cpp [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_0.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_1.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_2.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_3.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_4.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_5.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_6.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForAmber99sb_ildn_Pdb2gmxTest_ProducesMatchingTopology_7.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_0.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_1.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_2.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_3.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_4.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_5.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_6.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForCharmm27_Pdb2gmxTest_ProducesMatchingTopology_7.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_0.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_1.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_10.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_11.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_12.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_13.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_14.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_15.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_2.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_3.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_4.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_5.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_6.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_7.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_8.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos43a1_Pdb2gmxTest_ProducesMatchingTopology_9.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_0.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_1.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_10.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_11.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_12.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_13.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_14.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_15.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_2.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_3.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_4.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_5.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_6.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_7.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_8.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForGromos53a6_Pdb2gmxTest_ProducesMatchingTopology_9.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_0.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_1.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_10.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_11.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_12.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_13.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_14.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_15.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_16.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_17.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_18.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_19.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_2.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_20.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_21.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_22.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_23.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_3.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_4.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_5.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_6.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_7.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_8.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/tests/refdata/ForOplsaa_Pdb2gmxTest_ProducesMatchingTopology_9.xml [new file with mode: 0644]
src/gromacs/gmxpreprocess/toputil.cpp
src/gromacs/utility/gmxregex.cpp
src/gromacs/utility/gmxregex.h
src/gromacs/utility/tests/CMakeLists.txt
src/gromacs/utility/tests/gmxregex.cpp [new file with mode: 0644]
src/testutils/TestMacros.cmake
src/testutils/cmdlinetest.cpp
src/testutils/cmdlinetest.h
src/testutils/filematchers.h
src/testutils/textblockmatchers.cpp
src/testutils/textblockmatchers.h