PDB, MOL2 file saving improperly

Bugs item #2855789, was opened at 2009-09-10 05:40
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=835077&aid=2855789&group_id=165310

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Open Babel
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Geoff Hutchison (ghutchis)
Summary: PDB, MOL2 file saving improperly

Initial Comment:
No error messages, the files are “internally consistent” – ie Avagadro reads everything it writes out, however PDB files are sometimes written with the wrong molecule types. I’ve attached an example PDB file that avagadro wrote, which is erroneous – the ATOM TYPES are not consistent.

This problem seems to occur when I open a PDB file of a small molecule, edit it a bit – change a few atom types, re-optimize geometries etc, then re-save as a new PDB file…

Avagadro, however, manages to correct this problem by writing to CML format first, then reopening that file, then saving that file as a PDB file. (Likely because the CML format only has 1 specifier for atom type, where as the PDB file format written by avagadro uses 2 fields for atom type… and is not consitent in the usage.)

Note the attached file has an error on line number 19, where avagadro seems to have written that this atom (which should be a carbon) is both a hydrogen and a carbon atom. This is odd, avagadro reopens this file and thinks the atom is a carbon atom, external programs (i’ve tried 3) all read it as hydrogen atom.

Here’s line 19:
ATOM 14 H LIG 1 -4.913 0.200 0.542 1.00 0.00 C

I suspect this is a bug in avagadro’s interaction with open babel.


You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=835077&aid=2855789&group_id=165310