Logo Search packages:      
Sourcecode: python-biopython version File versions


# Copyright (C) 2002, Thomas Hamelryck (thamelry@vub.ac.be)
# This code is part of the Biopython distribution and governed by its
# license.  Please see the LICENSE file that should have been included
# as part of this package.  

# My Stuff
from Entity import Entity

__doc__="The structure class, representing a macromolecular structure."

00014 class Structure(Entity):
    The Structure class contains a collection of Model instances.
    def __init__(self, id):
        Entity.__init__(self, id)

    # Special methods

    def __repr__(self):
        return "<Structure id=%s>" % self.get_id()

    # Private methods

00029     def _sort(self, m1, m2):
        """Sort models.

        This sorting function sorts the Model instances in the Structure instance.
        The sorting is done based on the model id, which is a simple int that 
        reflects the order of the models in the PDB file.

        o m1, m2 - Model instances
        return cmp(m1.get_id(), m2.get_id())

Generated by  Doxygen 1.6.0   Back to index