[Biopython] PDB parser: suppress warnings
João Rodrigues
anaryin at gmail.com
Tue Jul 22 20:08:39 UTC 2014
Hi Fred,
You can pass the QUIET=1 option to the PDBParser(). That should silence
warnings.
Cheers,
João
2014-07-22 19:14 GMT+01:00 Frederico Moraes Ferreira <ferreirafm at usp.br>:
> Hi Biopythonees,
> Has anybody happen to know how to suppress warnings when reading PDBs with
> hydrogenated waters?
>
> from Bio.PDB.PDBParser import PDBParser
> struct = PDBParser().get_structure('tmp', pdbf)
>
> My PDBs came from MD so as all water molecules have hydrogens causing
> thousands of warnings like:
> ...
> /usr/lib64/python2.7/site-packages/Bio/PDB/PDBParser.py:284:
> PDBConstructionWarning: PDBConstructionException: Atom 2H defined twice in
> residue <Residue HOH het=W resseq=2640 icode= > at line 71037.
> Exception ignored.
> Some atoms or residues may be missing in the data structure.
> % message, PDBConstructionWarning)
> ...
>
> Thanks in advance.
> Fred
>
>
> --
> Dr. Frederico Moraes Ferreira
> University of Sao Paulo
> Heart Institute, School of Medicine
> Laboratoy of Immunology
> Av. Dr. Enéas de Carvalho Aguiar, 44
> 05403-900 Sao Paulo - SP
> Brasil
>
> _______________________________________________
> Biopython mailing list - Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20140722/22e3f5cc/attachment.html>
More information about the Biopython
mailing list