[BioPython] Editing structure entities created by PDBParser
Barry Finzel
barry_finzel at yahoo.com
Tue Mar 25 16:21:30 UTC 2008
I'm relatively new to Biopython, but I've already plunged pretty deeply into Bio.PDB and am trying to write some tools to standardize non-standard PDB files - mostly an exercise in renaming and resorting residue objects (particularly HET groups). I'm hoping to find (or create) something like a chain.sort() method that reorders ALL residues children of a chain by the criteria described in the Bio.PDB.Chain.Chain API :
def _sort(self, r1, r2)
"""Sort function for residues in a chain
Residues are first sorted according to their hetatm records.
Protein and nucleic acid residues first, hetatm residues next,
and waters last. Within each group, the residues are sorted according
to their resseq's (sequence identifiers). Finally, residues with the
same resseq's are sorted according to icode.
Arguments:
o r1, r2 - Residue objects
"""
I use Bio.PDBIO to output a revised model in PDB format. As things are, I see no way to avoid writing output PDB files with objects in the same order as they were read - unless I recreate a duplicate structure in the order I want. Any alternate suggestions?
Barry
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
More information about the Biopython
mailing list