pdb2gmx ignores angles when no bonds are present
As recently posted on gmx-users, pdb2gmx will not write angles if bonds do not connect the constituent atoms, despite being present in an .rtp [angles] directive. For most purposes, this is not a problem, but there are specialty force fields that need such behavior. I have attached a much simpler test case than the original gmx-users post to reproduce the problem. Invoke with:
echo 1 3 | pdb2gmx -f water.pdb
Enable rtp angle/dihedral entries not connected by bonds
pdb2gmx has previously silently ignored any angles or
torsions not connected by bonds. This patch adds code
to mark with RTP/hackblock entries that have been
assigned in this search, and afterwards we add those
that have not yet been matched. In particular, this makes
it possible to have angles or torsions in RTP entries
even if those atoms are not connected by bonds.
#2 Updated by Justin Lemkul about 7 years ago
I agree that there are plenty of ways outside of pdb2gmx that can generate topologies, but when pdb2gmx silently ignores an otherwise properly formatted .rtp entry, I think there's still a problem worth fixing. Nowhere in the documentation does it say that pdb2gmx can only be used for biomolecules, it says that it reads a list of input files and writes a topology. If we need to be more specific about limitations, that's fine, but when input files are written correctly (with respect to what the manual says), the end user is going to assume that the outcome will be correct, but in this case, it is not.