On 23 Jan 2012, at 12:29, Douglas Houston wrote:

> Hi all,
> 
> I wonder if anyone can help me work out what's going on here. I'm trying to 
> convert a PDB file of ADP (from structure 3ATV) to mol2 format and add 
> hydrogens. The first step seems to work fine:
> 
> babel -ipdb 3ATV_ADP.pdb -omol2 3ATV_ADP1.mol2 -p 7.4
> 
> however as a check I thought I'd try to convert back from mol2 to PDB, but 
> when I do I get lots of errors:
> 
> babel -imol2 3ATV_ADP1.mol2 -opdb tmp.pdb

The problem arises from that the fact that ADP in 3ATV is residue number 1452, 
and the mol2 output is not putting spaces around it.  So if you global-replace 
'A1452' to 'A   1' in the pdb input, you get a working mol2 file which 
round-trips correctly.

This is an openbabel bug: mol2 rows are space-delimited rather than 
fixed-length-fields, so

      4  O3B       -5.4110   17.8230   18.6840 O.co21452  ADP1452    -0.5767

is not a valid line (the atom type reads out as 'O.co21452' which is obviously 
not a known one).

Tom
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to