ó
ó-Ec           @   s0   d  d l  m  Z  d Z d e  f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   Entitys=   The structure class, representing a macromolecular structure.t	   Structurec           B   sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sG   
    The Structure class contains a collection of Model instances.
    c         C   s   d |  _  t j |  | ƒ d  S(   Nt   S(   t   levelR    t   __init__(   t   selft   id(    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyR      s    	c         C   s   d |  j  ƒ  S(   Ns   <Structure id=%s>(   t   get_id(   R   (    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyt   __repr__   s    c         C   s   t  | j ƒ  | j ƒ  ƒ S(   s)  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.

        Arguments:
        o m1, m2 - Model instances
        (   t   cmpR   (   R   t   m1t   m2(    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyt   _sort   s    
c         c   s+   x$ |  D] } x | D] } | Vq Wq Wd  S(   N(    (   R   t   mt   c(    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyt
   get_chains*   s    c         c   s1   x* |  j  ƒ  D] } x | D] } | Vq Wq Wd  S(   N(   R   (   R   R   t   r(    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyt   get_residues/   s    c         c   s1   x* |  j  ƒ  D] } x | D] } | Vq Wq Wd  S(   N(   R   (   R   R   t   a(    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyt	   get_atoms4   s    (	   t   __name__t
   __module__t   __doc__R   R   R   R   R   R   (    (    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyR      s   					N(   R    R   R   (    (    (    s„   /oak/stanford/groups/akundaje/marinovg/programs/biopython-1.50.tar.gz/biopython-1.50/build/lib.linux-x86_64-2.7/Bio/PDB/Structure.pyt   <module>   s   