Fix gmx dump
authorPaul Bauer <paul.bauer.q@gmail.com>
Wed, 12 Jun 2019 09:39:33 +0000 (11:39 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 18 Jun 2019 21:19:22 +0000 (23:19 +0200)
commite8f18f116fd544d33f98b64ee1374dc201172a82
tree52dfcbb27a8c8a94dbd38baf05381e6390d77a56
parent763e638f982890aa53d9240ddd9f0ea3a173e4a2
Fix gmx dump

The program would fail because the filename for writing the output mdp
file was passed as valid empty string that could not be opened as an
output file.

Now only passes the string when it is not empty.

Added test and fixed possible floating point exception found by the
test.

Change-Id: I8b18fbc0dfc5642399935f32fb0b1999fad44c98
src/gromacs/tools/dump.cpp
src/gromacs/tools/tests/CMakeLists.txt
src/gromacs/tools/tests/dump.cpp [new file with mode: 0644]
src/gromacs/topology/forcefieldparameters.cpp