[Biopython] Reading in chimera generated files

Peter Cock p.j.a.cock at googlemail.com
Tue May 5 11:31:57 UTC 2015


Hi Patrick,

Assuming Biopython is interpreting the PDB specification correctly,
you should file a bug with Chimera.

Separately, you could look into replacing this assert statement with
either an error or warning (as used elsewhere in Bio.PDB in order
to tollerate somewhat improper files in strict or permissive mode).

As a quick hack, do bad things happen if you replace the assert
line with this?:

element = element.upper()  # Hack for tools like Chimera

Peter

On Tue, May 5, 2015 at 11:57 AM, Patrick McGrath <ptmcgrat at gmail.com> wrote:
> Hello,
>
> I am trying to use Bio.PDB to read in a PDB file generated from matchmaker
> in chimera. It seems that Chimera changes the HG to Hg and ZN to Zn in the
> last column of the pdb file which causes an error:
>
> assert not element or element == element.upper(), element
> AssertionError: Hg
>
> Is there any solution to this besides creating a script to manually edit the
> pdb file generated by chimera?
>
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython


More information about the Biopython mailing list