Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problematic PDB files: list of IDs #17

Open
nmih opened this issue May 4, 2017 · 1 comment
Open

Problematic PDB files: list of IDs #17

nmih opened this issue May 4, 2017 · 1 comment
Assignees

Comments

@nmih
Copy link
Member

nmih commented May 4, 2017

This issue will be left open for all PDBs that have strange errors...

ID: 5nc5
Problem: Biopython loading of mmcif file fails, says duplicated atom name

@nmih nmih self-assigned this May 4, 2017
@yseif
Copy link
Collaborator

yseif commented Oct 31, 2017

from Bio.PDB import *
parser = MMCIFParser()
structure = parser.get_structure('test','4C13.cif')

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-162-a4d420356111> in <module>()
      1 from Bio.PDB import *
      2 parser = MMCIFParser()
----> 3 structure = parser.get_structure('test','4C13.cif')

/usr/local/lib/python2.7/dist-packages/Bio/PDB/MMCIFParser.pyc in get_structure(self, structure_id, filename)
     62                 warnings.filterwarnings("ignore", category=PDBConstructionWarning)
     63             self._mmcif_dict = MMCIF2Dict(filename)
---> 64             self._build_structure(structure_id)
     65 
     66         return self._structure_builder.get_structure()

/usr/local/lib/python2.7/dist-packages/Bio/PDB/MMCIFParser.pyc in _build_structure(self, structure_id)
    184             element = element_list[i] if element_list else None
    185             structure_builder.init_atom(name, coord, tempfactor, occupancy, altloc,
--> 186                 name, element=element)
    187             if aniso_flag == 1:
    188                 u = (aniso_u11[i], aniso_u12[i], aniso_u13[i],

/usr/local/lib/python2.7/dist-packages/Bio/PDB/StructureBuilder.pyc in init_atom(self, name, coord, b_factor, occupancy, altloc, fullname, serial_number, element)
    202                               PDBConstructionWarning)
    203         self.atom = Atom(name, coord, b_factor, occupancy, altloc,
--> 204                          fullname, serial_number, element)
    205         if altloc != " ":
    206             # The atom is disordered

/usr/local/lib/python2.7/dist-packages/Bio/PDB/Atom.pyc in __init__(self, name, coord, bfactor, occupancy, altloc, fullname, serial_number, element)
     68         self.xtra = {}
     69         assert not element or element == element.upper(), element
---> 70         self.element = self._assign_element(element)
     71         self.mass = self._assign_atom_mass()
     72 

/usr/local/lib/python2.7/dist-packages/Bio/PDB/Atom.pyc in _assign_element(self, element)
     84                 # Hs may have digit in [0]
     85                 if self.name[0].isdigit():
---> 86                     putative_element = self.name[1]
     87                 else:
     88                     putative_element = self.name[0]

IndexError: string index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants