Project

General

Profile

Bug #2028

hdb file can't handle empty lines

Added by Chris Neale about 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
preprocessing (pdb2gmx,grompp)
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

When the .hdb file has empty lines, it does not seem to be read in properly by pdb2gmx.

test:

A. Use oplsaa.ff
B. modify aminoacids.hdb by adding an empty line as the very first line (other places with empty lines in this file also cause things not to be read below the empty line, but I do not show that here).

RESULT of pdb2gmx -ter -ignh:

Checking for duplicate atoms....
Generating any missing hydrogen atoms and/or adding termini.
Now there are 3 residues with 28 atoms
Making bonds...
WARNING: atom HA is missing in residue MET 1 in the pdb file
You might need to add atom HA to the hydrogen database of building block MET
in the file aminoacids.hdb (see the manual)
WARNING: atom HB1 is missing in residue MET 1 in the pdb file
You might need to add atom HB1 to the hydrogen database of building block MET
in the file aminoacids.hdb (see the manual)
WARNING: atom HB2 is missing in residue MET 1 in the pdb file
You might need to add atom HB2 to the hydrogen database of building block MET
in the file aminoacids.hdb (see the manual)
... (there are many more like this)

But it works just fine with the standard .hdb file.

There is an obvious workaround for this. I ran into it when adding a blank line before a comment (after having been scared away from even trying to create multiple .hdb files based on issues 2026 and 2027 but still wanting to note my modification in the .hdb file). Note that comments beginning with semicolons do seem to be handled correctly in the .hdb file and even a line with a space and then the semi-colon does not break .hdb parsing.

There is no good reason to desire blank lines in the .hdb file, just that a user might add one thinking it was OK, since many other force field file types can handle it. If there is a desire not to allow blank lines in the .hdb file, then perhaps throwing an error is better than simply not finding the hydrogens.

Associated revisions

Revision 3993194e (diff)
Added by Erik Lindahl almost 2 years ago

Allow empty lines in hdb files

Skip lines that consist only of whitespace. Not a universal
solution for fixing hdb files, but better than the user
getting very strange error messages that don't say anything
about whitespace.

Fixes #2028.

Change-Id: I0962c89d0251f83da7fe0440efd31fb7ca468690

History

#2 Updated by Gerrit Code Review Bot almost 2 years ago

Gerrit received a related patchset '1' for Issue #2028.
Uploader: Erik Lindahl ()
Change-Id: gromacs~release-2018~I0962c89d0251f83da7fe0440efd31fb7ca468690
Gerrit URL: https://gerrit.gromacs.org/7405

#3 Updated by Erik Lindahl almost 2 years ago

  • Status changed from New to Fix uploaded

#4 Updated by Gerrit Code Review Bot almost 2 years ago

Gerrit received a related patchset '1' for Issue #2028.
Uploader: Erik Lindahl ()
Change-Id: gromacs~release-2018~Ie7bf8e65892281cc2744146a5525be0c4afdcecf
Gerrit URL: https://gerrit.gromacs.org/7406

#5 Updated by Mark Abraham almost 2 years ago

  • Category set to preprocessing (pdb2gmx,grompp)
  • Assignee set to Erik Lindahl
  • Target version set to 2018

#6 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Fix uploaded to Resolved

#7 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF