[BioPython] PDBConstructionException message

Gad Abraham g.abraham at ms.unimelb.edu.au
Mon Jul 10 10:12:34 UTC 2006


Michiel de Hoon wrote:
>  From looking at the Bio.PDB.PDBParser source code, it appears that
>  >>> parser = PDBParser(PERMISSIVE=0)
> should solve your problem.
> 
> Use
>  >>> from Bio.PDB import *
>  >>> help(PDBParser)
> for more information.
> 
> --Michiel.
> 

The docs say:

o PERMISSIVE - int, if this is 0 exceptions in constructing the
SMCRA data structure are fatal. If 1 (DEFAULT), the exceptions are
caught, but some residues or atoms will be missing. THESE EXCEPTIONS
ARE DUE TO PROBLEMS IN THE PDB FILE!.

however, I don't mind if the chains are somewhat broken, as long as I 
can catch the exception and prevent it from printing to stdout (which is 
what the except clause is trying to do).

Why doesn't the except clause catch the exception?

Thanks,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Victoria 3010, Australia
email: g.abraham at ms.unimelb.edu.au
web: http://www.ms.unimelb.edu.au/~gabraham



More information about the Biopython mailing list