
:>"^…  ã               @   s0   d  Z  d d l m Z Gd d „  d e ƒ Z d S)z'Model class, used in Structure objects.é    )ÚEntityc               @   sU   e  Z d  Z d Z d d d „ Z d d „  Z d d „  Z d	 d
 „  Z d d „  Z d S)ÚModelzõThe object representing a model in a structure.

    In a structure derived from an X-ray crystallography experiment,
    only a single model will be present (with some exceptions). NMR
    structures normally contain many different models.
    Nc             C   s>   d |  _  | d k r! | |  _ n	 | |  _ t j |  | ƒ d S)zYInitialize.

        Arguments:
         - id - int
         - serial_num - int

        ÚMN)ÚlevelÚ
serial_numr   Ú__init__)ÚselfÚidr   © r
   ú2/tmp/pip-build-ww9dw3qa/biopython/Bio/PDB/Model.pyr      s
    		zModel.__init__c             C   s   d |  j  ƒ  S)zReturn model identifier.z<Model id=%s>)Zget_id)r   r
   r
   r   Ú__repr__#   s    zModel.__repr__c             c   s   x |  D] } | Vq Wd S)zReturn chains.Nr
   )r   Úcr
   r
   r   Ú
get_chains'   s    zModel.get_chainsc             c   s1   x* |  j  ƒ  D] } x | D] } | Vq Wq Wd S)zReturn residues.N)r   )r   r   Úrr
   r
   r   Úget_residues,   s    zModel.get_residuesc             c   s1   x* |  j  ƒ  D] } x | D] } | Vq Wq Wd S)zReturn atoms.N)r   )r   r   Úar
   r
   r   Ú	get_atoms2   s    zModel.get_atoms)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r
   r
   r
   r   r      s   r   N)r   ZBio.PDB.Entityr   r   r
   r
   r
   r   Ú<module>   s   