Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

APBS error parsing ambPQR files #214

Closed
keith923 opened this issue May 5, 2015 · 4 comments
Closed

APBS error parsing ambPQR files #214

keith923 opened this issue May 5, 2015 · 4 comments

Comments

@keith923
Copy link
Contributor

keith923 commented May 5, 2015

From a user:

From: LI An-Bang [mailto:anbangli@qq.com]
Sent: Sunday, May 03, 2015 19:04
To: apbs-users
Subject: [apbs-users] A bug of APBS in reading PQR file

Hi, developers of APBS,

Here I report a bug of APBS in reading PQR file.

I have some PQR files in ambPQR format. When I run APBS calculation, I got the following error information:

Parsing input file 4ull.in...
Parsed input file.
Got paths for 1 molecules
Reading PQR-format atom data from 4ull.pqr.
Valist_readPDB: Unable to parse serial token (radii) as int!
Valist_readPDB: Error while parsing serial!
Valist_readPDB: Can't find x!
Valist_readPQR: Error parsing atom -1728265984!

After checking the PQR file, I found that the reason comes from the REMARK lines of the PQR file:

REMARK atom radii in columns 55-62
REMARK atom charges in columns 63-70

The lines begin with keyword "REMARK" and follow with word "atom". APBS recognize the lines as atom information lines with keyword "ATOM". And thus the error occurs. I deleted the "atom" word in the lines and the error disapeared.

@keith923
Copy link
Contributor Author

keith923 commented May 5, 2015

The code that reads PQR files is in valist.c. The function is Valist_readPQR. That function only recognizes ATOM and HETATM keywords. In other words, it does not know what to do with a 'REMARK line'.

The user reports that this is an ambPQR file. I'm not sure of the provenance of the file, and Google doesn't turn up any useful results.

I would recommend that we put this off until we do the PQR file reader for Sphinx -- especially since there is a simple work-around.

@anbangli
Copy link

anbangli commented May 5, 2015

I am the user who reported the bug.

The PQR files come from Ray Lou's website: http://rayl0.bio.uci.edu/rayl/

There are some database on the website. The PQR files of the "Protein Test Case" are generated by ambPQR. And in these PQR files there are remark lines as follows which trigger the error:

REMARK PQR file in ambPQR format.
REMARK
REMARK atom radii in columns 55-62
REMARK atom charges in columns 63-70

Besides, please check the PDB files of the "Nucleic Acid Test Case". I noticed there are remark lines as follows which may also trigger the error:

DELPHI PDB FILE
FORMAT = 2
HEADER output from qdiff
HEADER atom radii in columns 55-66
HEADER atom charges in columns 67-78

This is a simple problem. I recommand that the function Valist_readPQR should recognizes keywords "ATOM " (with 2 spaces) and "HETATM" in the beginning of the lines.

@lizutah
Copy link

lizutah commented May 22, 2015

duplicate of #77 ?

@kozlac
Copy link
Contributor

kozlac commented Sep 10, 2015

I added a new method to maloc's vio.c and made modifications to Valist_readPQR in valist.c in order to handle the issues above. Now, as long as the keywords ATOM or HETATM are the beginning of the line and in the correct section of the file (even with spaces at the beginning) the parsing should work.

@kozlac kozlac closed this as completed Sep 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants