[Bioperl-l] More on PDB and chains...

Chris Fields cjfields at uiuc.edu
Thu Sep 14 18:44:08 UTC 2006


> Chris and Bernd,
> 
> I believe there's more to it than structure->chain->residue->atom, it is
> currently more like entry->structure AKA model->chain->residue->atom. In
> this way one can accommodate macromolecular structures or complexes
> composed
> of more than 1 protein, each protein capable of having more than one
> chain.
> 
> >From Entry.pm:
> 
> This object stores a whole Bio::Structure entry. It can consist of one
> or more models (L<Bio::Structure::Model>), which in turn consist of one
> or more chains (L<Bio::Structure::Chain>). A chain is composed of residues
> (L<Bio::Structure::Residue>) and a residue consists of atoms
> (L<Bio::Structure::Atom>).
> 
> My understanding is that multiple models in a single PDB file are
> separated
> by ENDMDL - Bernd, do you know of a multi-model PDB entry?
> 
> However, Entry is handling all kinds of different functions e.g. getting
> and
> setting residues. I agree that this is unconventional.
> 
> Brian O.

Some of the small NMR structures in PDB have multiple models.  

So we could have something more like this:

while (my $entry = $parser->next_entry) {
    while (my $struct = $entry->next_structure) {
        while (my $chain = $struct->next_chain) {
            
            # all residues
            while (my $res = $chain->next_residue) {
                while (my $atom = $res->next_atom) {
                    # deepest level
                }
            }
            
            # hetatms only
            while (my $het = $chain->next_hetatm) {
                # similar methods to $res
            }
        }
        
        # use whatever method name for nonchain...		
        while (my $nonchain = $struct->next_nonchain) {
            # similar methods to $chain
        }
    }
}

This creates a hierarchy similar to the SearchIO parser structure for
result/hit/hsp.  Then each class could have specific methods for the next
level in the hierarchy.  Each level in the hierarchy would need some common
interface but I think it's achievable.

Chris

Christopher Fields
Postdoctoral Researcher - Switzer Lab
Dept. of Biochemistry
University of Illinois Urbana-Champaign



> 
> 
> On 9/14/06 1:31 PM, "Chris Fields" <cjfields at uiuc.edu> wrote:
> 
> > The Bio::Structure implementation, judging by the docs, is pretty
> confusing
> > and, IMHO, needs some work.  For instance, I wouldn¹t expect to get the
> > residues for each chain from the structure object but from the chain
> object,
> > somewhat like:
> >
> > while ( my $struc = $stream->next_structure() ) {
> >     while (my $chain = $struc->next_chain()) {
> >         while (my $res = $chain->next_residue()) {
> >             # do work here
> >         }
> >     }
> >     while (my $chain = $struc->next_nonchain()) { # or whatever
> >         while (my $res = $chain->next_residue()) {
> >             # do work here
> >         }
> >     }
> > }
> 
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list