[Biopython] Bio.PDB: removing disordred atoms

Peter Cock p.j.a.cock at googlemail.com
Tue May 19 12:32:04 EDT 2009


On Tue, May 19, 2009 at 3:55 PM, Ramon Crehuet <rcsqtc at iqac.csic.es> wrote:
> Thanks,
> The easyiest way I found was defining a class to assert disordered atoms:
>
> class NotDisordered(Select):
>    def accept_atom(self, atom):
>        if not atom.is_disordered():
>            return 1
>        elif atom.get_altloc()=='B':
>            return 1
>        else:
>            return 0
>
> io=PDBIO()
> io.set_structure(s)
> io.save("1GS5-ord.pdb", select=NotDisordered())

Good - that's what you are expected to do.  I'm glad it made sense.

Peter

P.S. Personally I would use True and False instead of 1 and 0.



More information about the Biopython mailing list