[Biopython] ligand PDB files

paul at tonair.de paul at tonair.de
Fri Oct 14 12:00:04 UTC 2011



Dear all, 
I'm having trouble to read in the attached PDB file - this
is my code: 
" 

from Bio.PDB import
*
parser=PDBParser()
structure=parser.get_structure("PHA-L","./2w26_lig.pdb")


for model in structure:
 for chain in model:
 for residue in chain:

for atom in residue:
 print atom  
" 
which gives this error: 
" 
File
"/SW/python/lib/python2.6/site-packages/biopython/Bio/PDB/PDBParser.py",
line 66, in get_structure
 self._parse(file.readlines())
 File
"/SW/python/lib/python2.6/site-packages/biopython/Bio/PDB/PDBParser.py",
line 89, in _parse

self.trailer=self._parse_coordinates(coords_trailer)
 File
"/SW/python/lib/python2.6/site-packages/biopython/Bio/PDB/PDBParser.py",
line 205, in _parse_coordinates
 fullname, serial_number, element)
 File
"/SW/python/lib/python2.6/site-packages/biopython/Bio/PDB/StructureBuilder.py",
line 197, in init_atom
 fullname, serial_number, element)
 File
"/SW/python/lib/python2.6/site-packages/biopython/Bio/PDB/Atom.py", line
68, in __init__
 assert not element or element == element.upper(),
element
AssertionError: Cl 
" 
Does this mean that the PDB parser only
recognizes "amino acid-atoms", i.e. a chlorine does not work? 
Cheers &
Thanks, 
Paul
-------------- next part --------------
COMPND    2w26_LIG.pdb_0 
AUTHOR    GENERATED BY OPEN BABEL 2.3.0
ATOM      1  C1  RIV A   1       9.643   1.777  18.433  1.00  0.00           C  
ATOM      2  N1  RIV A   1       8.303   2.377  18.109  1.00  0.00           N  
ATOM      3  C2  RIV A   1      10.053   0.667  17.441  1.00  0.00           C  
ATOM      4  C3  RIV A   1       7.671   2.122  16.881  1.00  0.00           C  
ATOM      5  O1  RIV A   1       9.768   1.124  16.111  1.00  0.00           O  
ATOM      6  C4  RIV A   1       8.355   1.223  15.853  1.00  0.00           C  
ATOM      7  C5  RIV A   1       6.487   4.959  20.981  1.00  0.00           C  
ATOM      8  C6  RIV A   1       7.333   5.468  19.984  1.00  0.00           C  
ATOM      9  C7  RIV A   1       6.237   3.551  21.013  1.00  0.00           C  
ATOM     10  C8  RIV A   1       7.918   4.619  19.048  1.00  0.00           C  
ATOM     11  C9  RIV A   1       6.837   2.690  20.070  1.00  0.00           C  
ATOM     12  C10 RIV A   1       7.682   3.222  19.078  1.00  0.00           C  
ATOM     13  O2  RIV A   1       6.583   2.613  16.630  1.00  0.00           O  
ATOM     14  N2  RIV A   1       5.906   5.863  21.947  1.00  0.00           N  
ATOM     15  C11 RIV A   1       5.040   5.543  22.995  1.00  0.00           C  
ATOM     16  C12 RIV A   1       6.146   7.326  22.000  1.00  0.00           C  
ATOM     17  O3  RIV A   1       4.690   6.614  23.757  1.00  0.00           O  
ATOM     18  C13 RIV A   1       5.213   7.787  23.134  1.00  0.00           C  
ATOM     19  O4  RIV A   1       4.634   4.419  23.228  1.00  0.00           O  
ATOM     20  C14 RIV A   1       5.924   8.721  24.155  1.00  0.00           C  
ATOM     21  N3  RIV A   1       7.078   8.136  24.932  1.00  0.00           N  
ATOM     22  C15 RIV A   1       8.402   8.558  24.672  1.00  0.00           C  
ATOM     23  S1  RIV A   1      11.131   8.264  25.063  1.00  0.00           S  
ATOM     24  C16 RIV A   1      11.805   7.503  26.288  1.00  0.00           C  
ATOM     25  C17 RIV A   1       9.567   8.044  25.466  1.00  0.00           C  
ATOM     26  C18 RIV A   1      10.794   7.011  27.130  1.00  0.00           C  
ATOM     27  C19 RIV A   1       9.509   7.324  26.659  1.00  0.00           C  
ATOM     28  O5  RIV A   1       8.611   9.379  23.797  1.00  0.00           O  
ATOM     29 Cl1  RIV A   1      13.544   7.302  26.531  1.00  0.00          Cl  
ATOM     30  H   RIV A   1       9.643   1.777  18.433  1.00  0.00           H  
ATOM     31  H   RIV A   1       9.643   1.777  18.433  1.00  0.00           H  
ATOM     32  H   RIV A   1      10.053   0.667  17.441  1.00  0.00           H  
ATOM     33  H   RIV A   1      10.053   0.667  17.441  1.00  0.00           H  
ATOM     34  H   RIV A   1       8.355   1.223  15.853  1.00  0.00           H  
ATOM     35  H   RIV A   1       8.355   1.223  15.853  1.00  0.00           H  
ATOM     36  H   RIV A   1       7.333   5.468  19.984  1.00  0.00           H  
ATOM     37  H   RIV A   1       6.237   3.551  21.013  1.00  0.00           H  
ATOM     38  H   RIV A   1       7.918   4.619  19.048  1.00  0.00           H  
ATOM     39  H   RIV A   1       6.837   2.690  20.070  1.00  0.00           H  
ATOM     40  H   RIV A   1       6.146   7.326  22.000  1.00  0.00           H  
ATOM     41  H   RIV A   1       6.146   7.326  22.000  1.00  0.00           H  
ATOM     42  H   RIV A   1       5.213   7.787  23.134  1.00  0.00           H  
ATOM     43  H   RIV A   1       5.924   8.721  24.155  1.00  0.00           H  
ATOM     44  H   RIV A   1       5.924   8.721  24.155  1.00  0.00           H  
ATOM     45  H   RIV A   1       7.078   8.136  24.932  1.00  0.00           H  
ATOM     46  H   RIV A   1      10.794   7.011  27.130  1.00  0.00           H  
ATOM     47  H   RIV A   1       9.509   7.324  26.659  1.00  0.00           H  
CONECT    1    3    2   30   31                                       
CONECT    1                                                           
CONECT    2    4    1   12                                            
CONECT    3    5    1   32   33                                       
CONECT    3                                                           
CONECT    4    6   13    2                                            
CONECT    5    6    3                                                 
CONECT    6    5    4   34   35                                       
CONECT    6                                                           
CONECT    7    8    9   14                                            
CONECT    8   10    7   36                                            
CONECT    9   11    7   37                                            
CONECT   10   12    8   38                                            
CONECT   11   12    9   39                                            
CONECT   12    2   10   11                                            
CONECT   13    4                                                      
CONECT   14    7   16   15                                            
CONECT   15   14   19   17                                            
CONECT   16   14   18   40   41                                       
CONECT   16                                                           
CONECT   17   15   18                                                 
CONECT   18   16   17   20   42                                       
CONECT   18                                                           
CONECT   19   15                                                      
CONECT   20   18   21   43   44                                       
CONECT   20                                                           
CONECT   21   20   22   45                                            
CONECT   22   28   21   25                                            
CONECT   23   25   24                                                 
CONECT   24   23   29   26                                            
CONECT   25   22   23   27                                            
CONECT   26   24   27   46                                            
CONECT   27   25   26   47                                            
CONECT   28   22                                                      
CONECT   29   24                                                      
CONECT   30    1                                                      
CONECT   31    1                                                      
CONECT   32    3                                                      
CONECT   33    3                                                      
CONECT   34    6                                                      
CONECT   35    6                                                      
CONECT   36    8                                                      
CONECT   37    9                                                      
CONECT   38   10                                                      
CONECT   39   11                                                      
CONECT   40   16                                                      
CONECT   41   16                                                      
CONECT   42   18                                                      
CONECT   43   20                                                      
CONECT   44   20                                                      
CONECT   45   21                                                      
CONECT   46   26                                                      
CONECT   47   27                                                      
MASTER        0    0    0    0    0    0    0    0   47    0   47    0
END


More information about the Biopython mailing list