Ensure residue name used by pdb2gmx matches rtp name
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 21 Jan 2021 12:11:36 +0000 (12:11 +0000)
committerArtem Zhmurov <zhmurov@gmail.com>
Thu, 21 Jan 2021 12:11:36 +0000 (12:11 +0000)
commit4305903e73c3cd761d8d3451f54d94eede645617
tree6f66f6e01cd6f49af043a679d8aed1522163526e
parenta83b8d94b0cfceb894db8cb500ac578936d330b5
Ensure residue name used by pdb2gmx matches rtp name

The default for GLU/GLUH and ASP/ASPH is the unprotonated form. The
help text pdb2gmx specifically states this, and there is no attempt to
use the residue name to infer the protonation.

The old code set the rtp name to the unprotonated form without
changing the residue name read from the configuration file. The
original residue name was then used in the output configuration and
topology file. That name indicated the wrong protonation if the user
input tried to specify the protonated form via the residue name. Now
it changes the residue name to match the rtp name.

This has been surprising, so whenever pdb2gmx implements its default by
changing the residue name, it now reports that.

The same problem occurs when using pdb2gmx -asp if the input
configuration had the name of the protonated form and the interactive
choice was for the unprotonated form. However, in that case there is
no need to inform the user that the input residue naming is being
overridden. Tested manually.

Updated the tests to handle this case.

Added some release notes, Doxygen, added some comments, and updated some code style
so the review is easier.

Fixes #2480
docs/release-notes/2021/major/bugs-fixed.rst
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/gmxpreprocess/tests/fragment2.pdb
src/gromacs/gmxpreprocess/tests/fragment4.pdb