Menu

#889 pdbqt shifted columns if 4 digits residue number

2.3.x
open
nobody
pdbqt (2)
1
2013-11-01
2013-08-29
DiogoMart
No

obabel -i pdb 3EJP.pdb -o pdbqt -O x.pdbqt -xr

The coordinate section will be shifted one char for 4 digit residue numbers:

ATOM 7546 CB ALA A999 58.111 44.251 -14.882 0.00 0.00 +0.000 C
ATOM 7547 C ALA A999 57.141 42.549 -16.394 0.00 0.00 +0.000 C
ATOM 7548 N PRO A1000 56.249 41.570 -16.203 0.00 0.00 +0.000 N

Discussion

  • DiogoMart

    DiogoMart - 2013-08-30

    The raw pdb file 3EJP does not reproduce the error. The attached one does.

     
  • DiogoMart

    DiogoMart - 2013-11-01

    The error is in line 387 from file "pdbqtformat.cpp":

    // Incorrect:
    snprintf(buffer, BUFF_SIZE, "%s%5d %-4s %-3s %c%3d     %8.3f%8.3f%8.3f  0.00  0.00    %+5.3f %.2s",
    // Correct:
    snprintf(buffer, BUFF_SIZE, "%s%5d %-4s %-3s %c%4d    %8.3f%8.3f%8.3f  0.00  0.00    %+5.3f %.2s",
    //                                              |      |
    //                                              |      |
    // The difference is here ----------------------+------+
    //
    // As a comparison, this is line 675 from pdbformat.cpp:
    snprintf(buffer, BUFF_SIZE, "%s%5d %-4s %-3s %c%4d    %8.3f%8.3f%8.3f  1.00  0.00          %2s%2s\n",
    
     
    • DiogoMart

      DiogoMart - 2013-11-01

      It is corrected in version 3.0